13.7 — Your reverse engineering toolbox

📘 Chapter 13⏱ about 2 min read✍️ Beginner friendly
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#

ToolTypeWhat it's for
stringsstaticlist all readable text in a file
objdump -d -M intelstaticquick disassembly on Linux
Ghidrastaticfree disassembler and decompiler — turns assembly back into C-like code
IDA Free / Binary Ninjastaticpopular alternatives to Ghidra
x64dbgdynamicfree debugger for Windows programs
gdbdynamicthe classic debugger on Linux
Compiler Explorerlearningsee 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#

  1. Run it normally. What does it ask? What does it print?
  2. strings it. Look for interesting messages ("Wrong password", file names, URLs).
  3. Open it in Ghidra. Let it auto-analyse. Find main (or the function using those strings).
  4. Read the decompiled code. Rename variables and functions as you understand them — this is the real work.
  5. 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#

  1. Install a recent Java JDK, then download and unzip Ghidra.
  2. Create a project, then File → Import File and pick your program.
  3. Double-click it and say Yes to auto-analysis.
  4. In the Symbol Tree, find main. The Decompile window shows C-like code next to the assembly.
  5. Press L to rename things. Your notes are saved in the project.
Finished reading? Tick it off. Your progress is saved in this browser.

Tip: press ← / → to move between lessons, / to search.