仓库源文站点原文


layout: post title: "Software Security Notes 7 Disassembly and Binary Analysis Properties " date: 2021-3-9 07:00:00 +0800

categories: [Notes, Software Security]

Function Dectection

Called directly by the $call$ instruction.
Indirect all is hard to dectect.

Object-Oriented Code

We only discuss about C code in this course

Structuring Data

Automatic data struction detection in stripped binaries is a notoriouly difficult problem
Some codes can be compiled into similar instructions

Decompilation

Guessing function signatures and local variables
Recovering control flows and function calls

Intermediate Representation

Binary Analysis Properties

Interprocedural and intraprocedural
Flow sensitivity
Context sensitivity

Intraprocedural

Code within a single function at a time

Interprocedural

Consider entire program as a whole

Flow Sensitivity

Take the order of the instructions into account.
Either flow-sensitive or flow-insensitive.

Context Sensitivity

Take the order of the function invocation into account.

Loop Detection

Implemented using $jump$ instructions.
Most execution time is spent in loops.
Buffer overflow tends in occur in loops.

Compilers use dominance trees to determine natural loops.

Reaching Definition Analysis

Reachable data definitions from this point.
CFG level.
Which can reach at the start. Which can still be alive after.

Program Slicing

Find irrelevant slices and remove them.