AiIntermediate

Reverse Engineering with AI Agents: REA and the New RE

DeveloperHat Team
22 min read

TL;DR

REA gives coding agents 50 reverse-engineering tools over MCP. How the investigation loop works, what it can and cannot prove, and where the law draws the line.

Reverse engineering used to be a craft with a very small doorway. One expert, one disassembler, one binary, and weeks of patient manual work. You opened a program in Ghidra or Hopper, stared at assembly and pseudocode, formed a hypothesis about what a function did, and slowly built a mental model of a system its authors never documented for you. Understanding someone else's compiled code is genuinely hard: the names are gone, the types are gone, the comments are gone, and what remains is a machine's-eye view of decisions a human made months or years earlier.

REA — short for "Reverse Engineer Anything" — does not change that difficulty. What it changes is who can do the work, and how it is organised. REA is one MCP server and command-line tool, published as morluto/rea under an MIT licence and created on April 14, 2026, that connects a coding agent to reverse-engineering tools. The agent asks questions about a local target, REA inspects and traces that target, and the results come back carrying the evidence and the limitations behind each conclusion. The agent then uses those results to explain, implement, or test. The numbers around it are large — 482,690 GitHub stars and 117,145 forks as of November 29, 2026, with the README celebrating passing 400,000 stars; npm package rea-agents at version 6.8.0, released October 25, 2026; listed in the official MCP Registry as io.github.morluto/rea; a Discord community of more than 50,000 members. Those figures say something real about attention, and nothing about whether the tool is right for your problem. This article covers how the loop works, what it can and cannot prove, and where the boundaries sit.

The agent asks, REA inspects, the evidence answers Agent asks a question how does search work? REA MCP server 50 tools · local Analysis engines Hopper · Ghidra · IDA Native binaries pseudocode + assembly JS / Electron / .NET modules + boundaries Evidence v2 every claim sourced REA is not a model or a decompiler — it plugs the agent into tools that already exist.

What REA Actually Is

REA is not a language model, and it is not a new decompiler. That is the most common misunderstanding about the project, and it shapes every judgement that follows. REA connects a coding agent to tools that already exist. For native binaries, decompilation returns pseudocode and assembly via Hopper, Ghidra, IDA or Kuna. For JavaScript and .NET, static inspection needs no native engine at all. For behaviour that only shows up at runtime, REA can capture recorded runtime and network activity. The agent is the investigator; REA is the set of instruments on the bench. The repository is at github.com/morluto/rea.

The project describes itself as one MCP server plus a CLI. MCP — the Model Context Protocol — is the interface through which a coding agent discovers and calls tools, so an agent that already knows MCP can call REA's tools without a bespoke integration. The CLI, published as the rea-agents npm package, installs, configures, updates, and runs the server, and can also run a single analysis directly from the terminal. What it covers is broad: native binaries, JavaScript and Electron apps, websites, .NET assemblies, Android apps, firmware, and recorded runtime and network activity. That covers most artefacts a working engineer meets. Breadth is not the same as depth in every area; expect the native-binary path to be the most developed and the newer surfaces thinner, and evaluate that on a small, lawful target first.

Two properties deserve attention. First, analysis runs locally: the target is not uploaded to a hosted service, so the binary stays on your machine. That does not mean nothing leaves your machine — the agent's model provider has its own data policy for whatever the agent sends to the model, and if the target is sensitive, that is the thing to check first. Second, REA does not claim to recover original source code, or to automatically clone an application. Decompilation returns pseudocode — a readable reconstruction of what the machine code does, not the source a human wrote. Names, comments, and original structure are gone, and no tool can bring them back. The consequence is a shift in who does what: the agent holds the hypothesis and the tool calls, and the human holds the judgement — is this evidence sufficient, does it match the recorded behaviour, is it safe to act on? Fifty tools can generate fifty plausible-sounding explanations, and plausibility is not proof.

How the Investigation Loop Works

The loop has four stages, and it repeats. First, the agent asks a question about a local target — what does this function do, where does this value come from, how does this feature reach the network? Second, REA inspects and traces the target and returns results. Third, those results carry the evidence and the limitations behind each conclusion: which bytes were examined, which calls were observed, what was not observed. Fourth, the agent uses the results to explain, implement, or test, and follow-ups loop back to the tools. Nothing in that cycle is magic; its strength is that it is a cycle at all.

Compare that with the manual workflow it replaces, where a human forms hypotheses and tests them by hand: open the function, read the pseudocode, check the cross-references, set a breakpoint, run the target, watch the registers. Each step costs attention. The agent loop automates the mechanics — the tool call, the extraction, the summarising — and spends its attention on choosing the next question. That is a genuine gain when the questions are good, and a genuine amplifier of error when they are not: an agent that asks the wrong question fifty times converges on a confident-sounding wrong answer with fifty citations. For native code, the engines are Hopper, Ghidra, IDA and Kuna: setup can install Hopper with your approval, while the others use your existing installs. Static JavaScript and .NET inspection needs no native engine and never runs the application. Runtime capture is the opposite — it runs the target under your user account, which is why the sandboxing and authorisation questions later are not optional extras.

The loop also has a memory. REA's Evidence v2 records make an investigation reproducible and exportable: not just a chat transcript, but a record of what was inspected, what was found, and what the limits were, in a form that can be re-run, shared, and checked. A manual session produces notes a second person cannot easily verify; an evidence-backed session produces a record they can replay. One limit: evidence records what was observed, not what was not observed. A function never executed during a runtime capture leaves no trace, and an absent trace is not evidence of absent behaviour. A good agent will say that; a bad one will treat the absence as a finding. The investigation is only as good as the agent driving it, and the same discipline applies to the agent features around the loop, which is why MCP Tasks, Elicitation & Skills is worth reading alongside this piece.

The investigation loop, layered — evidence at the bottom Agent — Claude Code · Codex · Cursor REA MCP server — 50 tools, one contract Investigation loop — ask, inspect, trace, ask again Analysis engines — Hopper · Ghidra · IDA · Kuna Targets — binaries · JS · .NET · Android · firmware Evidence v2 — reproducible, exportable record Every conclusion carries its evidence and its limits — that is the innovation.

What REA Can Inspect — and What It Cannot Prove

A native binary is the classic case. You get pseudocode and assembly from a decompiler engine, cross-references, strings and constants, and — with runtime capture — observed behaviour: which functions ran, in what order, with what inputs and outputs. That is enough to answer "how does this program compute this value" with real confidence, provided you test the answer. It is not enough to answer "is this binary safe": REA cannot prove a binary is safe, because safety is a property of all possible behaviours, and no finite set of inspections can cover all of them. An agent that tells you a binary is safe has gone beyond its evidence.

JavaScript and Electron apps are a friendlier problem in some ways. Static inspection needs no native engine and never runs the application, so you can map the structure — which modules exist, which functions call which, where data flows — without the risk of execution. Electron apps add a layer worth understanding: a preload script, an inter-process communication bridge, and a main process, each with its own privileges. Tracing a feature through that bridge is exactly the kind of question the agent loop is good at. The showcase on the project site traces the Notion Electron clipboard bridge through preload and IPC into the main process: the interesting fact is not what one function does, but how data moves across a trust boundary. Websites are similar — the client code is delivered to the browser — and a website investigation is one of the best first targets, because the evidence is easy to verify by hand.

.NET assemblies, Android apps, and firmware each add their own texture. A .NET assembly carries richer metadata than a native binary, so static inspection can recover more structure. An Android app adds the question of how the app talks to the system and the network, which is where runtime and network capture earn their keep. Firmware adds the constraint that you may not be able to run the target at all, so static analysis carries more weight — and its limits, what the code could do versus what it was observed to do, matter more. A static inspection tells you what code exists, a runtime capture tells you what code ran with what data in a particular session, and a network capture tells you what left the machine — different kinds of facts. If you want to know whether a feature sends data to a server, static inspection can tell you the code exists; only a capture can tell you it ran. The strongest investigations combine both, and the weakest mistake one for the other. When an agent presents a runtime observation as a static guarantee — "this function never sends data" on the basis of one session in which it did not — that is the moment to intervene.

Three Ways to Learn How Software Works

There are, broadly, three ways to learn how a piece of software works, and REA only makes sense in comparison with the other two. The first is to read the source, when you have it. That is the gold standard, and nothing in this article is an argument against it. Source code has names, types, comments, history, and tests; it tells you what the author intended, not just what the machine does. If you have lawful access to the source, read it. The comparison that follows assumes the source is unavailable, which is the situation reverse engineering exists for. The second way is manual reverse engineering with a tool like Ghidra or Hopper: an expert, a disassembler, and weeks of work. Its strengths are real. A skilled human builds a deep, contextual understanding — not just what each function does, but why the program is shaped the way it is. Manual RE is also the most honest about its own limits, because the engineer feels the uncertainty directly. Its weakness is speed and scale: it does not parallelise well, it produces no shareable evidence record by default, and it demands rare skills. For a small, high-stakes target — a single cryptographic routine, a single protocol implementation — manual RE by an expert remains the right choice.

The third way is agent-led reverse engineering with REA. Its strength is the loop: the agent asks many questions quickly, calls the right tool for each, and keeps a running evidence record. It is good at breadth — mapping a feature across modules, tracing data across a process boundary — and at producing a record someone else can check. Its weaknesses mirror its strengths: it can move faster than its own understanding, producing confident summaries of code it has only skimmed, and mistake a partial trace for a complete picture. It depends entirely on the tools underneath and the questions it is asked.

Reading the source is fastest and most reliable when the source is available, and irrelevant when it is not. Manual RE is deepest and most trustworthy for a narrow, high-stakes question, and slowest and least scalable for a broad one. Agent-led RE is broadest and fastest for exploration and mapping, and riskiest when its conclusions are taken as proven rather than as hypotheses to test. The honest recommendation is to match the method to the question. Need to understand a single routine well enough to reimplement it? That is manual RE, possibly with REA to find the routine and draft its behaviour. Need to map a feature across an unfamiliar application? That is REA's home ground. Need to decide whether a binary is safe in production? None of the three answers that on its own. Who each option is for follows from that: if you already read assembly, REA is a force multiplier for the boring parts — finding the function, extracting the pseudocode, tracing the callers, keeping the record. If you have never done reverse engineering, it lowers the entry cost dramatically, but also lowers the cost of being wrong confidently — so the verification discipline below is not optional for you. It is the whole job.

What are you trying to learn from the binary? What is the question? feature · safety · rebuild How a feature works REA + agent, evidence first Is this binary safe? sandbox + REA, never blind Rebuild it in my stack findings → tested rebuild Lawful target only authorisation first Verify vs original rebuild tested, not trusted Document evidence Evidence v2 export REA recovers understanding, not source code — the rebuild still has to be tested.

The Evidence Model Is the Real Innovation

It is easy to be impressed by the wrong thing about REA: fifty tools, a large star count, a Discord community of more than 50,000 members. None of those is the reason to take the project seriously. The reason is the evidence model — specifically Evidence v2, the record format that makes an investigation reproducible and exportable. Before it, reverse engineering meant an expert's notebook, screenshots, and a memory of which functions were examined; a second engineer who wanted to check the work had to redo it. Evidence records turn an investigation from a performance into an artefact — something that can be re-run, inspected, and challenged.

A record contains, in substance: what was inspected, what was found, and what the limits were — which target, which version, which tools, which functions, which traces; what each tool returned; what the agent concluded, and — crucially — what it did not conclude, because the evidence did not support it. That is the difference between a record and a transcript: a transcript tells you what was said, a record tells you what was shown and where the showing stopped. If the record shows a function was decompiled, you can examine it yourself. If it shows a runtime capture of a single session, the claim is bounded by that session. If it shows nothing for a claim, the claim is unsupported, however confidently phrased.

Reproducibility is the practical payoff: an investigation that can be re-run can be re-checked after the target changes or a second person disagrees. Exportability is the social payoff: a record can be attached to a bug report, a design document, or a security review, and the reader can follow the chain from claim back to observation. And there is a discipline that goes with this: never accept an agent's explanation without asking for the evidence behind it, and never accept evidence without asking what it does not cover. What functions were not decompiled? What paths were not executed? What inputs were not tried? An investigation that never asks those questions has mistaken coverage for completeness.

Setting Up REA Safely

Setup is straightforward, and the project has clearly spent effort making it so. The recommended path is a single setup command, which detects your agent, shows you the configuration changes it wants to make, asks for your approval, backs up your existing settings, and pins the exact version it installs. That sequence — show, ask, back up, pin — is good practice: it shows you the diff and waits. Read it: the configuration lists the tools your agent will be able to call.

npx rea-agents setup

The setup command supports a long list of agents, including Claude Code, Codex, Cursor, Gemini CLI, Windsurf, VS Code, GitHub Copilot CLI, OpenCode, Qwen Code, Kimi Code, Trae, and Grok Build. If your agent is on that list, use the setup path. If it is not, check the project documentation at rea.tools before improvising a manual configuration — a hand-written MCP entry pointing at the wrong binary is a quiet failure that looks like a working setup. There are two prerequisites. The first is Node.js: REA requires 22.x at version 22.19 or later, 24.x at 24.11 or later, or 26 and above. The second is the decompiler situation for native work: setup can install Hopper with your approval, while Ghidra, IDA and Kuna use your existing installs. If you plan to start with JavaScript or .NET targets, you do not need a native engine at all. Once setup is done, a global install (npm install --global rea-agents, then rea --help) lets you run REA directly, and rea update keeps it current. Pinning the exact version at setup is good for reproducibility; updating deliberately is good for getting fixes. Avoid drifting — an unknown version, installed by an unknown path — because that is how investigations become unreproducible.

You can also run a single analysis directly, without involving the agent — a useful way to learn what the tools return before you let an agent loose on a target. The example below analyses a JavaScript application and returns JSON, taking an absolute path: relative paths and vague targets confuse agent investigations, and the CLI's insistence on an absolute path is a small discipline worth keeping when you prompt the agent later.

npx -y rea-agents@latest analyze-javascript-application /absolute/path/to/app --json

Before you run any of this on a real target, do the safety checks. Static JavaScript and .NET inspection never runs the application, but runtime capture runs the target under your user account — do not capture a target you have not already inspected statically, and do not run it outside a sandbox you trust. The companion piece on Securing AI agents: sandboxing options covers the sandboxing choices in detail, and it is worth reading before your first capture rather than after a surprising one. The second check is about data: analysis runs locally and the target is not uploaded, but the agent's model provider has its own data policy for whatever the agent sends to the model. The third check is authorisation — covered in full later — but the short version is that you should be able to state, in one sentence, why you have the right to inspect this target.

A First Investigation, End to End

The best way to learn REA is to run one small, complete investigation on a lawful target: the target is small, the question is narrow, you have the right to inspect it, and the verification step is built in. If you cannot satisfy all four, pick a different target. Good first targets are software you own or that is openly provided for analysis: a small application you built yourself, an open-source Electron app installed locally, or a JavaScript application whose code you can already read. A small feature is the right scope: one calculation, one clipboard operation, one settings flow. The showcases on the project site are good models for scope, though more ambitious than a first run: one reconstructs a sound-pan calculation from DX-Ball, verified against 3,205 original-x86 cases and all 63 compiled function bytes; another traces the Notion Electron clipboard bridge through preload and IPC into the main process; a third recovers a DOS bullet-ring calculation from 16-bit instructions in TH04. Each is a single, well-bounded behaviour with a clear verification story. Your first investigation should be smaller than all three.

Write the prompt as if briefing a junior engineer, not chatting with a search engine. Name the target by absolute path, the single behaviour you want to understand, and the evidence you want back: which functions were examined, what the pseudocode showed, what was observed at runtime, and what was not examined. Name the limit explicitly: do not claim more than the evidence supports. That gives you a checklist to verify against when the answer comes back.

Investigate the sound-pan calculation in the local copy of DX-Ball at
/absolute/path/to/dx-ball, using REA. Tell me which functions you examined,
what the decompiled pseudocode shows for each one, and what you could not
determine from the evidence available. Do not claim the code is safe, and do
not present pseudocode as original source code. If you run the target, say
so, and say what you observed.

That example is modelled on the DX-Ball showcase: a rebuilt behaviour tested against recorded behaviour, case by case, byte by byte. You do not need 3,205 cases for a first investigation — a handful of known inputs and their recorded outputs, and a reconstruction that matches them, is enough. If it does not match, the mismatch is the most valuable part of the investigation. Never skip verification because the explanation sounded right; sounding right is not a test. When the answer returns, verify it in three passes, following the general pattern in Verifying AI agent actions. First, the evidence: did it name the functions it examined, and can you find them yourself? Second, the reasoning: does the explanation follow from the pseudocode or the trace, or leap from a partial observation to a general claim? Third, the limits: did it say what it did not examine, and avoid the two forbidden claims — that the code is safe, and that pseudocode is source code? If any pass fails, ask a follow-up targeting the gap and loop back through the tools. Keep the verification record with the investigation record: a reimplementation without one is an opinion about a binary; with one, it is engineering.

Reverse engineering sits on a legal boundary, and REA's own position is clear: the tool is intended for lawful reverse engineering research, analysis and reimplementation only, and users must obtain authorisation and follow the law. That is the condition under which the rest of this article's advice applies. If you do not have the right to inspect a target, do not inspect it — with REA, with Ghidra, or with any other tool. The agent does not check your authorisation for you. You do. What counts as authorisation depends on the target and the jurisdiction, and this article is not legal advice. But the practical shape is straightforward: do you own the target, or have permission to inspect it? Is it open-source, or provided for analysis? Are you working under a contract, a bug-bounty scope, or an employment duty covering this inspection? Is the purpose research, interoperability, security testing within an agreed scope, or reimplementation you have a lawful right to? If you can answer clearly, you are on solid ground. If the answer is "probably fine," stop and get a clear answer first — that is not authorisation. The tutorial at agentspulse.github.io is a useful walkthrough for a first setup, worth reading alongside the official documentation before you point the tool at anything sensitive.

There are also targets where the question is not only legal but practical. Safety-critical trust decisions are the clearest case. REA cannot prove a binary is safe, and no investigation that relies on it should be reported as if it had. Deciding whether to run a binary in production, trust a firmware image, or judge whether software handles sensitive data correctly needs more than an agent investigation — that is at most one input, and usually a small one. Those decisions need assurance work — code review where source is available, sandboxing, monitoring, and a threat model — that reverse engineering alone cannot provide. Using REA as a shortcut to a safety verdict is the most dangerous misuse of the tool, because it produces a confident-sounding answer to a question the tool cannot answer. Expecting source-code recovery is the second misuse to avoid: REA does not recover original source code, and it does not automatically clone an application. If your goal is to understand behaviour well enough to reimplement it lawfully, REA can help — but the reimplementation is your work, tested against recorded behaviour, and the evidence record is what makes it defensible.

A third category of "do not use" is simpler: do not use REA when the source is available and readable. Reverse engineering a binary you could have read is wasted effort, and produces a worse understanding than the source would have given you. When in doubt, the test is simple: can you state, in one sentence, why you have the right to inspect this target, and what you will do with what you learn? If you can, proceed, and keep the evidence record. If you cannot, do not proceed until you can. Write it down before you start — then run the practical first investigation the previous section describes: one small feature, one lawful target, evidence first, and let the verification, not the agent's confidence, decide what you believe.

Architecture Decision

Decision: Use REA as the investigation loop for understanding compiled software we have a lawful right to inspect, with Evidence v2 records as the deliverable and reconstruction-tested-against-the-original as the verification standard.

Context: We regularly need to understand software whose source is unavailable — a dependency's behaviour, a legacy binary, a client application we must interoperate with. Manual reverse engineering is deep but slow, and produces records that are hard to verify.

Options considered: Reading the source when available; manual reverse engineering with Ghidra or Hopper; agent-led reverse engineering with REA; and treating vendor documentation or an agent's unsupported summary as sufficient.

Why this one: REA keeps the agent's speed and breadth while attaching evidence to every conclusion, so a second engineer can re-run and check the work. Static JavaScript and .NET inspection never runs the target, and the local-analysis design keeps the binary on our machine.

What it costs you: You must still do the verification work yourself — the three-pass check on evidence, reasoning and limits, and a reconstruction test for any reimplementation. You must maintain the sandboxing and model-data discipline for runtime captures, and learn to read pseudocode well enough to check the agent's summaries.

When to reverse it: Reverse this decision if the target is one you have no right to inspect, if the question is a safety-critical trust decision REA cannot answer, if the source becomes available and readable, or if the evidence record repeatedly fails the three-pass check and manual reverse engineering proves more reliable for that target.

Why This Matters

Understanding the business and technical context helps you make informed decisions rather than blindly following patterns.

Trade-offs to Consider

Every architectural decision involves trade-offs. Consider your specific requirements, team expertise, and scale when evaluating options.

When NOT to Use This

Knowing when a solution doesn't apply is as valuable as knowing when it does. Consider alternatives for your specific situation.

Decision Framework

Use this framework to evaluate whether this approach is right for your use case based on your specific constraints and requirements.

Share this articleShare on XShare on LinkedIn

Keep the decision frameworks coming

One practical architecture guide a week — patterns, trade-offs, and when not to use them. No spam, unsubscribe anytime.