radare2 cheat sheet
install radare2:
git clone https://github.com/radareorg/radare2
radare2/sys/install.sh
install plugins:
r2pm init
r2pm update # initialize and update the package database
r2pm install [pkg] # installs the package
r2pm search name # search for packages
for example:
r2pm install r2ghidra #r2ghidra the native ghidra decompiler plugin:
pdg
command
run:
~$: r2 ./file.bin
Append '?' to any char command to get detailed help
Help or evaluate math expression:
[0x08048890]> ? 0x16+6
Show info of current file:
[0x08048890]> i
find Entrypoint:
[0x08048890]> ie
Show main address:
[0x08048890]> iM
Strings in data sections:
[0x08048890]> iz
search for string 'foo':
[0x08048890]> / foo
grep output of commands for search 'foo':
[0x08048890]> i ~ foo
analysis:
[0x08048890]> aaa
perform additional experimental analysis:
[0x08048890]> aaaa
list functions:
[0x08048890]> afl
Seek to address:
[0x08048890]> s addr
disassemble N instructions:
[0x08048890]> pd N
disassemble function:
[0x08048890]> pdf
quit program:
[0x08048890]> q
soon...
soon...
soon...