13.7 — Your reverse engineering toolbox
Read one box at a time. No rush.
Static vs dynamic analysis#
- Static analysis = studying the program without running it. You read its assembly and text.
- Dynamic analysis = running it under a debugger and watching what happens: registers, memory, which jumps are taken.
Good reverse engineers use both, switching back and forth.
The tools#
| Tool | Type | What it's for |
|---|---|---|
strings | static | list all readable text in a file |
objdump -d -M intel | static | quick disassembly on Linux |
| Ghidra | static | free disassembler and decompiler — turns assembly back into C-like code |
| IDA Free / Binary Ninja | static | popular alternatives to Ghidra |
| x64dbg | dynamic | free debugger for Windows programs |
gdb | dynamic | the classic debugger on Linux |
| Compiler Explorer | learning | see what any C++ turns into, instantly |
Decompiler
A tool that tries to turn assembly back into C-like source code. It can't bring back your original names or comments, but it's much faster to read than raw assembly.
A simple workflow#
- Run it normally. What does it ask? What does it print?
- strings it. Look for interesting messages ("Wrong password", file names, URLs).
- Open it in Ghidra. Let it auto-analyse. Find
main(or the function using those strings). - Read the decompiled code. Rename variables and functions as you understand them — this is the real work.
- Debug it in x64dbg or gdb. Put breakpoints on interesting spots. Check your guesses by watching the values.
Tip
Use your debugger skills from 7.5 — Using a debugger: breakpoints, stepping and watching values work just the same — you're just looking at assembly instead of C++.
Getting started with Ghidra#
- Install a recent Java JDK, then download and unzip Ghidra.
- Create a project, then File → Import File and pick your program.
- Double-click it and say Yes to auto-analysis.
- In the Symbol Tree, find
main. The Decompile window shows C-like code next to the assembly. - Press L to rename things. Your notes are saved in the project.
Tip: press ← / → to move between lessons, / to search.