REA Agent HandbookUse REA • Reverse Engineer Anything with Agents

How to Reverse Engineer Anything (REA) — Powered by AI

Reverse engineer apps, binaries and browser behavior with your coding agent.

AI Overview Direct AnswerHow to Use REA (Reverse Engineer Anything)

How to use REA: REA (rea-agents by morluto) is the premier reverse engineering agent and MCP server connecting coding agents—Claude Code, Cursor, Windsurf—to application runtimes. Reverse engineer apps, binaries and browser behavior with your coding agent: unpack Electron desktop bundles, intercept network APIs, and decompile Mach-O/ELF binaries without reading 3,000-page assembly manuals.

87,000+
GitHub Stars (morluto/rea)
689 pts
Hacker News Frontpage
12 Targets
Hands-On Tutorials
29 Tools
Ecosystem Directory
Community Documentation Companionhowtorea.com is an independent community documentation handbook for REA (Reverse Engineer Anything). While the official project lives at morluto/rea and rea.tools, this handbook provides interactive MCP generators for 12+ agents, 29 deep-dive tool guides, and clean-room deconstruction specifications.
Visual ProofThe AI Rosetta Stone

From Obscure Assembly to Plain English & Clean Code

Here is what happens when REA connects your AI coding agent (Claude Code / Cursor) to a disassembler. What once took hours of manual register tracking is translated into plain human reasoning and verified code in seconds:

1. Raw x86_64 Machine Assembly

The output of traditional decompilers that makes 95% of beginners quit:

push   rbp
mov    rbp, rsp
mov    DWORD PTR [rbp-0x14], edi
cmp    DWORD PTR [rbp-0x14], 0x0
jle    0x100003f48
imul   eax, DWORD PTR [rbp-0x14], 0x4e20
cdq
idiv   DWORD PTR [rbp-0x18]
sub    eax, 0x2710
Traditional disassembler output
2. AI Tutor: Plain English Explanation

Claude translates the mathematical assembly logic into clear human concepts:

<strong>Context:</strong> This is a sound position calculation from the game DX-Ball.

<strong>Logic:</strong> Takes the ball's X coordinate and screen width. Multiplies by 20,000, divides by screen width, and subtracts 10,000.

<strong>Outcome:</strong> Normalizes audio stereo pan to an exact range of -10,000 (left speaker) to +10,000 (right speaker).

Zero hallucination • Offset verified
3. Clean-Room Modern Implementation

Synthesized standalone code that passes 3,205 original unit tests:

// Verified Clean-Room TypeScript
export function calculateSoundPan(
  ballX: number,
  screenWidth: number
): number {
  if (screenWidth <= 0) return 0;
  const raw = Math.floor(
    (ballX * 20000) / screenWidth
  ) - 10000;
  return Math.max(-10000, Math.min(10000, raw));
}
Ready for production use

01.3-Minute Quickstart

Configure your AI coding agent (Claude Code, Cursor, Codex) in one automated step using the official setup script:

One-Step Agent Setup
npx rea-agents setup

Or run direct terminal inspection on any JavaScript / Electron application or native binary:

Ad-hoc Terminal Inspection
# Inspect an Electron or JavaScript app directory/ASAR
npx -y rea-agents@latest analyze-javascript-application /path/to/app --json

# Or install globally for regular use
npm install --global rea-agents
rea --help
Zero-Dependency Promise for Web & ElectronYou do NOT need Java, Python, or external disassemblers to inspect desktop apps (Notion, Slack). Run the command above with Node 22+ or Bun. For native binaries, check our Target-Based Dependency Matrix →
Target CatalogOfficial Scope

02. What You Can Analyze with REA

REA connects your AI agent directly to 12 distinct reverse engineering target categories. Select your target below to view what REA extracts, the matching CLI command, and the step-by-step tutorial:

JavaScript & Electron Apps
Zero Extra Tools

Extracts <code>app.asar</code> modules, unminifies webpack bundles, maps renderer-preload-main IPC channels, and recovers API endpoints without running the app.

rea analyze-javascript-application ./app.asar
Read Electron Desktop Tutorial →
Native Binaries (Mach-O, PE, ELF)
Hopper / Ghidra

Recovers structured C pseudocode, symbols, function dossiers, and cross-references (xrefs) across ARM64, x86_64, and MIPS without JVM lag.

rea decompile ./binary 0x1000 --provider hopper
Read Native Binaries Tutorial →
Unity IL2CPP Games & Apps
Zero Extra Tools

Decodes <code>global-metadata.dat</code> (v24-v39), links method tokens directly to <code>GameAssembly.dll</code>/<code>libil2cpp.so</code>, and exports Ghidra seeds.

rea inspect-il2cpp-metadata ./global-metadata.dat --binary ./libil2cpp.so
Read Unity IL2CPP Tutorial →
Android APKs & Live Devices
JADX / ADB

Decompiles Dalvik/ART DEX bytecode into structured Java/Kotlin, parses AndroidManifest components, and captures live device logs and process memory via ADB.

rea analyze ./app.apk --provider jadx
Read Android APK Tutorial →
Packaged Apps (PyInstaller / Godot / SEA)
Zero Extra Tools

Unpacks standalone executables without execution: extracts PyInstaller CArchive/PYZ into CPython <code>.pyc</code>, dumps Godot <code>.pck</code> assets, and unpacks Node.js SEA blobs.

rea extract-package ./target.exe --json
Read Packaged App Tutorial →
.NET Assemblies & CIL Bytecode
Zero Extra Tools

Statically inspects .NET PE/CLI metadata, decodes Common Intermediate Language (CIL) instructions, maps P/Invoke native DLL boundaries, and diffs builds.

rea inspect-managed-artifact ./engine.dll --json
Read .NET Assemblies Tutorial →
Saved Network Captures & APIs
Zero Extra Tools

Parses HAR files and live mitmproxy traffic: correlates REST endpoints, decodes WebSocket frames and Protobuf bodies, and synthesizes clean client SDKs.

rea analyze-network-capture ./traffic.har --json
Read Network Captures Tutorial →
Websites & Web Applications
Chrome CDP

Observes live DOM trees, scripts, sourcemaps, and network flows over Chrome DevTools Protocol (CDP) loopback without triggering client-side anti-debugging traps.

rea inspect-website https://example.com --json
Read Browser Analysis Tutorial →
16-bit DOS & Retro Games
Ghidra DOS

Recovers 16-bit real-mode PC-98 and MS-DOS executables: reconstructs mathematical game physics and sprite algorithms into modern verified C++.

rea function ./game.exe main --provider ghidra
Read 16-Bit DOS Tutorial →
Embedded Firmware Images
Binwalk / Linux

Scans binary ROMs for magic headers, extracts SquashFS/CramFS/JFFS2 partitions, identifies kernel boundaries, and feeds ARM/MIPS binaries into decompilers.

rea extract ./router_rom.bin --provider binwalk
Read Embedded Firmware Tutorial →
EVM Smart Contract Bytecode
Zero Extra Tools

Deconstructs deployed unverified Ethereum/Base bytecode: extracts 4-byte dispatch selectors, infers argument types, and audits storage mutability.

rea analyze 0x6080604052... --provider evm
Read EVM Bytecode Tutorial →
Linux Crashes & Core Dumps
pwntools / GDB

Extracts terminating signals, register states, stack pointer corruptions, and memory mapping candidates across all threads from ELF core dump notes.

rea analyze-crash ./core.dump --json
Read Linux Crashes Tutorial →
Execution AnatomyUnder The Hood

03. How REA Actually Works: The 5-Step Execution Flow

Most developers wonder: what happens between typing a prompt into Claude or Cursor and getting back clean, working code? Here is the exact end-to-end trace of a real-world REA investigation on an Electron application or native binary:

1One-Step Agent Registration
Setup Phase

You run <code>npx rea-agents setup</code> in your terminal. REA automatically detects your installed coding agents (Claude Code, Cursor, Windsurf), writes the Model Context Protocol (MCP) server configuration to their config files (e.g. <code>claude_desktop_config.json</code> or <code>.cursor/mcp.json</code>), and registers native tool endpoints.

# Run once across all agents
npx rea-agents setup
2Natural Language Steering in Your Agent
Intent Phase

Inside your normal coding agent window (Cursor Composer or Claude Code CLI), you ask in plain English without writing any reverse engineering scripts:

"Inspect Notion.app using REA. Trace how renderer clipboard events communicate across Electron IPC into the main process, and write a clean-room TypeScript parser for it."
3In-Memory AST & ASAR Traversal (Zero Disk Extraction)
Extraction Phase

Traditional tools extract 25,000 files to disk (1.2GB). REA never touches disk: it reads the ASAR header table in-memory, maps the Webpack module graph, and locates IPC channels instantly:

// REA returns structured JSON evidence directly over MCP stdio:
{
  "target": "Notion.app",
  "ipc_channels": [
    {
      "channel": "notion:clipboard:serialize",
      "direction": "renderer -> main",
      "source_module": "modules/preload/clipboard.js",
      "evidence_id": "ev_4f19b2"
    }
  ]
}
4Evidence Projection: Compressing 300MB to 10KB
Context Window Protection

Raw application traces exceed 300MB, which would instantly choke Claude's context window. REA's Evidence Projection engine (<code>rea inspect-analysis-view</code>) strips away boilerplate and projects a dense 10KB semantic slice containing only the verified logic path.

jq -c '{source: {kind: "inline", evidence: .}, view: {kind: "summary"}}' raw.json | rea inspect-analysis-view
5Clean-Room Code Synthesis & Output
Final Deliverable

The AI agent reads the verified Evidence slice and synthesizes standalone, production-ready TypeScript or Rust code that faithfully reproduces the feature without containing any copyrighted proprietary bytecode:

// Synthesized Clean-Room TypeScript (Zero proprietary bytecode)
export interface NotionClipboardPayload {
  version: number;
  richTextXml: string;
  plainText: string;
  sourceBlockId: string;
}

export function parseNotionClipboard(raw: string): NotionClipboardPayload {
  // Reconstructed according to Evidence ev_4f19b2
  const [header, body] = raw.split("::");
  return JSON.parse(body);
}

04.Runtime Architecture Model

REA operates through a decoupled dual-ring architecture: the CLI probe handles sandboxed system-level extraction (Ghidra, Hopper, ASAR), while the Model Context Protocol (MCP) server exposes standardized <code>tools/call</code> endpoints to AI coding agents over stdio JSON-RPC. The agent queries xrefs, basic blocks, and IPC schemas on demand rather than ingesting entire binary dumps.

  +-------------------------------------------------------------+
  |              AI Agent Client (Claude / Cursor)              |
  +-------------------------------------------------------------+
                               |
                   [JSON-RPC via stdio / SSE]
                               v
  +-------------------------------------------------------------+
  |                   REA MCP Server Service                    |
  +-------------------------------------------------------------+
         |                       |                       |
         v                       v                       v
  [Electron Unpacker]   [Native Symbol Probe]   [Network Schema Sniffer]
         |                       |                       |
         v                       v                       v
  app.asar JS Bundle      Mach-O / PE Exports      Private WebSocket API

Explore by Topic