- Reverse Engineer Anything (REA) is an open-source toolkit that lets AI coding agents inspect apps, websites, JavaScript, Electron packages and native binaries.
- Two interfaces: a local CLI for terminal users and an MCP Server for agent tool calls.
- Core principle: local analysis with evidence chains, not automatic source recovery.
- Agent support: works with Claude, Cursor, Codex, Gemini CLI, Windsurf and Devin.
- Fast start: run
npx rea-agents@latest setupto install and configure.
What Is Reverse Engineer Anything?
Reverse Engineer Anything (REA) is an open-source reverse engineering toolkit built specifically for AI coding agents. Through its CLI and MCP Server interfaces, an agent can analyze applications, websites, JavaScript bundles, Electron packages and native binaries — all locally on your machine, with reproducible investigation workflows and recorded evidence.
The project emphasizes three ideas that separate it from naive "AI decompilers":
- Local analysis — targets never leave your workstation.
- Evidence chains — conclusions must be linked to concrete functions, addresses, strings or traces.
- Reproducibility — every investigation can be re-run and reviewed by another researcher.
REA does not automatically recover original source code or clone proprietary software. It structures the investigation process so an AI agent can assist with analysis while a human validates the results.
Core Platform Overview
| Component | Purpose | Audience |
|---|---|---|
| CLI | Terminal commands: analyze, inspect, search, trace | Terminal users, automation scripts |
| MCP Server | Tool registry exposed to AI coding agents | Claude, Cursor, Codex, Gemini CLI |
| Setup / Doctor | Installation and environment diagnostics | All users |
| Evidence records | Tool-backed findings tied to addresses and traces | Investigators, reviewers |
Supported Target Types
| Target | What Gets Analyzed |
|---|---|
| Native binaries | Functions, strings, cross-references, call graphs, disassembly |
| Electron apps | ASAR archives, package.json, Main/Renderer/Preload processes, IPC |
| JavaScript | Bundles, source maps, module structure |
| Websites | Browser runtime behavior, loaded scripts |
| Android APKs | Package structure and resources |
Pick an interactive official case — Chrome Dino speed rules or the Windows Calculator percent behavior — to learn the workflow before tackling your own targets.
CLI Commands and MCP Setup
REA exposes two parallel entry points. The CLI serves terminal users directly, while the MCP Server lets a coding agent request narrowly scoped tool calls such as listing functions, finding strings or tracing cross-references.
Quick MCP Configuration
{
"mcpServers": {
"reverse-tools": {
"command": "node",
"args": ["/opt/reverse-tools/dist/index.js"],
"env": {
"REVERSE_WORKSPACE": "/analysis/workspace",
"PATH_ALLOWLIST": "/analysis/workspace/targets"
}
}
}
}
Command Reference
| Command | Category | Usage |
|---|---|---|
file <target> | Identification | Detect format, architecture, executable type |
sha256sum <target> | Evidence | Record digest before and after analysis |
strings -a -n 6 <target> | Static analysis | Extract printable strings with offsets |
objdump -d -M intel <target> | Disassembly | Generate assembly for executable sections |
gdb -q <target> | Dynamic analysis | Breakpoints, registers, memory inspection |
npx @modelcontextprotocol/inspector | MCP testing | Inspect a server's exposed tools |
Use the CLI for deterministic, scriptable stages and the MCP Server when the agent needs to choose and interpret tools itself. Most productive workflows combine both.
The Six-Step Reverse Engineering Workflow
A reliable investigation moves from low-risk observation to focused analysis and controlled validation. The agent coordinates tools and summarizes output; you stay responsible for validating behavior.
Identify the target and preserve the baseline
Determine file type, architecture, sections and imports. Record the SHA-256 hash and keep the original file read-only so every later step can be verified against an unchanged baseline.
Perform static analysis
List symbols and imports, extract strings, and map entry points — all without executing the target. Build an initial candidate list of functions worth investigating.
Locate functions and trace relationships
Search for references to selected strings or imports, then follow callers and callees to build a call relationship map centered on the behavior under investigation.
Run controlled dynamic analysis
Launch the target in an isolated environment, set breakpoints at candidate functions, and capture runtime evidence such as arguments, return values and memory state.
Test hypotheses
Compare static predictions with observed runtime behavior. Where a patch or behavioral change is proposed, apply the smallest controlled modification to a copy and document the difference.
Validate and report
Separate direct observations from interpretations, link each conclusion to an address or trace, and save the tool inputs and outputs so another researcher can reproduce the result.
The single biggest failure mode in AI-assisted reverse engineering is the agent guessing. Require tool-backed evidence for every conclusion — that is exactly what REA's evidence records are designed to enforce.
Tool Tier List
Tools rank differently depending on the investigation stage. A decompiler excels at broad static analysis; a debugger validates runtime behavior. The tiers below reflect workflow fit rather than personal preference.
| Tier | Tool | Primary Role | Automation | Best For |
|---|---|---|---|---|
| S | Ghidra | Integrated disassembly, decompilation, cross-references | High | Binary triage, call graphs, large projects |
| S | GDB | Interactive runtime debugging | High | Validating branches, memory and register inspection |
| A | LLVM toolchain | Compiler infrastructure, binary utilities | Very high | Automated disassembly, format-aware pipelines |
| A | GNU binutils | CLI symbol, section and string inspection | Very high | Fast triage, scriptable reports |
| B | Custom Python scripts | Task-specific parsing and correlation | Very high | Repeatable extraction, agent-facing JSON |
| B | AI-assisted analysis | Explanation and hypothesis generation | High | Decompiler explanation, investigation planning |
Ghidra
- Best overall static platform
- Scriptable and project-based
- Foundation for cross-reference exploration
GDB
- Runtime validation layer
- Breakpoints, watchpoints, scripted sessions
- Confirms or refutes static hypotheses
Binutils + Scripts
- Fast first-pass triage
- Cheap to automate
- Easy to wrap as MCP tools
Use binutils for a fast inventory, Ghidra for deep investigation, GDB for validation, and the AI agent for explanation and planning across all three.
Safety, Permissions and Agent Control
Exposing reverse engineering tools to an AI agent requires explicit boundaries. Apply the same restrictions whether a request comes from an agent, a test harness or a local script.
| Control | Recommendation |
|---|---|
| Filesystem | Read-only access to an approved targets directory; writes only to a reports directory |
| Processes | Allowlisted disassembler and debugger commands only |
| Network | Disabled unless a workflow explicitly requires it |
| Unknown binaries | Never execute without human approval |
| Secrets | Keep credentials outside the analysis root |
| Output | Timeouts, output limits and logging on every subprocess |
Pre-Analysis Safety Checklist:
- Target stored read-only with recorded SHA-256 hash
- Dedicated workspace separated from personal files
- Network access disabled unless required
- Human approval required before executing the target
- Reports written to a separate approved output directory
Resolve paths before checking allowlists and reject path traversal or symbolic-link escapes. A permissive server undermines every other control.
FAQ
Q: What is Reverse Engineer Anything used for?
REA is an open-source toolkit that lets AI coding agents analyze apps, websites, JavaScript, Electron packages and native binaries through a local CLI and MCP Server, with evidence recording and reproducible investigation workflows.
Q: Which AI agents work with REA?
The project documents configuration or integration for Claude, Cursor, Codex, Gemini CLI, Windsurf and Devin through MCP and CLI workflows.
Q: How do I install REA?
Run npx rea-agents@latest setup to install the CLI and configure agent integration, then use rea doctor to diagnose missing dependencies, path errors or Node.js issues.
Q: Can REA recover the original source code of a program?
No. REA focuses on structured analysis, evidence chains and reproducible investigation, not automatic source recovery or software cloning.