Skip to content

The Neighbours

Ghidra is not the only tool on this street, and for small questions it is not even the quickest. This chapter covers the quick-look tools first — with real output from the specimen — then surveys the other serious workbenches, from their own documentation (documented).

The quick-look shelf

Every Unix-like system carries the binutils set, and four of its members answer most first questions in a second each. All four outputs below are real, from the build machine (binutils 2.42) against the specimen.

file — what is this thing at all:

gatekeeper: ELF 64-bit LSB pie executable, x86-64, ...
    dynamically linked, ..., not stripped

That last phrase, not stripped, is the answer to the question chapter 7 explored — and file on the twin says only stripped. Always the first command.

strings — the text, with no addresses and no understanding: the lighthouse note, the usage line, and the gate verdicts all appear, mixed with the symbol names and section names of the file. Chapter 9's Defined Strings window is this, civilised — with addresses and references attached.

nm — the symbol table itself: main marked T (a defined text symbol), scramble a lowercase t (the same, but file-local). Run on the stripped twin, nm answers no symbols — the cleanest demonstration there is of what stripping removes.

objdump -d — a disassembler with no project, no decompiler, and no memory. Its reading of check_code is the same fifteen instructions as chapter 5's, wearing the other common dialect (AT&T syntax — operands reversed, registers wearing %) and the file's own addresses:

11b4:  call   1169 <scramble>
11b9:  cmp    $0x191b2,%eax
11be:  jne    11c7 <check_code+0x27>

Note the kindness in passing: because the symbol table exists, objdump annotates the call with <scramble> for free. For a quick question — what does this one function compare against? — objdump plus grep can beat launching any workbench. What it cannot do is everything after the question: no decompilation, no references to follow, no names of your own, no project that remembers. readelf completes the shelf for ELF structure (headers, sections, the entry point — the specimen's is 0x1080, the _start of the function list).

And one neighbour of a different kind: gdb, the debugger, is the dynamic counterpart this guide scoped out in chapter 1 — it answers "what does it do this time" where everything here answers "what can it do". The two crafts share vocabulary and little else.

The other workbenches (documented)

  • radare2 and rizin. Command-line-first frameworks in Ghidra's problem space: disassembly, analysis, and scripting from a dense text interface. rizin is the community fork of radare2, and Cutter is its graphical front end. Powerful, scriptable, beloved by people who live in terminals; the learning curve is the steepest here and the decompiler story is younger than Ghidra's.
  • Binary Ninja. A commercial workbench whose calling card is its intermediate languages — it lifts machine code through several levels of representation, which makes some analyses (and its automation API) notably clean. Paid, with a limited free tier; many professionals' daily driver.
  • IDA Pro (and IDA Free). The field's oldest name: a commercial disassembler with decades of processor coverage and a decompiler (Hex-Rays) sold alongside it. IDA Free is the no-cost edition with a reduced processor set. If a workplace has one standard tool with thirty years of folklore attached, it is this one.

Choosing honestly: for learning the craft and for serious static analysis without a budget, Ghidra's combination of a real decompiler, a real project model, and a zero price is why this guide is about it. For a one-function question, objdump is faster. For automation-first work at scale, each of the above has its partisans for defensible reasons — and the reading skills transfer between all of them, because the machine code underneath doesn't care which window you read it in.

Check: the shelf has done its job when the first four commands are reflexes — file, strings, nm, objdump -d — run before any workbench is opened, and the workbench is opened when the questions get bigger than the answers they give.