Key Takeaways
REA (Reverse Engineer Anything) provides an open-source local runtime that connects autonomous AI agents and security researchers to native binary disassemblers, application reconstructors, and dynamic probes via the Model Context Protocol (MCP) and an ergonomic CLI. The framework couples deep native analysis engines (Hopper, Ghidra Headless, and IDA Pro) with specialized static parsers for Electron ASAR bundles, .NET PE/CLI assemblies, Go binaries, and WebAssembly artifacts. Every inspection produces content-addressed Evidence records with cryptographic SHA-256 digests, explicit facet coverage declarations, and bounded uncertainty markers, ensuring agents never hallucinate decompiled facts.
The engineering gap in agentic reverse engineering
Integrating autonomous coding assistants into software reverse engineering has historically suffered from acute interface impedance. Standard language models cannot directly parse multi-gigabyte Mach-O binaries, navigate stripped ELF symbol tables, or unpack obfuscated Electron ASAR archives without specialized intermediate tooling.
When developers attempt to feed raw disassembly or decompiled snippets into LLMs, several systemic failure modes emerge:
- Stateless Analysis Blindness: Disassemblers expose rich stateful databases (call graphs, type hierarchies, and control flow graphs), but standard agent workflows interact through ephemeral CLI pipes that discard navigational history between queries.
- Hallucinated Decompilation: In the absence of strict compiler provenance, models invent hypothetical source functions, assume unverified struct layouts, and fabricate call paths to satisfy user prompts.
- Context Window Exhaustion: Industrial desktop applications contain tens of thousands of subroutines. Dumping entire decompiled modules quickly exhausts model context budgets and increases operational token cost.
[Legacy Agent Workflow] ──(Raw Terminal Dump)──> [Stateless LLM Pipe]
│
(Unverified guesses) │
│
â–¼
[Target Binary] <───────────────────────────── [Hallucinated Structs]
========================= VS =========================
[REA MCP & CLI Runtime]
│
├── Session Routing & Target Pinning (SessionProviderRouter)
├── Deep Native Bridges (Hopper Python, Ghidra Headless, IDA)
├── Specialized Application Parsers (.NET PE/CLI, Electron ASAR, Go)
└── Cryptographic Evidence Ledgers (SHA-256 Byte Binding & Unknowns)
│
â–¼
[Host Agents Receive Truthful Evidence Records With Explicit Coverage]
REA resolves this structural disconnect by wrapping industrial reverse-engineering engines in a unified Model Context Protocol interface. The project is distributed under the permissive MIT License, as verified in LICENSE L1-L21. Distributed on npm as rea-agents v6.7.0, the package exposes the canonical rea and rea-agents binaries, verified in package.json L1-L38.
| System Dimension | Raw Disassembler Output | REA MCP Runtime |
|---|---|---|
| Interaction Model | Unstructured terminal text dumps | Typed JSON tool contracts with JSON Schema validation |
| Epistemic Grounding | Ungrounded model assumptions | Cryptographic Evidence records with SHA-256 byte binding |
| Session Persistence | Lost across process termination | Stateful session pinning with snapshot import and export |
| Cross-Platform Reach | Single disassembler locked to one OS | Native Mach-O/ELF/PE, Electron, .NET, Android, and Web |
| Uncertainty Handling | Implicit omissions and guessing | Explicit coverage maps, limitation notices, and typed unknowns |
Architectural core: session routing and cryptographic evidence ledgers
At the center of REA sits a dual dispatch entrypoint that routes requests between one-shot terminal tasks and continuous MCP server sessions. As verified in scripts/rea.mjs L1-L45, the executable dispatcher determines whether to spawn the Incur-powered CLI or launch the MCP server over stdio or streamable HTTP (rea mcp --http).
The framework defines its canonical product constants in src/identity.ts L1-L26, pinning identifiers across agent configurations to prevent registry drift.
[scripts/rea.mjs Entrypoint]
│
├── (Default / MCP Flags) ──> [src/server/createServer.ts]
│ │
│ ├── Stdio Protocol Handler
│ └── Streamable HTTP Listener
│
└── (Subcommand Dispatch) ──> [src/cli.ts]
│
└── One-Shot CLI Tasks (Incur)
When an agent opens a target binary, REA establishes a BinarySession managed by SessionProviderRouter. The router evaluates candidates from AnalysisProviderRegistry using deterministic sorting rules. Once selected, a provider remains immutably bound to that target for the lifetime of the session, preventing mid-investigation cache discrepancies.
The MCP server initializes with targeted guidance instructions, establishing clear operational modes for initial target discovery versus focused routine analysis, as verified in src/server/createServer.ts L140-L155.
Every analysis operation yields an immutable Evidence record. Rather than delivering bare strings, the server packages findings with explicit provenance metadata, as defined in src/domain/evidence.ts L40-L95:
evidence_id: SHA-256 digest over canonicalized observation values.subject: Artifact identity, including SHA-256 digest, target format (mach-o,elf,pe,asar, etc.), and architecture.authority: Strict source categorization (shipped-artifact,controlled-replay,historical-reference, oranalyst-inference).limitations&unknowns: Explicit enumeration of unobserved facets, truncated traversals, or missing debug symbols.
Multi-engine bridges: native disassembly and application reconstruction
REA avoids reinventing disassembler backends. Instead, it deploys out-of-process bridges that supervise industrial decompilers while enforcing isolation and memory bounds.
Deep native disassembler bridges
For compiled native binaries, REA communicates with native analysis suites through authenticated IPC channels:
- Hopper Disassembler Bridge: Implemented in bridge/hopper_bridge.py L1-L45, REA connects to Hopper via a dedicated Unix domain socket authenticated by an ephemeral HMAC token (
REA_TOKEN). Dispatch runs strictly on Hopper’s dedicated Python thread to avoid deadlocks in Hopper’s Cocoa runloop. - Ghidra Headless Bridge: Implemented in bridge/ghidra/ReaGhidraBridge.java L1-L45, this packaged headless script executes analysis via Unix domain sockets on POSIX systems or TCP loopback sockets on Windows, streaming control flow graphs, call references, and decompiler dossiers.
- IDA Pro Integration: Direct integration through
ida-pro-mcpallows headless database analysis or live GUI synchronization.
Lightweight application reconstructors
Many modern desktop and mobile targets do not require full binary decompilation. REA provides dedicated native parsers that extract architecture models without running target code:
- Electron and JavaScript Reconstructors: As verified in src/application/javascript/JavaScriptArtifactReconstruction.ts L1-L45, REA unpacks ASAR archives, builds AST projections across bundled modules, traces source maps, and computes Electron boundary summaries (IPC channels and context isolation) completely offline.
- Managed .NET Assemblies: As verified in src/dotnet/ManagedArtifactInspector.ts L1-L45, REA parses PE/CLI metadata headers, type definition tables, and Common Intermediate Language (CIL) instruction streams without invoking the .NET CLR or executing native single-file bundles.
- Go and Rust Binary Headers: Embedded build settings, module dependencies, and compiler revisions are parsed directly from executable image structures without external compilers.
Hands-on developer workflow: installation and verifiable inspection
Allocating roughly thirty percent of the operational workflow to pragmatic execution, developers can install REA globally or connect it directly to coding assistants.
Prerequisites and runtime installation
REA enforces strict Node.js runtime boundaries: Node.js ^22.19.0 || ^24.11.0 || >=26.0.0, verified in package.json L30-L36. Node.js 23 and 25 are unsupported. On Linux systems, process ownership verification requires a procps-compatible ps utility on PATH.
Install REA globally via npm:
npm install --global rea-agents
rea --helpTo configure agent MCP access, run interactive setup, which verifies client configuration files, creates automatic backups, and installs matching skills, as verified in src/cli/setupCommands.ts L20-L65:
npx rea-agents setupTo verify environment readiness, run the diagnostic suite:
rea doctorInspecting an Electron application ASAR
To analyze an Electron application without unpacking it manually, execute:
rea analyze-javascript-application /Applications/TargetApp.app/Contents/Resources/app.asar --json > app-evidence.jsonBecause full application graphs can reach hundreds of megabytes, project a compact summary view:
echo '{"source": {"kind": "evidence-file", "path": "app-evidence.json"}, "view": {"kind": "summary"}}' > app-view.json
rea inspect-analysis-view app-view.jsonDecompiling a native subroutine via CLI
To inspect a native binary function using an existing Hopper or Ghidra installation:
rea analyze_function /usr/local/bin/sample_binary --procedure _main --jsonThe output returns a JSON payload containing exact assembly instructions, recovered pseudocode, caller and callee nodes, and an SHA-256 evidence identifier for downstream verification.
Security boundaries, resource constraints, and operational trade-offs
Deploying AI agents with reverse-engineering capabilities introduces distinct operational and safety constraints.
Sandboxing and process supervision
REA isolates disassembler processes within supervised process groups. Helper utilities (source analyzers, source-map codecs, and HAR decoders) operate under memory budgets. On Windows platforms, child workers run inside dedicated Job Objects with strict commit limits. REA does not grant root or administrator privileges; analysis runs entirely with standard user permissions.
Modality boundaries and anti-hallucination
The framework explicitly rejects unverified performance or security claims:
- No Absolute Execution Guarantees: REA verifies static call references and instruction flows; it does not claim that a statically identified path is reachable at runtime under dynamic ASLR or anti-debugging defenses.
- Exact Text Comparison: Function diffing via
compare_functionsevaluates verbatim text and normalized CFG block sizes. Label relocations and compiler register reallocations are recorded as text variances rather than semantic behavioral changes. - Commercial Tool Licensing: REA does not bypass disassembler licensing. Users must supply their own authorized licenses for commercial engines such as IDA Pro, Hopper, or JEB.
Evaluation verdict and adoption roadmap
REA provides an essential architectural abstraction for engineering teams auditing proprietary binaries, investigating third-party dependencies, or automating security vulnerability assessments. By grounding agentic reasoning in content-addressed Evidence records and verifiable disassembler bridges, it eliminates the hallucinated guesswork that plagued earlier LLM reverse-engineering workflows.
For teams planning integration:
- Adopt Incremental Discovery: Start with lightweight CLI inspections (
rea inspect-artifactandrea inspect-managed-artifact) before launching heavyweight decompilation jobs. - Standardize on MCP Evidence: Store returned
evidence_idhashes alongside audit reports to maintain cryptographic provenance across CI/CD review gates. - Contribute Upstream: Follow community guides on rea.tools and report findings via GitHub Issues.








