2026-10-18
Build a reverse-engineering studio: REA, oracles, and clean-room loops
This page is an operator / tooling guide for assembling a reverse-engineering studio: one MCP analysis core (morluto/rea), a ring of open-source engines and bridges, three oracle types that decide what is true, and a two-room clean-room loop (Room A writes SPEC.md; Room B builds from the wall only). It is not a crack tutorial, not an exploit PoC, and not permission to analyze software you do not own or lack written authorization for (/compliance/, /faq/legal-boundary/).
Chinese twin: /zh/blog/rea-reverse-engineering-studio/. New to REA? Start with /blog/rea-beginner-guide/, the install demo /docs/install-demo/, then the visual workbench path /blog/eleven-rea-workbench/. Teaching pin on this site: [email protected] (/blog/rea-agents-6-5-0/) — do not default teaching labs to floating latest.
Why a “studio” instead of a single tool
Real RE jobs span formats (PE/ELF/Mach-O, APK/DEX, .NET, JS/Electron), surfaces (static, dynamic, network), and verification (rebuild + oracle). One GUI never covers every lane. A studio is a deliberate stack:
| Layer | Job | What this page picks |
|---|---|---|
| Analysis core | Agent-facing MCP + Evidence + workflows | REA (rea-agents) — one MCP |
| Deep engines | Decompile / disassemble / debug | Ghidra, IDA (BYO), radare2, Rizin, x64dbg, raddebugger, angr |
| MCP bridges | Let agents drive engines | GhidraMCP, ida-pro-mcp |
| Mobile / managed | APK/DEX, resources, .NET | jadx, Apktool, Frida, ILSpy, dnSpy |
| Inspect / intercept | Hex, traffic | ImHex, mitmproxy |
| Curated maps | Discover adjacent tools | awesome lists + REA built-in prompts |
| Verify | Clean-room SPEC + oracles + planted failures | Your rebuild harness |
Stars are popularity snapshots, not doctor-green proofs and not legal cover (/blog/evaluating-rea-claims/).
Category tables (GitHub API snapshot 2026-10-18)
Star counts below were re-fetched with gh api repos/OWNER/REPO --jq .stargazers_count on 2026-10-18 (Asia/Shanghai / UTC+8). Re-fetch before you quote; numbers drift.
01 — Analysis core
| Tool | Role in the studio | Stars (2026-10-18) | Official URL |
|---|---|---|---|
| morluto/rea | One MCP for binaries, apps, runtime; Evidence + investigation workflows | 317010 | github.com/morluto/rea |
| NationalSecurityAgency/ghidra | Deep open decompiler / disassembler (BYO for many REA paths) | 90604 | github.com/NationalSecurityAgency/ghidra |
| LaurieWired/GhidraMCP | MCP server bridge so agents can drive Ghidra | 11378 | github.com/LaurieWired/GhidraMCP |
| mrexodia/ida-pro-mcp | MCP bridge for licensed IDA Pro | 12994 | github.com/mrexodia/ida-pro-mcp |
REA does not ship Ghidra or IDA. Setup registers MCP and may offer Hopper with approval; Ghidra/IDA stay bring-your-own (/faq/setup-vs-providers/). Upstream quick start: npx rea-agents setup (morluto/rea README). On rea.run we pin the teaching equivalent: npx -y [email protected] setup.
02 — Mobile & apps
| Tool | Role in the studio | Stars (2026-10-18) | Official URL |
|---|---|---|---|
| skylot/jadx | DEX/APK → Java/Kotlin decompile (REA Android path needs headless jadx + JDK) | 51050 | github.com/skylot/jadx |
| iBotPeaches/Apktool | Decode/rebuild Android resources & smali | 26001 | github.com/iBotPeaches/Apktool |
| frida/frida | Dynamic instrumentation (your device / authorized process only) | 22354 | github.com/frida/frida |
| icsharpcode/ILSpy | .NET decompiler / browser | 26700 | github.com/icsharpcode/ILSpy |
03 — Binary & low-level
| Tool | Role in the studio | Stars (2026-10-18) | Official URL |
|---|---|---|---|
| radareorg/radare2 | CLI reverse-engineering framework | 25078 | github.com/radareorg/radare2 |
| x64dbg/x64dbg | Windows user-mode debugger | 49931 | github.com/x64dbg/x64dbg |
| WerWolv/ImHex | Hex editor + pattern language for structured binary reading | 55405 | github.com/WerWolv/ImHex |
| angr/angr | Symbolic execution / binary analysis platform | 9212 | github.com/angr/angr |
04 — Network & runtime
| Tool | Role in the studio | Stars (2026-10-18) | Official URL |
|---|---|---|---|
| mitmproxy/mitmproxy | Interactive HTTPS intercept & scripting (authorized traffic only) | 45712 | github.com/mitmproxy/mitmproxy |
| dnSpyEx/dnSpy | .NET debugger / assembly editor (fork lineage; use licensed/own targets) | 11293 | github.com/dnSpyEx/dnSpy |
| rizinorg/rizin | radare2-family framework; fast open path in some GUI workbenches | 4002 | github.com/rizinorg/rizin |
| EpicGames/raddebugger | Native debugger from Epic (Windows-focused public tree) | 8584 | github.com/EpicGames/raddebugger |
05 — Rebuild & verify (maps + loop)
| Item | Role in the studio | Stars / claim (2026-10-18) | Official URL |
|---|---|---|---|
| zhuyansen/awesome-ai-reverse-engineering | Graded map of AI×RE repos (live README: 119 security-graded entries) | 8★ | github.com/zhuyansen/awesome-ai-reverse-engineering |
| morluto/awesome-reverse-engineering | REA author’s public awesome list for classic + agent RE tooling | 765★ | github.com/morluto/awesome-reverse-engineering |
| REA investigation workflows / prompts | Built-in MCP prompts & skill instructions that structure agent investigations | Ships with rea-agents | morluto/rea docs |
| Clean-room + oracles | SPEC.md wall + three oracle types + planted failures (below) | Process, not a repo | This page + /compliance/ |
Three oracle types
An oracle is any check that compares your reconstruction to a reference you trust. The model proposes; the oracle decides. Studio teaching uses three kinds:
| Oracle type | What it compares | Teaching example | Pass looks like |
|---|---|---|---|
| Byte oracle | Compiled / recovered bytes vs reference machine code (or a fixed byte window) | DX-Ball balance helper: 63 compiled bytes, 3205 cases — /showcase/dx-ball/ | Exact match on the checked window + case set |
| Behaviour oracle | Same inputs → same observable outputs (no need to match internals) | Win Calculator %: after ×÷ → current/100; after +− → current×previous/100 (e.g. 200+10% → 220). Cross-check public Calculator behaviour notes / your own licensed copy — no cracking | Table of worked examples all agree |
| Runtime oracle | Whole program / feature runs end-to-end (play, click, export, round-trip) | Rebuild boots; feature path completes; smoke counters / golden files hold | Measurable pass/fail, not “looks fine” |
Pick the strongest oracle you can automate. Byte oracles catch instruction-level drift; behaviour oracles catch API contracts; runtime oracles catch integration gaps. Many studio jobs combine two or more.
Also test the oracle (TH08 lesson)
A weak compare can pass instruction bytes while float constants are wrong. Public reconstruction write-ups on the TH08 line describe a helper that already passed exact instruction-byte compare, then failed downstream: the rebuild checked player power against 0.0 while the original used 128.0 (maximum-power threshold). The comparator remapped addresses before comparing instructions (rebuilds may place constants elsewhere) but never checked the floating-point value at that address. Instruction bytes matched; meaning did not. Auditing floating-literal references after fixing the compare surfaced more wrong constants that a weaker oracle had already “accepted.”
Habit: before you trust a green run, plant three must-fail variants. If any planted failure passes, the oracle is broken — and every prior green result is suspect.
Planted-failure checklist
- [ ] Change one constant (e.g. threshold 128.0 → 0.0, or scale 100 → 10).
- [ ] Swap one branch (true/false arms, ×÷ vs +− percent rule, early-return polarity).
- [ ] Off-by-one boundary (inclusive/exclusive edge, length−1, loop limit).
- [ ] Run the oracle on each planted variant → all three must fail.
- [ ] If any planted variant passes → fix the oracle first, then re-audit prior accepts.
- [ ] Record the three variants + oracle command in
NOTES.md/ CI so the check is repeatable.
| Planted variant | Intent | Oracle must |
|---|---|---|
| Wrong constant | Catch value blind spots (TH08-style) | Reject |
| Swapped branch | Catch control-flow that still “looks similar” | Reject |
| Off-by-one | Catch boundary-only specs / weak golden sets | Reject |
No exploit or cracking steps belong in this checklist — only self-tests of your verification harness on authorized fixtures.
Two-room clean room (SPEC.md is the wall)
Classic clean room, run by agents:
| Room | Who | Sees | Produces |
|---|---|---|---|
| Room A — reader + REA | Investigation session with [email protected] | Authorized target + tools | SPEC.md only (behaviour / IO / edges / unknowns) |
| Wall | — | — | SPEC.md — no code, no addresses, no original-name assets |
| Room B — builder | Fresh session in a clean directory | SPEC.md only | Implementation + tests + planted failures |
binary (authorized) → Room A (REA + Evidence) → SPEC.md (wall) → Room B (rebuild) → oracle (+ planted failures) → retry
Copy-pasteable prompt templates (pin 6.5.0)
Setup (teaching pin — not floating latest):
Install REA and connect it to this coding agent using npx -y [email protected] setup.
Show me the setup plan for approval, then verify with:
npx -y [email protected] doctor --json
Room A — reader:
Use REA to investigate how [feature] works in [authorized app].
Tag every claim as observation, inference, or unknown, and cite Evidence.
Then write SPEC.md: behaviour, inputs, outputs, edge cases, and open unknowns.
Describe what it does. No code, no addresses, no names or assets from the original.
Room B — builder:
Build [feature] from SPEC.md in ./my-version.
Write tests from the behaviour in the spec and run them.
Do not open the original binary, decompile, or Room A notes.
Goal-shaped stop condition (adapt to your agent’s goal tool):
/goal every case in SPEC.md passes in ./my-version, the oracle rejects all 3 planted failures,
and no file outside ./my-version was changed. or stop after 25 turns.
Planted failures:
Add three deliberately wrong variants under ./oracle-tests: change one constant,
swap one branch, shift one boundary by one. Run the oracle on each and confirm
all three are rejected. If any passes, fix the oracle first.
NOTES.md wrap-up (factory memory):
Before ending this session, update NOTES.md with what was confirmed, what is still
unknown, which checks exist, and the next experiment to run. Commit it.
Clean-room loop checklist
- [ ] Scope gate: own / written authorization / open source / clean-room fixture (/compliance/, /faq/legal-boundary/).
- [ ] Isolate: disposable copy; never overwrite the only production artifact.
- [ ] REA pass: pin
npx -y [email protected];doctor --json; Evidence — not vibes. - [ ] SPEC.md wall: observable behaviour + IO + edges + explicit unknowns; no code/addresses/original-name assets.
- [ ] Room B rebuild: clean tree; SPEC only.
- [ ] Oracle + planted failures: measurable pass/fail; three must-fail variants rejected.
- [ ] Retry: feed diffs back into Room A / SPEC; do not invent unknowns.
- [ ] Stop rule: document gaps — no CVE chains, keys, or DRM bypasses.
| Step | Operator habit | Failure mode |
|---|---|---|
| binary | Authorized target only | Store DRM / third-party apps without rights |
| Room A | Evidence + limitations | Agent “explains” without tool results |
| SPEC.md | Testable + unknowns | Spec that only restates marketing copy |
| Room B | Clean-room implementation | Pasting decompiler output as product |
| oracle | Measurable + planted failures | Eyeballing screenshots; untested oracle |
| retry | Diff-driven | Infinite chat without new Evidence |
Worked teaching examples: /showcase/dx-ball/ · /blog/rea-beginner-guide/.
Clean room vs the “decompiled some package” myth
A common story claims popular clean-room apps were built by “decompiling the vendor suite.” The useful rule is the opposite: observe behaviour + public specs; forbid reading vendor app packages. Understanding ≠ taking.
| Myth | Clean-room practice (positive contrast) |
|---|---|
| “They decompiled the vendor app packages” | Do not read, disassemble, or copy insides of vendor application bundles; file names/listings only where needed for inventory |
| Copy icons / fonts / presets / screenshots | Original or openly licensed assets only; reference shots stay local and uncommitted |
| Paste decompiler output into your product | Room B never sees decompile; implements from SPEC.md + public specifications |
| Oracle = vendor source | Oracle = observed behaviour (+ external test tools used only as oracles, never linked/shipped) |
Public example of the rule set: FilmCraft AGENTS.md (§2 Clean-room code: never read/disassemble/copy Adobe application bundles; observe behaviour by using the app; codecs from public specs). Related ArtCraft-family apps follow the same spirit — behaviour and public formats, not vendor package guts. Link those AGENTS/READMEs when you teach; do not treat social claims as evidence of package theft.
Boundaries (REA disclaimer ↔ models)
REA’s own disclaimer frames allowed research / education / interop / preservation / auditing of software you own or may examine — and forbids DRM / anti-cheat circumvention, copying proprietary protected code and assets, and similar abuse. Models may refuse or re-route out-of-bounds tasks; that is expected, not a broken install.
| Allowed direction (high level) | Forbidden on this site / out of REA intent |
|---|---|
| Security research, education, CTFs, interoperability, preservation, auditing authorized software | Crack / keygen / DRM bypass / anti-cheat tampering |
| Clean-room rebuild from behaviour + public specs | Copying proprietary code, assets, or protected expression |
| Oracles on fixtures you own | Unauthorized targets; exploit PoC write-ups |
Pin [email protected] + doctor | Cracked engines or “borrowed” IDA/Hopper/JEB licenses |
Site pages: /compliance/ · /faq/legal-boundary/. An agent output is not a license to the original program, its data, or its name.
Minimum start path + doctor deepen
Upstream Quick start documents npx rea-agents setup. rea.run teaching equivalent — always pin 6.5.0 unless a release note forces otherwise:
# Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+ per upstream README
npx -y [email protected] setup
npx -y [email protected] doctor --json
# Restart your agent after approving MCP registration
# Optional: client-scoped doctor (example client id — use yours)
npx -y [email protected] doctor --client claude_code --json
# Optional: native lane — BYO Ghidra 12.x + 64-bit JDK 21+
export GHIDRA_INSTALL_DIR=/absolute/path/to/ghidra_12.1.4_PUBLIC
export JAVA_HOME=/absolute/path/to/jdk-21
npx -y [email protected] doctor --provider ghidra --json
| Checkpoint | Pass criteria |
|---|---|
| Setup | Agent lists REA MCP tools after restart |
| Doctor | doctor --json green for the lanes you need |
| Client doctor | --client … matches the host you actually use |
| Ghidra doctor | --provider ghidra green only after GHIDRA_INSTALL_DIR + JAVA_HOME |
| Engine-free first job | Static JS/Electron or .NET on an authorized sample |
| Native lane | BYO Ghidra/Hopper/IDA before deep pseudocode |
| Android lane | Headless jadx + full JDK on PATH |
Install UI walkthrough: /docs/install-demo/. Version notes: /blog/rea-agents-6-5-0/. Ghidra/IDA remain BYO (/faq/setup-vs-providers/).
Suggested studio layouts (pick one to start)
| Persona | Minimum stack | Add when… |
|---|---|---|
| Agent-first (MCP hosts) | REA 6.5.0 + doctor-green | Deep native → BYO Ghidra (+ optional GhidraMCP) |
| Android lab | REA + jadx + JDK + Apktool | Dynamic on your emulator → Frida / ADB |
| Windows native | REA + x64dbg or raddebugger + ImHex | Heavy static → Ghidra/IDA (licensed) |
| .NET | REA managed tools + ILSpy (and/or dnSpy) | Runtime steps on own assemblies |
| Network observation | mitmproxy on authorized clients | Pair with REA capture / HAR workflows |
| Clean-room rebuild | Room A + Room B + oracles + planted failures | Tighten SPEC; widen Evidence |
GUI companion (optional): /blog/eleven-rea-workbench/ — visual IDE around engines; still authorized targets only.
Common pitfalls
| Pitfall | Symptom | Fix |
|---|---|---|
| Engines not installed | Native jobs fail / empty pseudocode | BYO Ghidra/Hopper/IDA; doctor --provider ghidra --json; /faq/setup-vs-providers/ |
| Missing JDK / jadx | Android decompile errors | Full JDK + headless jadx on PATH |
Floating latest in teaching labs | “Works on my agent” drift | Pin [email protected] everywhere |
| Untested oracle | Green runs, wrong constants | Plant 3 must-fail variants |
| Leaking Room A into Room B | Addresses / names in “spec” | SPEC.md wall: behaviour only |
| Unauthorized targets | Legal / ToS risk | Own / written auth / open / clean-room only |
| Treating stars as readiness | Popular tool, red doctor | Doctor + small authorized fixture first |
| Agent invents Evidence | Confident prose, no addresses | Require tool results; label unknowns |
| Myth of “just decompile the package” | Copyright risk | Observe behaviour + public specs; FilmCraft-style AGENTS |
| Crack / bypass how-tos | Out of scope | Do not write or request them |
How this fits the rea.run teaching path
- Vocabulary + Evidence: /blog/rea-beginner-guide/
- Pin 6.5.0: /blog/rea-agents-6-5-0/
- Install demo: /docs/install-demo/
- Optional GUI: /blog/eleven-rea-workbench/
- This page: studio ring + oracles + two-room clean-room
- Practice: /lab/ · /showcase/dx-ball/
Compliance
- Analyze only software you own, have written authorization for, open-source you may study, or clean-room teaching fixtures.
- No crack, keygen, DRM-bypass, or exploit PoC content on this page.
- Commercial engines (IDA, Hopper, JEB, …) remain BYO under vendor licenses; REA grants no license keys.
- Stars and awesome-list placement ≠ permission.
- Clean-room = behaviour + public specs; not reading vendor app packages.
- rea.run is a community operator guide; the existing footer disclaimer stays — no extra prominent banner.
- Media under
/media/blog/rea-reverse-engineering-studio/are hosted for this article (studio walkthrough video + cover still).
Sources
- REA: morluto/rea (README Quick start; site pin
[email protected]; DISCLAIMER) - REA author’s public awesome list: morluto/awesome-reverse-engineering (765★, 2026-10-18)
- Graded AI×RE map: zhuyansen/awesome-ai-reverse-engineering (8★; README 119 graded repos on fetch day)
- Clean-room AGENTS example: storytold/filmcraft AGENTS.md
- Engine / bridge repos in the tables (GitHub API stars 2026-10-18)
- On-site: /blog/rea-beginner-guide/ · /blog/eleven-rea-workbench/ · /docs/install-demo/ · /showcase/dx-ball/ · /compliance/ · /faq/legal-boundary/ · /zh/blog/rea-reverse-engineering-studio/
FAQ
| Question | Short answer |
|---|---|
| What is the analysis core? | REA — one MCP (rea-agents) with Evidence and investigation workflows. |
| Which setup command? | Teaching pin: npx -y [email protected] setup (not floating latest). |
| Does REA install Ghidra? | No — BYO; use doctor --provider ghidra after setting env. |
| What are the three oracles? | Byte, behaviour, runtime. |
| Why plant failures? | To test the oracle (TH08-style constant blind spots). |
| What is the clean-room wall? | SPEC.md — behaviour only; Room B never sees analysis. |
| May I analyze any APK from a store? | No — own / authorized / clean-room only. |