radare2 Reverse engineering toolkit
Light · Postcard
102 × 152 mm · PDF
Dark · Postcard
102 × 152 mm · PDF
Ink saver · Postcard
102 × 152 mm · PDF
Light · A4 landscape
297 × 210 mm · PDF
Dark · A4 landscape
297 × 210 mm · PDF
Ink saver · A4 landscape
297 × 210 mm · PDF
Light · A3 landscape
420 × 297 mm · PDF
Dark · A3 landscape
420 × 297 mm · PDF
Ink saver · A3 landscape
420 × 297 mm · PDF
Start here
r2 -A <file>
afls mainpdfizaxt <addr>
VV<cmd>?Concepts
- Open r2 file
- Analyse functions, xrefs
- Inspect seek + print
- Patch or debug write, step
Open and analyse
r2 -A <file>
r2 -d <file>
r2 -q -c '<cmds>' <file>
r2 -a <arch> -b <bits> <file>
aaaaaaflafiafn <name> [addr]
axt <addr>
e <key>=<value>
Binary info
iIiziiieiSisilrabin2 -I <file>
rabin2 -z <file>
Seek and print
s <addr>s- / s+pdfpd <n>px [len]psp8 <len>pdc<cmd> @ <addr>
<cmd>~<text>
? <expr>fCC <text>Visual mode
VVVp / Ph j k lEnteru / Ugc;x / X:_s / SqSearch
/ <text>/i <text>/x <hex>/c <asm>/R [filter]//Write and patch
wx <hex>wa <asm>wao nopw <text>oo+Debugger
ood [args]dcdcu <addr>
db <addr>db -<addr>
dbds [n]dsodcrdcsdrdr <reg>=<val>
drrdbtdmr2 -d <pid>
r2 -D gdb gdb://<host>:<port>
Companion tools
rasm2 -a x86 -b 64 '<asm>'
rasm2 -a x86 -b 64 -d <hex>
radiff2 -C <a> <b>
radiff2 -g <sym> <a> <b>
rax2 <expr>
rax2 -e <n>
Recipes
rabin2 -I ./a.outr2 -A ./a.outiz~httpafl~mains main; pdf
iz~password# note the vaddr, say 0x00402010axt 0x00402010s <caller>; pdf
r2 -w ./a.outs <addr_of_jne>wao noppd 3q
r2 -d ./a.outdb maindcdrpxr 64 @ rspdso



