← Back to library

Read an unknown compiled program with an agent's help

Huli, describing himself as a reverse-engineering beginner, was handed a small compiled Go server and had no idea how to read it. After linking Ghidra to an agent through an MCP bridge, he simply asked what the program was. The agent explored by itself, listed routes and libraries and reconstructed readable source, though a couple of paths were slightly off.

  • OutcomeUnderstand an unknown compiled program when you barely know Ghidra, by letting an agent call it over MCP and explain what the code does.
  • SetupAn afternoon+
  • LevelAdvanced
  • CreditHuli
View original
Works with
Claude CodeCustom agent

Published Oct 23, 2026Updated Oct 23, 2026AI dry run on sample input: passed Oct 23, 2026Source verified Oct 23, 2026

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?

  1. Bridge the tool to the agentConnect Ghidra so the agent can call it through MCP; any capable agent works.
  2. Ask in plain wordsTell it what you have and ask it to identify the program and its functions.
  3. Let it exploreAllow it to search strings, routes and libraries by itself rather than guiding each click.
  4. Request readable codeHave it turn the decompiled output back into source you can actually read.
  5. 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.

Prompt0 variables
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?
No. The author could barely use the tool and still got a clear picture by letting the agent drive it.
Is the rebuilt code exact?
No. It is close and readable but had small mistakes, so treat it as a strong starting point.

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.

More in IT & Security

All 82 IT & Security playbooks →

Related playbooks

IT & SecurityWorkflow✓ AI dry run

Get consent first, then audit with a second agent

Have a different coding agent review your work in an isolated copy with editing turned off, and require it to ask before using any account or login.

Credit: u/Bulldagshunter on r/ClaudeCode

Under an hour
IT & SecurityWorkflow✓ AI dry run

Have the agent port your hooks when you switch tools

When moving from one coding agent to another, point the new agent at your old hooks folder and have it rebuild them as extensions.

Credit: esperent on Hacker News

Minutes
IT & SecurityWorkflow✓ AI dry run

Keep agent-built features in small, testable pull requests

Get reliable results from a coding agent by agreeing a plan, then having it deliver a feature as a series of small pull requests with tests, instead of one big autonomous run.

Credit: Christos Athanasiadis (@ckathanasiadis)

Minutes