Reverse Engineering with Radare2

A powerful framework for reverse engineering.

Core Analysis Commands

r2 CommandDescription
r2 ./binaryOpen the binary for analysis.
aaaAnalyze All Automatically. Finds functions, symbols, etc.
aflAnalyze Function List. Shows all identified functions.
s <address/name>Seek to a specific address or function name (e.g., s main).
pdfPrint Disassembled Function. Shows assembly code.
pdgPrint Decompiled Ghidra. Shows decompiled C-like code.
afvAnalyze Function Variables. Shows local variables, arguments, and their stack offsets.

Additional Useful Commands

r2 CommandDescription
iShow general information about the binary (imports, exports, strings).
psPrint a summary of the binary’s sections.
VEnter visual mode for interactive navigation.
VVEnter visual graph mode to see the control flow graph.
? / ??Get help on commands.