When should you use it?
- You have a compiled program and no source
- Reading disassembly yourself is beyond you
- You can run a local analysis tool and an agent
Not for: Binaries you have no legal right to analyze; Large or heavily obfuscated targets you cannot verify
What do you need, and what do you get?
You need
- The binary to study
- Ghidra connected to the agent over MCP
- A plain-language question about the program
You get
- A description of what the program does
- The routes, libraries and layout it worked out
- Readable source reconstructed from the decompilation
How does it work, step by step?
- Bridge the tool to the agentConnect Ghidra so the agent can call it through MCP; any capable agent works.
- Ask in plain wordsTell it what you have and ask it to identify the program and its functions.
- Let it exploreAllow it to search strings, routes and libraries by itself rather than guiding each click.
- Request readable codeHave it turn the decompiled output back into source you can actually read.
- Check the weak spotsVerify routes and paths yourself, since a few came back subtly incorrect.
The prompt
Our own prompt, inspired by Huli and written to work in Claude Code and Custom agent. Values in lime are placeholders.
I have a compiled [language] binary and I am not experienced with reverse engineering. You have Ghidra available over MCP. Identify what this program is and what it does. Explore on your own: list its routes, libraries and inferred file structure, then reconstruct readable [language] source from the decompiled output. Flag anything you are unsure about rather than guessing silently.
Inspired by Huli: Using AI to Do Simple Reverse Engineering. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.
What can go wrong?
- Reconstructed routes had small errors; do not trust the rebuilt source without checking.
- A weaker model skipped parts lazily; a stronger one found more, including a planted vulnerability.
Our take
Huli's framing is the honest one: he is a beginner, says so, and the value is lowering the entry barrier rather than replacing an expert. Connecting a serious tool like Ghidra to an agent means a newcomer can ask plain questions, what does this program do and what functions does it have, while the agent handles the mechanics of navigating a disassembler. Letting it explore on its own before asking for readable code is a sensible order. The small route errors are the real lesson. Agents infer overall structure well but get specific details wrong, such as a path string or a parameter, so anything you rely on, particularly for security conclusions, needs checking against the disassembly or by running the program in an isolated environment. Never execute an unknown binary on your main machine. Reverse engineering also carries legal limits: analyze software you own, have permission to examine, or that falls under clear research or interoperability exceptions, and check license terms first. Keep notes of what the agent claimed and what you verified.
Where the time goes back: Work that was completely out of reach without deep skills becomes a guided conversation that produces readable output in an afternoon.
FAQ
Do I need to know reverse engineering?
Is the rebuilt code exact?
Source and credit
Inspired by Huli. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.
- Inspired by
- Using AI to Do Simple Reverse Engineering
- Creator
- Huli
- Published on
- blog.huli.tw
- Original date
- Mar 1, 2026
- License
- Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
- Originally for
- Custom agent
- AI dry run
- Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.