Creative Coding

The Spy Agency Gave Away Its Reverse-Engineering Tool. The Retro-Hacking Scene Took It From There.

Ghidra was built inside the NSA over roughly two decades, then released as open source in 2019. Since then it's become the tool a community of hobbyists uses to dump Game & Watch firmware, patch NES ROMs, and get DOOM running on hardware that was never meant to run anything but Mario.

In January 2019, the NSA announced it was giving away a piece of software it had spent roughly two decades building internally. Ghidra is a reverse-engineering suite — a tool for taking a compiled binary with no source code attached and turning it back into readable, labeled, navigable logic. The agency unveiled it at the RSA Conference that March and published the source code on GitHub a few weeks later under the Apache 2.0 license. Four years on, the NSA’s own account of the release called it a catalyst for open-source engagement well beyond anything it had anticipated.

What’s actually interesting about Ghidra in 2026 isn’t the spy-agency backstory — it’s what a loose community of hobbyists has quietly built on top of it since. Security researchers use Ghidra to pick apart malware, which is the use case it was built for. But a parallel, much less covered scene has adopted it as the standard tool for a completely different kind of work: taking apart old game hardware, understanding exactly how it ticks, and making it do things it was never designed to do.

What Ghidra actually does

A compiled program — a game cartridge’s ROM, a device’s firmware, a piece of malware — is just machine code: raw instructions for a specific processor, stripped of the variable names, comments, and structure a human wrote. Ghidra’s core job is disassembly and decompilation: translating that machine code back into assembly, and then into something closer to readable pseudo-C, letting you label memory addresses, trace function calls, and annotate what each piece of the binary is actually doing. It’s commonly described as a free alternative to IDA Pro, the long-standing commercial tool for the same job, and its decompiler core is written in C++ with a plugin system that takes Java or Python extensions — which is the hook the hobbyist scene has pulled on hardest.

The retro-hacking scene that grew around it

The clearest example of Ghidra crossing over from security research into creative hardware hacking is Thomas Roth — a German security researcher who publishes as “stacksmashing” on YouTube and “ghidraninja” on GitHub. His GitHub profile is a working library of Ghidra-based projects aimed squarely at old game hardware: game-and-watch-backup, for dumping and restoring the firmware on Nintendo’s revived Game & Watch handhelds; a companion game-and-watch-hacking repo; and a dedicated ghidra_scripts collection built specifically for working the device’s dump apart in Ghidra once you have it.

That work fed directly into one of the more memorable stunts in recent retro-hacking: getting DOOM running on the 2020 Super Mario Bros. Game & Watch — a device with no business running a 1993 PC shooter. Roth and collaborator Konrad Beckmann reverse-engineered the device’s pin connections and firmware from scratch using Ghidra, then wrote custom code to get the port running, trading away textures, sound, and resolution to make it fit. Hackaday covered the result in November 2020, and followed up weeks later with a guide to unlocking the device more generally once the method was understood — evidence that a single reverse-engineering effort, done once and documented, turned into a repeatable technique other people picked up.

The same pattern shows up around actual game ROMs. GhidraNes, built by developer Kyle Lacy, is a Ghidra extension purpose-built for disassembling NES cartridges: it imports ROMs in the standard iNES format, maps each memory bank into Ghidra’s workspace, and recognizes a long list of real cartridge mapper chips (MMC1, MMC3, UxROM, and the VRC series among them) — though bank switching, one of the trickier parts of how NES games address memory, still has to be traced by hand in the disassembly rather than solved automatically. And on Roth’s own GitHub, a second ghidra_scripts collection built for Nintendo’s Game Boy includes a script that exports a working, playable ROM straight out of a Ghidra project once you’ve imported it with a companion Game Boy plugin — turning Ghidra from a read-only analysis tool into a two-way bridge for actually modifying how an old cartridge behaves.

None of this is Ghidra being used the way the NSA built it to be used. It’s a free, general-purpose disassembler getting pointed at 8-bit and 16-bit hardware by people who want to understand — and sometimes rewrite — exactly how a 30-to-40-year-old piece of consumer electronics works under the hood, with results published as open-source repos anyone else can build on.

Why the open-source release mattered beyond security

The decision to open-source Ghidra wasn’t casual — reporting at the time described a prepublication review process in which two separate reviewers checked every line of code before release. The payoff wasn’t confined to the security industry it was built for: the firmware project Coreboot adopted Ghidra for its own reverse-engineering needs within months of the release, an early sign the tool would find users well outside its original intended audience. The retro-hacking scene is the same pattern playing out a few years later, just with Nintendo handhelds instead of bootloaders.