Tooling#

The everyday toolbox for writing, reading, and debugging machine code.

Disassemble#

$ objdump -d -M intel prog
$ objdump -d -M intel -j .text prog
$ ndisasm -b 64 prog
$ readelf -a prog

Debug#

$ gdb ./prog
$ gdb -tui ./prog
$ gef --args ./prog
$ pwndbg ./prog

Reverse-engineering platforms#

Tool

Notes

radare2

Open-source RE framework; CLI + r2pipe automation.

rizin

Friendly fork of radare2; ships with the Cutter GUI.

ghidra

NSA’s open-source decompiler + SRE platform; great UI.

ida

Industry-standard commercial disassembler / decompiler.

binary ninja

Commercial; strong API for analysis plugins.

hopper

macOS / Linux commercial disassembler.

Static / dynamic analysis#

  • strings, pull printable text out of a binary.

  • nm, list symbols.

  • ltrace / strace, trace library / syscall calls.

  • perf, CPU profiler with hardware-counter samples.

  • valgrind, memory error detection (Memcheck) and call profiler (Callgrind).

  • Compiler Explorer, compile and diff assembly across compilers, languages, and flags.

References#

  • binutils, as, ld, objdump, nm, readelf.

  • pwntools, exploit-dev framework with shellcode helpers.

  • O, objdump, od, etc. in the command reference.