Reverse Engineer Anything: Workflow Setup Guide - 学習

Reverse Engineer Anything: Workflow Setup Guide

Learn how to reverse engineer apps, websites, JavaScript, Electron packages and native binaries with AI coding agents using REA's CLI and MCP workflows.

2026-10-18
reverse engineer anything Wiki Team
Quick Guide
  • 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 setup to 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.
What REA Is Not

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

ComponentPurposeAudience
CLITerminal commands: analyze, inspect, search, traceTerminal users, automation scripts
MCP ServerTool registry exposed to AI coding agentsClaude, Cursor, Codex, Gemini CLI
Setup / DoctorInstallation and environment diagnosticsAll users
Evidence recordsTool-backed findings tied to addresses and tracesInvestigators, reviewers

Supported Target Types

TargetWhat Gets Analyzed
Native binariesFunctions, strings, cross-references, call graphs, disassembly
Electron appsASAR archives, package.json, Main/Renderer/Preload processes, IPC
JavaScriptBundles, source maps, module structure
WebsitesBrowser runtime behavior, loaded scripts
Android APKsPackage structure and resources
Start Small

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

CommandCategoryUsage
file <target>IdentificationDetect format, architecture, executable type
sha256sum <target>EvidenceRecord digest before and after analysis
strings -a -n 6 <target>Static analysisExtract printable strings with offsets
objdump -d -M intel <target>DisassemblyGenerate assembly for executable sections
gdb -q <target>Dynamic analysisBreakpoints, registers, memory inspection
npx @modelcontextprotocol/inspectorMCP testingInspect a server's exposed tools
Separate Your Interfaces

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.

1

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.

2

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.

3

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.

4

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.

5

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.

6

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.

Evidence Over Guessing

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.

TierToolPrimary RoleAutomationBest For
SGhidraIntegrated disassembly, decompilation, cross-referencesHighBinary triage, call graphs, large projects
SGDBInteractive runtime debuggingHighValidating branches, memory and register inspection
ALLVM toolchainCompiler infrastructure, binary utilitiesVery highAutomated disassembly, format-aware pipelines
AGNU binutilsCLI symbol, section and string inspectionVery highFast triage, scriptable reports
BCustom Python scriptsTask-specific parsing and correlationVery highRepeatable extraction, agent-facing JSON
BAI-assisted analysisExplanation and hypothesis generationHighDecompiler 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
Combine Tiers

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.

ControlRecommendation
FilesystemRead-only access to an approved targets directory; writes only to a reports directory
ProcessesAllowlisted disassembler and debugger commands only
NetworkDisabled unless a workflow explicitly requires it
Unknown binariesNever execute without human approval
SecretsKeep credentials outside the analysis root
OutputTimeouts, 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
Path Validation

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.

Related Articles