ky-thuat-phan-tich-ma-doc__ch6-recognizing-c-constructs-in-assembly - [cuuduongthancong.com].pdf

VnQunMai 1 views 15 slides Oct 25, 2025
Slide 1
Slide 1 of 15
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15

About This Presentation

ky-thuat-phan-tich-ma-doc__ch6


Slide Content

Practical Malware Analysis
Ch 6: Recognizing C Constructs in
Assembly

Function Call

Finding the Code in
IDA Pro
•IDA
shows
only the
entry
point
•Link Ch
6a

Trick: Use Strings, then XREF

Disassembly
in IDA Pro
•4 arguments
for printf()
function
•Pushed onto
stack
•Reverse order
•calllaunches
function

Global vs. Local Variables
•Global variables
–Available to any function in the program
•Local variables
–Defined in a function and only available to that
function

Global vs. Local Variables

Global vs. Local Variables
Local –on stack
Local –on stack
Global –in memory

Arithmetic Operations

Arithmetic Operations

Arithmetic Operations

Branching (if)

Branching (if)

Summary
•Finding the Code
–Strings, then XREF
•Function Call
–Arguments pushed onto stack
–Reverse order
–call
•Variables
–Global: in memory, available to all functions
–Local: on stack, only available to one function

Summary
•Arithmetic
–Move variables into registers
–Perform arithmetic (add, sub, idiv, etc.)
–Move results back into variables
•Branching
–Compare (cmp, test, etc.)
–Conditional jump (jz, jnz, etc.)
–Red arrow if false, green arrow if true
Tags