Reverse Engineering with Radare2#
A powerful framework for reverse engineering.
Core Analysis Commands#
| r2 Command | Description |
|---|
r2 ./binary | Open the binary for analysis. |
aaa | Analyze All Automatically. Finds functions, symbols, etc. |
afl | Analyze Function List. Shows all identified functions. |
s <address/name> | Seek to a specific address or function name (e.g., s main). |
pdf | Print Disassembled Function. Shows assembly code. |
pdg | Print Decompiled Ghidra. Shows decompiled C-like code. |
afv | Analyze Function Variables. Shows local variables, arguments, and their stack offsets. |
Additional Useful Commands#
| r2 Command | Description |
|---|
i | Show general information about the binary (imports, exports, strings). |
ps | Print a summary of the binary’s sections. |
V | Enter visual mode for interactive navigation. |
VV | Enter visual graph mode to see the control flow graph. |
? / ?? | Get help on commands. |