- Reverse Engineer Anything (REA) is an open-source CLI + MCP Server toolkit that lets AI coding agents inspect software.
- Clone software ethically by extracting behavior, structure, and logic — not copying protected source code.
- Evidence-first workflow: every conclusion must trace to addresses, strings, traces, or runtime observations.
- Supported targets: native binaries, Electron apps, JavaScript, websites, and APKs.
- Agent integrations include Claude Code, Cursor, Codex, Gemini CLI, Windsurf, and Devin.
What "Cloning Software" Means in Reverse Engineer Anything
When people search for how to reverse engineer anything clone software, the practical goal is almost never a byte-for-byte copy. In the REA workflow, "cloning" means reconstructing how a feature works — its logic, parameters, and architecture — well enough to rebuild an equivalent implementation yourself. The official project emphasizes local analysis, evidence chains, and reproducible investigations rather than recovering original source code.
REA approaches this through two interfaces: a CLI for terminal-driven analysis, and an MCP Server that exposes tools to AI coding agents. The agent coordinates the investigation; the underlying disassemblers, debuggers, and scripts do the mechanical work.
| Cloning Approach | What It Produces | Legality / Ethics | Effort |
|---|---|---|---|
| Behavior cloning | Your own implementation of observed logic | Generally acceptable for interoperability and learning | High |
| Architecture mapping | Structure diagrams, call graphs, module layout | Analysis only, no code copying | Medium |
| Protocol reconstruction | Reimplemented APIs or file formats | Depends on licensing and intent | High |
| Direct code copying | Lifted source or resources | Usually violates copyright and licenses | Avoid |
REA's own documentation positions the toolkit for analysis and evidence-backed investigation. Review the target software's license before reconstructing anything, and never redistribute proprietary code, assets, or trade secrets. Clone behavior and architecture you have the right to reimplement — not protected expression.
The 6-Step Clone Workflow
A reliable software-cloning investigation moves from low-risk observation to validated reconstruction. Follow this sequence every time.
Identify the target and preserve a baseline
Record the file type, architecture, size, and SHA-256 hash before touching anything. Keep the original read-only and create a dedicated analysis workspace so results stay reproducible.
Run static analysis
List symbols, imports, sections, and printable strings without executing the target. This builds the initial map: candidate functions, strings, and error paths that hint at how features are organized.
Locate the feature you want to clone
Pick a distinctive string or API call near the behavior, then trace cross-references and callers. A large binary collapses into a focused set of relevant functions with a call-graph view.
Confirm behavior with dynamic analysis
Run the target in an isolated debugger or VM, set breakpoints at candidate functions, and capture inputs, return values, and memory state. Runtime evidence separates real logic from static guesswork.
Reconstruct in your own code
Hand the evidence — decompiled snippets, traces, parameters — to your coding agent and ask for a clean-room reimplementation. Document which behaviors are confirmed and which are inferred.
Validate the clone against the original
Compare outputs across the same inputs, edge cases, and failure paths. Keep the original hash, tool logs, and comparison results in the final report.
Ask for structured explanations in five parts — inputs/outputs, control flow, state changes, external calls, and uncertain inferences — before requesting rewritten pseudocode. Requiring the agent to separate observation from inference dramatically reduces hallucinated logic.
Core Commands and Toolchain
REA combines its own CLI with standard analysis utilities. These commands form a practical baseline for a cloning investigation.
| Phase | Command | Purpose |
|---|---|---|
| Setup | npx rea-agents@latest setup | Install REA and configure your coding agent |
| Diagnosis | rea doctor | Detect missing dependencies, paths, Node.js issues |
| Identification | file <target> | Confirm format (ELF, PE, Mach-O) and architecture |
| Evidence | sha256sum <target> | Fix the baseline hash before and after analysis |
| Strings | strings -a -n 6 <target> | Extract paths, URLs, messages, format identifiers |
| Disassembly | objdump -d -M intel <target> | Quick command-line disassembly |
| Debugging | gdb -q <target> | Breakpoints, registers, memory inspection |
| Export | tee reports/<file> | Save output for the agent and final report |
Use the CLI for deterministic, repeatable stages and the MCP Server when you want an agent to request tools directly — for example list_symbols, find_strings, or disassemble_region — under a constrained, allowlisted workspace.
Tool Tier List for Cloning Work
Not every tool fits every cloning task. This comparison reflects workflow strengths, not personal preference.
| Tool | Tier | Primary Role | Automation | Best For |
|---|---|---|---|---|
| Ghidra | S | Static analysis and decompilation | High (scriptable) | Binary triage, cross-references, large projects |
| GDB | S | Runtime debugging | High (scripted sessions) | Validating branches, memory, traces |
| LLVM toolchain | A | Compiler infrastructure, disassembly | Very high | Custom pipelines, code comparison |
| GNU binutils | A | CLI binary inspection | Very high | Fast triage, symbol inventories |
| Custom Python scripts | B | Task-specific parsing and reports | Very high | Repeatable extraction, JSON for agents |
| AI-assisted analysis | B | Explanation, planning, drafting | High | Decompiler explanation, evidence summaries |
Full Binary Clone
- Ghidra + GDB combination
- Symbol and cross-reference mapping
- Best for native applications
Electron App Clone
- ASAR extraction and package.json review
- Main/Renderer/Preload and IPC analysis
- Fastest path to readable logic
Web Feature Clone
- JavaScript and network observation
- Browser runtime inspection
- Ideal for small interactive features
Electron and JavaScript targets often expose logic directly, skipping disassembly entirely. Always check whether the target is a packaged web app before committing to binary-level analysis.
Evidence Rules and Safety Checklist
The single biggest failure mode in AI-assisted cloning is the agent inventing behavior it cannot support. Enforce evidence discipline throughout.
Evidence Checklist Before Rebuilding:
- Baseline SHA-256 hash recorded and target kept read-only
- Each cloned behavior linked to a function, address, or trace
- Runtime observations confirm key static hypotheses
- Confirmed facts separated from inferred logic in the report
- Agent outputs rechecked in the disassembler or debugger
- License reviewed and no proprietary code or assets reused
Run unknown targets only in a disposable VM or container with network access disabled unless a specific step requires it. Require human approval before the agent executes any target program or writes outside the analysis workspace.
FAQ
Q: Can Reverse Engineer Anything clone software automatically?
No. REA is an analysis toolkit, not an auto-cloner. It gives AI coding agents the tools to inspect apps, binaries, and Electron packages and build evidence chains. You still write the reconstructed implementation yourself, informed by validated findings.
Q: Which AI coding agents work with REA?
REA connects through MCP and CLI to agents including Claude Code, Cursor, Codex, Gemini CLI, Windsurf, and Devin. Configuration is handled during setup, and the official documentation covers per-agent setup steps.
Q: Is it legal to clone software this way?
It depends on the license and your purpose. Analyzing software you own for learning, interoperability, or security research is generally acceptable in many jurisdictions. Copying protected source code, assets, or trade secrets is not. Always review the target's license first.
Q: What is the easiest target type to start cloning?
Electron apps and JavaScript targets. Their ASAR archives, package.json, and readable source maps expose structure and logic directly, letting you practice the evidence workflow without deep disassembly skills.