REA · Ghidra · AI agents

Your agent opens any program and explains how it works

REA gives Claude Code, Codex or Cursor the tools of reverse engineering. Here you understand the technology, see the real cases and find out whether it is worth it for you.

Reverse engineering with AI: REA + Ghidra
In short

Reverse engineering is figuring out how a program works by looking only at the executable, without the source code. REA (Reverse Engineer Anything) is an open tool that connects your AI agent to decompilers such as Ghidra, from the NSA, and returns its conclusions with the proof and the limits of each one. It is for developers, security people and anyone who studies software. This guide gathers the links, explains everything in plain English, shows real cases and a test done here. To use it, you need Node.js and an AI agent in the terminal.

What it is

A bridge between your agent and the specialist tools

REA is not a new decompiler. It gives the agent simple commands on top of Ghidra, Hopper and IDA, which used to take weeks to master.

Reverse engineering with AI: what it is, Ghidra, how it works, cases, worth it, precautions

🔍 No source code

Opens native binaries (Mac, Windows, Linux), Electron/JavaScript apps, .NET, Android and websites, and shows how a function works.

🧾 With proof attached

Every answer comes in four parts: evidence, recovered map, limits and what was left unanswered. No "trust me" paragraph.

💻 All on your machine

The analysis runs locally. The analyzed program is not uploaded; only the results go to your agent's model.

How it works

From binary to explanation

Compiling erases names, types and comments. Reverse engineering is the way back, and REA puts the agent to work on that path.

You ask the agent→ REA (MCP server)→ Ghidra · Hopper · IDA→ pseudocode, calls, strings→ evidence + limits→ the agent explains or implements
Source code goes through the compiler and becomes a binary
Compiling turns the code into machine instructions; the names disappear along the way.
Electron easy, native hard
An Electron app still keeps the JavaScript (easy analysis, without running anything). A native app needs a decompiler.
Ghidra free, Hopper, IDA Pro expensive
Ghidra (free, from the NSA), Hopper (lightweight) and IDA Pro (industry standard, expensive): REA uses whatever you have.
Your agent, REA via MCP, Ghidra Hopper IDA
The agent talks to REA over MCP: "open binary", "find strings", "who calls this function?".
Why it works

The original program is the specification

The reason REA works so well isn’t the AI model. It’s the reference.

🎯 Ready-made reference

When you clone an existing program, the program itself shows you what the result should look like. No one needs to explain the intent: it’s already built in.

🔁 Closed loop

The agent builds, compares against the original, and knows right away whether it got it right. It’s a validation loop that doesn’t depend on you. That’s how DX-Ball reached 140 functions identical byte for byte.

⚠️ The misconception

This doesn’t prove the agent can build anything. What you want to create doesn’t exist yet. Without a reference, the agent writes good code that misses the mark. The solution is to create the reference: requirements, examples, and a side-by-side comparison at the end.

The test that applies to any skill: if the next model is twice as good, does it matter more or less? Prompt tricks matter less. Knowing how to explain what you want and set up a reference for the agent to check itself matters more.

The limit · server

What runs on the server cannot be reverse-engineered

REA reads what is on your computer: the app, the binary, the JavaScript. The data and logic on the company's server never reach you, so there is nothing to open. You see what the app sends and receives, never how the server decides.

🔒 Out of reach

Database and user accounts, business rules and pricing, AI models and prompts, payments, server keys and passwords.

💸 You cloned the screen, not the engine

For your version to work, you have to rebuild the server and pay for it: hosting, database, AI APIs. It is often the most expensive part of the system.

✂️ The owner can cut you off

If your clone uses the original server, the company can block the key, change the API or shut off access whenever it wants, and everything stops working.

If you build apps: keep what is valuable on the server. Assume any agent can map your app; what protects you is the server, the data and trust, not closed code. ▶ Video: it reads the app, not the server

Prerequisites

What you need

For JavaScript/Electron apps, Node is enough. For native binaries, you need an installed decompiler.

Node.js

Versions 22.19+, 24.11+ or 26+ (23 and 25 are not supported).

node -v

An agent with MCP

Claude Code, Claude Desktop, Codex, Cursor, Gemini CLI, Windsurf, OpenCode, Copilot CLI, VS Code and others.

claude --version

Decompiler (native only)

Ghidra (free, needs Java), Hopper or IDA. The setup can install Hopper, with your permission.

# Ghidra: download at
github.com/NationalSecurityAgency/ghidra/releases
Tools · cost

Which decompiler to use, and what it costs

Of the three REA supports, only Ghidra is fully free and open source. IDA has a Free edition, with limits.

ToolFree?Open source?Price
GhidraYesYesUS$ 0
HopperFree trialNoPaid license
IDAFree editionNoPro from ~US$ 1,099/year

1. Ghidra — the pick

Built by the NSA, runs on Windows, Linux and Mac, decompiles and supports script automation. No license cost, commercial use included.

Official GitHub →

2. Hopper — the Mac alternative

Commercial, with a free trial. The current version advertises native MCP integration, which matters for AI agents.

Official site →

3. IDA — the professional one

IDA Free only covers x86/x64 and non-commercial use, and lacks the IDAPython API of the paid plans, which gets in the way of automation.

Editions and pricing →

And what does a REA setup cost?

AI agent (Codex or Claude Code)Variable: subscription or tokens
REA + MCPFree (MIT): integration and orchestration
GhidraFree and open source

Bottom line: to build your own reverse engineering system with agents, start with REA + Ghidra + Codex. There is no decompiler license to pay, and the analysis runs on a Windows or Linux machine, including a properly configured VPS. The main cost is compute and AI tokens, if you use a paid model. Prices change: check the official sites before buying.

Under the hood · technical

CLI and MCP server on the same core

Read in the version 6.4.0 code (10/12/2026). REA does not decompile on its own: it orchestrates specialist engines and returns everything in the same evidence format.

REA architecture: agent, CLI and MCP server, Evidence core, and Ghidra, Hopper, IDA, Frida, and JS/Electron engines

Two entry points, one core

scripts/rea.mjs is the entry point: rea mcp starts the MCP server (stdio); any other command goes to the CLI. Both use the same application layer and evidence contract. The CLI has around 150 commands, and MCP has more than 100 tools.

Everything becomes Evidence

Each response includes evidence_id, the sha256 of the analyzed file, who produced it (provider), the confidence level, and a list of limitations. When it doesn’t know, it says so. In a version comparison, it only says “removed” if coverage on the other side is complete; otherwise, it marks it as unknown.

EnginePurposeLicenseLinux ARM64
JavaScript/Electron (built in)App graph, IPC, source maps, without executionFreeYes (tested)
Ghidra 12.1 + JDK 21Native binary: pseudocode, referencesFreeYes, with the decompiler compiled for ARM
HopperNative binaryPaid, with a demoNo with the setup (downloads the x86 package)
IDA · JEBNative · AndroidPaidDepends on the product
Frida · browser (CDP) · adbObserve at runtimeFreeYes

What setup writes

Claude Code: ~/.claude.json and the skill in ~/.claude/skills. Codex: ~/.codex/config.toml. OpenCode: opencode.json. It shows the plan, asks for approval, creates a .rea.backup copy, and pins the version. Run it first with --dry-run; to undo, use rea uninstall. The project warns that it is not a sandbox, and we found no code that sends usage data.

No guardrails · cloud

No machine? Two OpenRouter-style platforms

Claude, Codex and Gemini sometimes refuse parts of a reverse-engineering job, even a legitimate one. The way out is an open model that does not refuse. If your computer cannot run the model, these two prepaid platforms host it for you: add US$ 5 to 10 in credit, get the key and ask your agent (dsh, Claude Code, Codex) to use it.

1. abliteration.ai

Open "abliterated" models (the refusal reflex removed from the weights), through an OpenAI-compatible API. Prepaid per token or monthly plan.

# API endpoint
https://api.abliteration.ai/v1

Open the site →

2. OrcaRouter

A router with 200+ models behind a single endpoint, just like OpenRouter. It has an open-source (MIT) version you can host yourself.

Open the site →

Heads up: in the cloud, your code leaves your machine. For your own app or sensitive files, prefer a local model (Ollama). Prices and catalogs change: check the page before adding credit.

Full step by step, with dsh and the tested local models: REA sem travas →

User guide · step by step

Get started in 4 steps

Commands from the project itself. REA changes almost every day: check the version first.

1

Try it without installing anything

Static analysis of an Electron app needs neither Ghidra nor MCP, and does not run the app. Point it at the folder or the app.asar.

npx -y rea-agents@latest analyze-javascript-application /caminho/absoluto/app.asar \
  --max-heap-mb 1024 --analysis-timeout-ms 60000 --json
2

Connect REA to your agent

The setup shows the plan, backs up your configuration and asks before changing anything. It registers the MCP server and installs the investigation method (skill).

npx rea-agents setup --dry-run   # shows what it will write, without writing
npx rea-agents setup             # restart the agent afterwards
3

Check only what your task needs

The scoped doctor tests one agent or one specific engine, without failing on something you will not even use.

rea doctor --client claude_code --json
rea doctor --provider ghidra --json
4

Ask the agent

In plain language, with a program of yours or one you are authorized to analyze.

"Understand how search works in app X, show me the evidence
and build something similar in my project."
Method · 5 steps

One feature at a time, with proof before you build

REA brings the evidence and your agent writes the code. The method below is what separates a sloppy copy from a version of your own that works.

Simulated example. To illustrate, we imagine REA studying Obsidian's quick switcher (Ctrl+O), an Electron app. We did not run this test: the findings below show the shape of the work, not a measured result.

🎂 The cake and the recipe

The company keeps the recipe, which is the source code. You have the cake, which is the installed app. REA tastes the cake and the agent works out a rough recipe, without the original names. Then you bake your own and compare until it tastes right.

📚 The library book

You don't have to own the app, you need the right to examine it. Reading and learning is fine. Photocopying and selling (copying the code), breaking the lock (DRM) or sneaking past the desk (cheats, logins) is not.

1

Pick one feature, not the whole app

A broad request gets a vague answer. Ask about one behavior you can see and test.

Too broadFocused
"Reverse engineer Obsidian"How does the quick switcher find the right note from three letters?
How does a [[link]] become a line in the graph view?
How does the app notice a file changed outside it?
2

What the app is built with picks the tool

Obsidian is Electron: the JavaScript ships inside app.asar, and REA's JavaScript analyzer is enough. Free, no Ghidra, and the app never runs.

App typeExamplesTool
Electron desktopObsidian, Notion, SlackREA's JavaScript analyzer (free)
Native program.exe, .app, gamesGhidra (free), Hopper or IDA
Websiteany siteBrowser tools: only what reaches you
Android or .NETAPK, DLLEach format's own analyzers
3

Summary first, then one piece

A whole-app analysis is big: in our 6.4.0 test, an Electron app with 210 files produced a 41 MB JSON. The agent doesn't need to read it all. It reads the overview (detail: "summary"), opens the search module and traces only that feature. And it never reruns the same analysis: it saves the result and goes back to it.

Full analysis→Summary→One module→One feature traced
4

Label every finding: seen, inferred or unknown

Before you build on a finding, say what kind it is. In the simulated example:

✓

Seen

In the files, with the excerpt cited. "The note list lives in memory and is filtered on every keystroke."

≈

Inferred

A careful guess, not yet proven. "A letter at the start of a word seems to score higher than one in the middle."

?

Unknown

Out of REA's reach. "Paid Sync resolves conflicts on the company's server."

Unknown is not defeat: it becomes a design decision. With no access to the Sync server, our version keeps notes in a local folder and that's it. And remember: reading code never proves it runs that way. The test does.

5

Rebuild the behavior, with your own code, and test

Each finding becomes a decision and a test against the original. Never copy the app's code, icons or text.

Finding (simulated)What it meansOur decision
In-memory filter on every keyFast with thousands of notes, no databaseIn-memory list and a filter written from scratch
Word starts score higherInferred: still needs proof30 identical searches in both apps; the goal is the same top note every time
Sync on the serverOut of REA's reachOut of scope: local folder

Found a difference? Go back to step 3, trace the exact spot and adjust. Final goal: the same behavior and zero copied lines.

Ready-made prompt (swap the parts in brackets)

Use REA to learn how [the quick switcher (Ctrl+O)] works in [Obsidian].
Summary first. Trace only that feature.
Label each finding as seen, inferred or unknown.
Then build my own version, with my own code, and test it against the original.

Not a coder? Stop after the third line and ask for the plain-English report only. See the full step-by-step walkthrough.

In practice · for non-coders

My own notes app, from the Obsidian installed on your PC

This is not about copying all of Obsidian at once. It's about building your notes app, one feature per round, with the method above. Walkthrough for Windows.

First of all: read Obsidian's terms of use. Studying it for personal use is the safe ground. Distributing or selling the result, or copying the app's code, icons and text, is not.

0

Set up once

Install Node.js (LTS version: next, next, finish) and have Claude Code or Codex installed and signed in with your subscription.

1

Make a copy of the app

In File Explorer, paste the folder below into the address bar. Copy the .asar file to C:\projects\my-notes\target\. Obsidian usually has two (app.asar and obsidian.asar); the main one is usually obsidian.asar. If unsure, copy both. That way you work on the copy and never touch the Obsidian you use.

%LOCALAPPDATA%\Programs\Obsidian\resources
2

Install REA

In cmd. It asks which agent you use: pick yours, accept, then close and reopen the agent.

npx rea-agents setup
3

Open the agent in the folder

cd C:\projects\my-notes
claude          # or: codex
4

Understand first

Paste the request and read the report. If something isn't clear, ask: "what does that mean?".

Use REA to learn how the quick switcher (Ctrl+O) works
in the file target\obsidian.asar.
Summary first. Trace only that feature.
Label each finding as seen, inferred or unknown.
Explain it to me in plain English. Don't build anything yet.
5

Then build your version

Now create, from scratch and with your own code, a simple notes app:
- opens a folder of .md notes
- has the quick switcher you studied
Don't copy Obsidian's code, icons or text.
Then run it, test 10 searches in both and show me the differences.
6

Repeat, one feature per round

Same pair of requests ("understand X", then "add X"): [[note]] links, the graph view, noticing when a file changes outside the app, dark theme. Fix one difference at a time and always test with your real notes.

What doesn't come along

Whatever runs on the server: paid Sync, Publish and the plugin store. REA can't see them. In your version, notes live in a local folder; to sync, use Google Drive or OneDrive.

If it fails on Windows

Some REA tools only work on Linux. Then run the same walkthrough in WSL or on a VPS.

💬 Tell us

Where are you reading from? What did you think of this case? And where you live or work: are people already using AI like this, and which everyday program would you like to have your own way?

Want to learn how to do this? INEMA.CLUB has open, free courses and guides on hands-on AI.

Learn at INEMA.CLUB
Real cases

What people have already done with it

Numbers taken from the repositories and the official site on Oct 10, 2026.

The 3 rules of the vault
The vault. An app compiled without names (242+ FUN_… functions). The agent found the right function, recovered the 3 rules from the code and wrote a generator: AGNT-1001 opened it.
Cycle: trace, write, compile, compare
DX-Ball (1990s). 528 candidate functions, 283 rewritten in C, 140 byte-for-byte identical. The left/right sound passed 3,205 tests against the original.
Headphones and a one-button app
Headphones. In ~30 min of back and forth, a user got his own one-button app to turn on wind reduction. Other cases: Notion's copy and paste and the bullet pattern of a PC-98 game.
Clean room: same result without seeing the code
PhotoCraft. A different method (clean room, without looking at the binary): Photoshop rebuilt in Rust from public documentation + tests against the original. Still in alpha.
Worth it?

Who it is useful for, and who it is not

Assessment based on the documentation, the published cases and a test on this machine.

✅ Really useful

• Developers who want to understand how a very good app handles search, sync or the clipboard.
• Security and privacy: audit the apps on your machine and see what they send out.
• Recovering logic from a program of yours whose code was lost.
• Study, CTF and preservation of old software.
• People who build tools for AI: the evidence · map · limits · unknowns format is a great model.

⛔ Not for

• People who do not use a terminal: it requires Node and patience with versions that change every day (5.0 → 6.3 in three days).
• Copying a competitor's product: legally risky and misses the point.
• Heavily protected programs (VMProtect, heavy obfuscation) or with the logic on the server.
• Expecting miracles from any model: on deliberately protected binaries, even the best models solve only part of the cases (SRE-Bench).

🧪 First test (Oct 10, 2026, version 6.3.0) · see the 6.4.0 retest

We ran REA 6.3.0 (analyze-javascript-application, no Ghidra, no MCP) on a Linux ARM server. It worked on one of our own Node apps (97 files, 3.5 MB): in 20 s and 1.3 GB of RAM it returned a graph with 2,109 nodes and 3,104 edges, 2,508 findings and 5 declared limitations, without running the app. It hung on two targets that had a single huge JS file (the bundle of an installed Electron app and typescript/_tsc.js, 6 MB): it sat at 100% CPU for more than 20 min on the same file, ignored SIGTERM and only stopped with kill -9. Bottom line: it works well on normal-sized projects; on large apps, run it with a time cap (timeout -s KILL) and without node_modules. The full JSON is huge (241 MB here): day to day, let the agent query it through MCP instead of reading the whole file.

Data, server, distribution, trust, speed

For those who sell software: assume any agent can map your app. What protects you is data, the server, distribution, trust and speed, not closed code.

Tested here · 10/12/2026

Before and after: the app that stalled, in 94 seconds

Same ARM64 Linux server (Node 24.13), same Electron app that stalled on 6.3.0. We ran 6.4.0 in isolation: HOME and npm cache in a test folder, with memory and time limits on the entire process.

TestResult
Electron app (210 files) on 6.3.0, 10/10Stalled: 100% CPU for over 20 min on a single file; only stopped with kill -9
Same app on 6.4.0, with --max-heap-mb 1024 --analysis-timeout-ms 6000094.5 s, peak of 1.26 GB: 202 JS files read, 0 failures, 7.9 million nodes, 4,898 modules, 13,500 findings. The file that stalled preserved the static facts, and the rest became a declared limitation (377 total)
Our Node project, without node_modules19.7 s, 0.55 GB: graph with 998 nodes and 1,260 links, 1,295 findings
Go binary (inspect-artifact)1.4 s: file format, hash, and inventory
setup --dry-run in a test HOMENothing written; diagnostics show Ghidra and IDA are not configured

How to run it the same way

# Test HOME: nothing touches your agent configuration
mkdir -p /tmp/rea-test
systemd-run --user --scope -p MemoryMax=8G -p RuntimeMaxSec=900 \
  env HOME=/tmp/rea-test npm_config_cache=/tmp/rea-test/npm \
  npx -y rea-agents@6.4.0 analyze-javascript-application /absolute/path/app.asar \
  --max-heap-mb 1024 --analysis-timeout-ms 60000 --json > evidence.json

What changed in 6.4.0: each analysis runs in a separate process, with memory and time limits, and can be interrupted partway through while returning what it has completed. No Linux? Replace systemd-run with your system’s time limit. The JSON output is large (41 MB here): for everyday use, have the agent query it through MCP.

Videos

All videos about REA

From concepts to technical details. The longer videos have a player with chapters and captions on the videos page. Videos are in Portuguese.

🏦 It reads the app, not the server

Why REA can read your bank app but cannot touch your account, what leaks, and the rule for app builders (video in Portuguese). Watch · short

🧠 Inside REA (technical)

Why it works, its architecture, evidence, the before-and-after test, and its limitations. Watch

🛠️ REA in practice

Clone an app in 4 steps and see the error that stalled the test. Watch · reel

🔓 The AI that reverse engineers

What it is, Ghidra, the vault, DX-Ball, and what to watch out for (6 min). Watch

📱 You can clone the app you use

The viral angle: a race with and without REA. YouTube · short

🤔 Can it recreate almost any app?

The hype and what’s real. YouTube

Precautions

Before pointing at a program

REA itself warns you: the responsibility is yours.

License and law, not a sandbox, changes every day
Three precautions that apply to any use.
1 · Law
License and lawMany licenses forbid reverse engineering; breaking copy protection is a separate problem. Safe ground: your own programs, open source, security challenges and what you are authorized to test. This is not legal advice.
2 · Isolate
Not a sandboxIf REA runs the target, it runs with your permissions. A strange binary may hide instructions meant to trick the agent. Use an isolated machine and keep the agent's approvals turned on.
3 · Update
Changes every dayRun rea update or npx rea-agents@latest setup before reporting a problem.