Chapter 6 Notes

to accompany Sikorski and Honig, Practical Malware Analysis, no starch press

Recognizing C Code Constructs in Assembly

A lot of malware is written in C. But also Javascript, and php, but malicious executables tend to be written in C.

We want to identify major control structures, i.e. loops and conditionals, as well as code for common data structures such as arrays and linked lists.

Compiler versions and settings matter, so malware analysis shops will keep a repertoire of compilers and libraries on hand.

Don't get stuck on minutiae!

Globals and Locals

Arithmetic Operations

Conditionals

Loops

Function Calls

Three Calling Conventions

Other Control Structures

Consider the example C program