Skip to content

Research note 008

Ghidra and the Double Edge of Reverse Engineering

What Ghidra is, why the NSA built it and gave it away, why it's indispensable to defenders — and why the same capability demands judgment about how it's used.

10 min read

Every piece of software you run arrived as a compiled binary — machine code, stripped of the names and comments and structure the developer worked in. The source is gone; what’s left is instructions for a processor. Reverse engineering is the craft of walking that backwards: taking the binary and reconstructing enough of its logic to understand what it actually does.

For a long time, doing that well required expensive, specialized tooling. Then, in 2019, one of the best reverse-engineering platforms in existence became free. This is what Ghidra is, why it exists, why it matters to the people defending systems — and why a tool this powerful is worth thinking carefully about.

What Ghidra actually does

At its core, Ghidra takes a compiled program and makes it legible to a human.

The first step is disassembly: translating raw machine code back into assembly instructions — the low-level operations the processor executes. Assembly is faithful but painful to read; a single line of original source can become dozens of instructions. So Ghidra’s headline feature is its decompiler, which goes a step further and reconstructs the assembly into readable, C-like pseudocode. It won’t recover the original variable names or comments, but it will show you the structure — the loops, the conditionals, the function calls, the data being moved around. Reading pseudocode instead of raw assembly is the difference between skimming a paragraph and decoding Morse.

Around that, Ghidra does a great deal of automated analysis: identifying where functions begin and end, mapping which parts of the code call which others (cross-references), recognizing data structures, and letting the analyst rename things, annotate, and build up an understanding interactively. It handles many processor architectures and binary formats, which is why it’s used on everything from desktop applications to firmware pulled off embedded devices. For mobile work the ecosystem extends further — tools like Hopper are commonly reached for on iOS .ipa / Mach-O binaries, filling the same role in an Apple-centric workflow.

The essential thing to understand is that none of this breaks anything. Ghidra doesn’t defeat a protection or exploit a flaw. It does one neutral thing extraordinarily well: it turns an opaque binary into something a person can read and reason about.

Why it was built — and given away

Ghidra was developed by the United States National Security Agency, which used it internally for years before releasing it publicly, as open source, at the RSA security conference in 2019.

That release mattered because of what came before it. Professional-grade reverse engineering had long been dominated by one commercial tool: IDA Pro, from Hex-Rays. IDA is, by wide agreement, an extraordinary piece of software — its Hex-Rays decompiler is still considered best-in-class by many practitioners, it supports an enormous range of processor architectures, and it’s deeply extensible through scripting and plugins, which is why it became the backbone of serious malware and vulnerability research for decades. It is also expensive, historically running into the thousands of dollars per license — which put that level of capability out of reach for students, independent researchers, and smaller security teams. When the NSA open-sourced a platform with a first-class decompiler and no license fee, it effectively democratized the field: the capability that had been a professional’s privilege became available to anyone willing to learn. IDA remains the tool many experts reach for; Ghidra is what made the craft accessible to everyone else.

The motivations attributed to the release are the usual mix — reducing duplicated effort across the community, standardizing tooling, goodwill, and, not least, recruiting: a generation of security professionals learning on the agency’s own tool is not a small thing. Whatever the balance of reasons, the effect was unambiguous. Ghidra lowered the barrier to reverse engineering for everyone at once — which is exactly why its story is inseparable from the question of who “everyone” includes.

Why it’s indispensable to defenders

Put a professional decompiler in the hands of the people protecting systems and it becomes one of the most important tools they have.

Malware analysis is the clearest case. When a new piece of malware appears, defenders need to know what it does — what it targets, how it spreads, what it exfiltrates, how to detect and remove it. The malware author obviously didn’t ship source code or documentation. Reverse engineering is how that understanding is produced, and it feeds directly into detection signatures, incident response, and threat intelligence.

Vulnerability research is another. Finding and fixing flaws in software — especially closed-source or legacy software where you can’t just read the code — often means analyzing the binary. Responsible researchers use exactly these tools to find vulnerabilities so they can be reported and patched before someone malicious finds them first.

The list goes on: understanding undocumented firmware in IoT and embedded devices, verifying that a proprietary component does what it claims, achieving interoperability with a closed system, and analyzing the client-side software that products ship to untrusted devices. In every one of these, the defender is in the same position as the adversary — facing an opaque binary — and reverse engineering is what levels the ground.

The double edge

Here is the uncomfortable symmetry: every capability above works just as well pointed the other direction.

The same decompiler that lets a defender understand malware lets an attacker understand a target’s defenses. The same analysis that finds a vulnerability so it can be patched can find one so it can be exploited. The same ability to read the client software a product ships lets someone recover the logic — and sometimes the secrets — that product’s designers hoped to keep hidden.

I’ve seen how thin that margin can be. I once opened a widely-deployed commercial security SDK in a decompiler expecting a fight, and instead found the routine at the heart of the whole integration sitting there unstripped, its symbol name spelling out its exact purpose, the largest function in the binary. It took minutes to locate the thing the entire design was built to protect. The lesson wasn’t that one vendor was careless — it’s that this is the default outcome of trusting the client. Any logic you ship to a device is legible to that device’s owner, and no tool needs to be exotic to reveal it.

So is Ghidra dangerous? The honest answer is that understanding is dangerous in the way all knowledge is: it’s neutral in itself and consequential in use. The tool doesn’t decide anything. What matters is the two things wrapped around it — what the person does with the understanding, and what the person who built the target assumed about who could read it.

The next escalation: AI in the loop

Reverse engineering has always been gated by skill. Reading decompiled output, recognizing patterns, reconstructing logic from obfuscated code — these take years to learn, and that learning curve was itself a kind of protection. That gate is now being lowered by large language models, and it’s worth understanding both halves of what that means.

On the defensive side, the pairing is genuinely powerful. Models are increasingly good at reading decompiled pseudocode, explaining what a function does, proposing meaningful names for stripped variables, and summarizing large, unfamiliar codebases. Tools that connect a model directly to the disassembler — the open-source GhidraMCP being the best-known, wiring Ghidra into an assistant over the Model Context Protocol — let an analyst ask in plain language and have the model drive the tool: decompile this, trace that call, explain this routine. For a defender triaging malware or auditing firmware, that compresses hours of tedium into minutes.

But the same compression lowers the barrier for everyone, including people who couldn’t have done the work themselves. A task that used to require an experienced reverse engineer can increasingly be attempted by someone who just asks a capable model to do it — which is precisely why people try to trick those models. Responsible models refuse to assist with clearly malicious reverse engineering, so a persistent genre of effort goes into getting past that refusal: disguising intent, fragmenting a task into innocent-looking pieces, dressing an attack up as research. (I won’t detail those techniques here — the point is that the pressure is real and constant.)

This makes the model itself a surface worth defending, for the same reasons as any other part of the stack:

  • Guardrails can’t be the only defense. A refusal is one layer, and like any single layer it gets probed and sometimes bypassed. The systems around the model — provenance, monitoring, and access controls on capable integrations like an MCP-connected disassembler — matter as much as the model’s own judgment. Defense in depth applies to AI exactly as it does everywhere else.
  • Tool access is privilege. Wiring a model into a disassembler, a shell, or any powerful tool grants it real capability; that connection deserves the same care as any privileged integration — scoped, logged, revocable.
  • The skill floor is dropping, so assume more capable adversaries. Just as auto-labeling made CAPTCHA solvers cheap, AI assistance is putting reverse engineering within reach of people who couldn’t do it unaided. Threat models that quietly assumed “this attack needs a specialist” are due for revision.

The through-line with everything above is unchanged: the tool — Ghidra, a language model, the two wired together — is neutral and increasingly powerful. What decides the outcome is the judgment of the person using it and the care of the people building the systems it can be turned against.

What to actually take from this

Two conclusions fall out, one for each side of the tool.

If you build software, assume it will be read. This is the non-negotiable design lesson, and it’s the one that “the wrong hands” argument usually gets backwards. Reverse engineering tools existing is not the threat; designing as though they don’t is. Security through obscurity fails precisely because Ghidra and its kin are free and excellent now. Don’t put a secret you can’t afford to lose in a client binary. Strip your symbols, yes — but more importantly, don’t rely on the client being unreadable, because it isn’t. If a signal or a check matters, it has to be corroborated somewhere the user doesn’t control. The reverse engineer who reads your binary is doing you a favor by proving what an attacker would have found anyway; the design should already assume it.

If you wield the tool, the responsibility is yours, not the tool’s. The line between researcher and liability was never about what you can see — with tooling this good, capable people can see almost anything. It’s about what you do next. Finding a weakness and reporting it so it can be fixed is research. Finding it and quietly weaponizing it is not. The same afternoon’s work sits on either side of that line, and the tool is identical in both hands. The skill is common enough now that it’s no longer the thing that distinguishes people. Judgment is.

Ghidra democratized understanding. That’s an unambiguous good for the people defending systems, and it’s a permanent fact for the people building them. The interesting question was never whether the software should exist. It’s what each of us does once we can read.


This is a conceptual overview of reverse-engineering tooling and its ethics. It contains no techniques, targets, or steps for defeating any specific system, and the anonymized example above describes a general design failure, not an exploit.