Skip to content

What Ghidra Can't Do

A tool's limits chapter is where a guide earns its credibility, so here they are, plainly — several of them already met in passing, collected.

Decompiled is not the source. The decompiler rebuilds behaviour, not the program that was written. Names, comments, types, structure — whatever the binary didn't carry is invented or absent, and chapter 6's placeholders (param_1, undefined4, a shift spelled as * 8) are the honest face of that. The invention can mislead: a guessed type can make correct code look wrong, and a wrong guess about a calling convention can scramble a function's apparent arguments entirely. The Listing is the appeal court, always.

Optimised code fights back. The specimen was compiled at -O0, the setting that keeps code closest to its source. Production binaries are built with optimisation, which inlines functions into their callers, reuses registers across what were separate variables, and deletes code that provably does nothing. The decompiler still works — but the C it returns drifts further from anything a human wrote, and function boundaries themselves become judgements. Nothing in this guide's lab contradicts that; the lab just didn't ask you to meet it on page one.

Packed and obfuscated programs hide. Software can be compressed or encrypted in its own file and only become code as it runs — much malware is, precisely so that static analysis sees a wrapper and nothing else. Ghidra will faithfully analyse the wrapper. Recognising that the interesting program is not on the page — few strings, tiny imports, one strange section — is a skill; unpacking it is dynamic work, in an isolated lab, outside this guide.

Analysis can be wrong, confidently. Auto-analysis is heuristics all the way down. Code and data are interleaved in real binaries (jump tables are the classic case), and a byte range read as data hides code, or vice versa. Functions can be split, merged, or missed. The tool does not flag its uncertainty; the analyst supplies the scepticism, spot-checking the Listing (chapter 5) wherever a conclusion matters.

It doesn't run the program. Static analysis says what a program can do, on every path at once — and therefore can't tell you which path Tuesday's input took, or what a server answered. Ghidra ships a debugger for that half of the world; this guide scoped it out, and the limit stands: "the code permits it" and "it happened" are different claims, and only one of them is available here.

Scale is a real cost. Analysing the 16 KB specimen took 3 seconds once Ghidra was running. A multi-megabyte binary is a different animal: analysis measured in tens of minutes or hours, a project measured in gigabytes, and a decompiler that wants RAM to match. The 4 GB minimum in Ghidra's own requirements is a floor for starting, not a promise about your firmware image.

It is not a scanner. Ghidra will not tell you whether a program is malicious, vulnerable, or safe. It shows you the program; the verdict is yours. (Likewise it grants no rights: chapter 1's rule — your software, or software you have permission to examine — is not lifted by anything the tool can do.)

Check: the limits in one breath — Ghidra recovers what a program does, in the large, from evidence that can mislead, at a cost that grows with the program; it cannot recover what was never in the binary, see through deliberate hiding, or tell you what happened when the program ran. Within those lines, it is remarkably strong — which is why they are worth stating exactly.