Reverse Engineer Anything Tutorial: Step-by-Step Workflow - 가이드

Reverse Engineer Anything Tutorial: Step-by-Step Workflow

Learn how to reverse engineer apps, binaries, and Electron software with REA's CLI and MCP server using this practical step-by-step tutorial.

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 agents like Claude, Cursor, Codex, and Gemini CLI.
  • Evidence-first workflow: every conclusion is tied to recorded evidence, not AI guesswork.
  • Local analysis keeps targets, reports, and tool calls on your own machine.
  • Quick start: run npx rea-agents@latest setup to install and configure.

What Is Reverse Engineer Anything?

Reverse Engineer Anything (REA) is a developer toolkit built specifically for AI coding agents. Instead of manually clicking through a disassembler, you connect an agent through a CLI or an MCP server, and the agent performs the investigation: identifying file formats, extracting strings, tracing cross-references, and summarizing functions. The project emphasizes local analysis, an evidence chain, and reproducible investigation workflows rather than automatic source-code recovery.

The toolkit supports several target categories, each with its own analysis approach:

Target TypeWhat You AnalyzeTypical Tools
Native binariesFunctions, strings, cross-references, disassemblyGhidra, objdump, GDB
Electron appsASAR files, package.json, Main/Renderer/Preload, IPCASAR extraction, source maps
JavaScriptBundles, minified code, module structureString search, call graphs
WebsitesRuntime behavior, network requests, scriptsBrowser runtime inspection
Android APKManifest, resources, dex codeAPK parsers, decompilers
Know the Boundary

REA assists with analysis and reconstruction for learning and interoperability. It is not designed to recover original source code or bypass software licensing. Only analyze software you own or are authorized to investigate.

Installation and First Run

Getting REA running takes one command plus a short configuration check. The setup wizard confirms your Node.js environment, installs the CLI and MCP server, and detects connected coding agents.

1

Check prerequisites

Verify Node.js and npm are installed and up to date, and confirm your operating system is supported. Keep a dedicated working directory ready for analysis targets and reports.

2

Run the setup wizard

Execute npx rea-agents@latest setup. The wizard installs the CLI, registers the MCP server, and walks through an installation plan with confirmation prompts.

3

Run diagnostics

Use rea doctor to detect missing dependencies, path errors, or agent-configuration problems before your first investigation.

4

Connect a coding agent

Follow the generated configuration for your agent, such as Claude Desktop, Cursor, Codex, Gemini CLI, or Windsurf, and confirm the REA tools appear in the agent's tool list.

CheckpointCommandExpected Result
Environmentnode --versionSupported Node.js version prints
Installnpx rea-agents@latest setupWizard completes, config written
Diagnoserea doctorNo missing dependencies reported
Verify MCPAgent tool listREA analysis tools visible
Separate Your Targets

Keep original binaries read-only in a dedicated targets/ directory and write all reports to a separate reports/ directory. Record the SHA-256 hash of every target before and after analysis to prove the file was never modified.

Core CLI Commands

The CLI gives terminal users direct access to REA's analysis pipeline. These commands form the backbone of most investigations.

CommandPurposeExample Use
analyzeFull static analysis pass on a targetrea analyze ./targets/app.exe
inspectNon-invasive target identificationFormat, architecture, imports, strings
searchFind strings or symbols across the targetLocate error messages, URLs, keys
functionSummarize a specific functionInputs, outputs, control flow
xrefsTrace cross-referencesFind callers and callees of an address
traceRuntime observation of selected behaviorCapture execution evidence
Start Non-Invasive

Always begin with inspect before deeper analysis. Determining the file type, architecture, and imported libraries first prevents wasted effort on the wrong assumptions and guides which later commands make sense.

MCP Server Configuration

The MCP server is what lets coding agents call REA tools directly. A typical local registration uses the stdio transport, where the agent launches the server as a child process.

{
  "mcpServers": {
    "reverse-tools": {
      "command": "node",
      "args": ["/opt/reverse-tools/dist/index.js"],
      "env": {
        "REVERSE_WORKSPACE": "/analysis/workspace",
        "PATH_ALLOWLIST": "/analysis/workspace/targets"
      }
    }
  }
}

Key configuration principles that keep the setup safe and predictable:

Scope the filesystem

  • Allowlist only the targets/ and reports/ directories
  • Reject path traversal and symlink escapes
  • Keep credentials outside the workspace

Expose narrow tools

  • One tool per operation, such as list_symbols or find_strings
  • Bounded outputs with size and time limits
  • Descriptive names and validated input schemas

Gate risky operations

  • Auto-approve read-only extraction
  • Manual approval for running targets or writing files
  • Log every tool call with inputs and exit status
Test Before You Trust

Validate your server with the MCP Inspector before connecting it to an agent. A server that passes a minimal health-check tool in the Inspector will behave predictably inside Claude, Cursor, or Gemini CLI.

The Evidence-First Investigation Workflow

A reliable reverse engineering session moves from low-risk observation to focused investigation to validated conclusions. The agent coordinates tools and summarizes output; you remain responsible for validating behavior.

1

Identify the target

Request file type detection, compute the SHA-256 hash, and collect size, sections, and imported libraries into a baseline profile.

2

Map statically

List symbols, extract printable strings, and identify likely initialization, input handling, and error paths without executing anything.

3

Locate and trace

Use string references and cross-references to narrow a large binary into a focused set of relevant functions, then build a call relationship map.

4

Observe at runtime

Launch the target in an isolated debugger environment, set breakpoints at selected functions, and capture execution traces tied to specific inputs.

5

Validate and report

Separate direct observations from interpretations, link each conclusion to an address or artifact, and save a reproducible report package.

Investigation Quality Checks:

  • Target hash recorded before and after analysis
  • Static map includes symbols, strings, and imports
  • Runtime observations link to specific functions and inputs
  • Conclusions separated from open questions
  • Report, tool logs, and config snapshot saved together
Agents Are Assistants, Not Authorities

Treat every AI-generated conclusion as a hypothesis until you reproduce it in the disassembler or debugger. Evidence chains exist precisely to prevent plausible-sounding but unsupported claims from entering your final report.

Practical Examples and FAQ

REA's official showcases include analyzing the Chrome Dino game's speed and acceleration rules and reconstructing the Windows Calculator's percentage logic. Both follow the same pattern: ask a narrow question, collect tool-backed evidence, rebuild the behavior, and verify.

Q: What does Reverse Engineer Anything actually recover from a binary?

REA produces an evidence-backed understanding of behavior: function inventories, string references, call relationships, and runtime observations. It does not recover original source code or automate copying of proprietary software.

Q: Do I need both the CLI and the MCP server?

No. The CLI serves terminal-first users, while the MCP server is for AI coding agents. Many workflows use both: the CLI for deterministic stages and the agent for interpretation, planning, and report generation.

Q: Which coding agents work with REA?

The project supports configuration or integration for tools including Claude Code, Cursor, Codex, Gemini CLI, Windsurf, and Devin. Each uses the same local MCP server with its own configuration format.

Q: Why do my agent's conclusions sometimes seem wrong?

The agent only sees the context you provide. If the entire disassembly is dumped into the prompt, unrelated instructions dominate and results degrade. Use narrow, function-level requests and validate important findings directly in the debugger.

Related Articles