ELEG 467/667

Pentesting & CTF's

View on GitHub

Radare 2

Running Radare

r2 -Ad binary_here

The -A option will analyze the binary. The -d option wil run and debug the binary. Use –help to see other options.

$ rabin2 -I megabeets_0x1
havecode true
*pic      false*
*canary   false*
*nx       false*
crypto   false
va       true
intrp    /lib/ld-linux.so.2
bintype  elf
class    ELF32
lang     c
arch     x86
bits     32
machine  Intel 80386
os       linux
minopsz  1
maxopsz  16
pcalign  0
subsys   linux
endian   little
stripped false
static   false
linenum  true
lsyms    true
relocs   true
rpath    NONE
binsz    6220

This is the same as running the i command in radare.

Useful Radare Commands

The commands in Radare are intuitively named/abbreviated. For example, the i command displays the file info, commands starting with p deal with printing, and commands starting with d deal with debugging. The main issue you will run into is that there are so many things you can do in radare, it will be hard to remember all of the commands. This is where ? becomes super useful. The ? command on its own will display all of the base commands you can use, as well as their descriptions. Including it after a command will show additional command options and descriptions. For example running d? will show all the debugger commands.