Repository navigation
New to RE with AI? What to reverse engineer first, and how to ask #2412
CassieFox23
started this conversation in
General
Replies: 1 comment
|
Thanks for writing this ladder — the “own tiny C first → check every claim → never ‘reverse the whole app’” framing matches what trips most new REA users. One practical add-on for people who want a disposable practice target without installing Ghidra on day one: the community Codespaces/Actions lab ships a self-owned Electron-shaped demo only (authorized fixture), so you can walk install → absolute path → narrow question without bringing a stranger’s binary onto your main machine. Community install notes (unofficial, pin-aware): https://rea.run/docs/install/ Not affiliated with the REA maintainers — just documenting the same authorized-lab habit you describe. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
TL;DR: Start small. Ask your AI short questions about one file you own, and check every answer. This guide gives a ladder of six targets, easiest first. It runs from a C program you write yourself up to malware inside a VM.
I'm a hobbyist who tests REA, not a lawyer, and this is not legal advice. I asked Claude Code (Sonnet 5.5) to research and draft this guide. Facts it checked say where they came from. Facts it could not check say "unverified". Dates are 2026-10-12.
Who is who. "I" is me, the human. "We" is me and Claude Code, the AI agent I use. I pick the targets and the questions. Claude Code runs the tools on my PC. The bigger tests below say which model ran them.
Edit (2026-10-12): A blind review found mistakes, and this version fixes them. Setup now ends with a working engine. The first steps come first. Wrong links and practice-site facts are fixed. The tips now fit any AI, not just Claude.
Part 0: for people new to both RE and AI
What this looks like
Reverse engineering (RE) with an AI means small, specific questions. You pick one file, one function or one format. You ask what it does. Then you check the answer.
It does not mean "rebuild this app". REA does not hand you a finished copy of a program.
Why "REA , make no mistakes, go" fails
app/main.c). GitHub's language count shows about 44 million bytes of C in its repo. That is the C only. We got it withgh api repos/GNOME/gimp/languageson 2026-10-12.mainin a stripped build asFUN_004003a0. Ghidra made up that name. The AI has to guess what the code is for.Good ask, bad ask
Bad asks 3 and 6 are on a list in REA's disclaimer. It lists what REA "will not help with". That list names "license checks" and "anti-cheat systems". It also names "developing game cheats". Bad ask 1 may break the same list if the app is closed-source. All six are weak asks anyway.
How we actually use it
I do not ask REA to take a whole game apart. I point it at one small part of a mod, to fix a problem or find a conflict. REA gives my AI and me the real bytes and functions from a file, plus Ghidra's analysis behind each answer. Each reply has an evidence id and a list of limits. That is easier than working with an agent alone. I put the questions in my own words. My notes keep what REA showed, not what I typed.
The ladder, easiest first
Every level has the same rule: it is yours, it is open source, or it was made to be taken apart. Nothing here is about online games, anti-cheat, DRM or cracking. The setup steps and Level 1 are right below. Levels 2 to 6 are in Details, with starter prompts.
Your first 30 minutes
Before you start. Level 1 assumes Linux, with gcc and binutils installed. Binutils is the package that has
strip,objdumpandnm. Rungcc --versionto check for gcc. What about Windows? REA's README has a link to its "experimental Windows Ghidra support" page. Its install doc says the Windows lane "admits native x86 and x86-64 PE applications and DLLs". PE is the Windows program format. Level 1 makes a Linux program, so it needs Linux.REA's README gives most of these steps, and its installation doc gives step 2. I quote their commands as written. We did not run setup for this guide.
Check Node.js. The README says REA needs "Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+, plus npm". Run
node --versionto see yours.Get Ghidra and a JDK first. Setup will not do it for you. In the doc's words, setup "never downloads, installs, upgrades, or modifies Ghidra or Java". It says to "Extract Ghidra and install the JDK outside REA, then export absolute paths".
Download Ghidra 12.1.x from Ghidra's releases page on GitHub, and unzip it. The doc says REA "accepts Ghidra 12.1.x". On 2026-10-12 the newest was 12.1.4.
Install a 64-bit full JDK, 21 or newer. The doc says "Current 12.1 releases require JDK 21 or newer". "Full" means it has
javac, which REA's check looks for.In the terminal where you will run setup, set the two paths. Use your own folders:
The doc marks
JAVA_HOMEas "optional if java/javac are on PATH".Why Ghidra? For native programs, the README lists three engines. The disclaimer calls two of them proprietary tools. This guide uses the third, Ghidra. It is free, and it is Apache-2.0. On my PC, REA reported Ghidra 12.1.4. My NE (16-bit Windows) executables through the Ghidra lane: I have a working fork prototype. Would you want it? #2231 test used JDK 21. Static JavaScript and .NET checks need no engine.
Run setup in that same terminal. The command is
npx rea-agents setup. The README says to choose your agents, review the proposed changes, and approve them. It supports many agent apps, such as Claude Code, Cursor, OpenCode and Qwen Code. See REA's list of supported agents. Setup can "save verified paths for an existing Ghidra installation". It "shows every exact environment entry in its plan". Setup may also offer Hopper, as "a separate optional choice". Hopper is "separate commercial software with its own license". This guide uses Ghidra, so you can say no to Hopper. Then restart your agent.Check the link. Your agent app should list REA as a connected MCP server. Each app shows this its own way. In Claude Code, for example, type
/mcp, or runclaude mcp listin a terminal. We read both in Claude Code's own MCP docs.Optional check. Run
npm install --global rea-agentsto get thereacommand. Thenrea doctor --provider ghidra --jsontests Ghidra. That row is in REA'sdocs/installation.md.Make a tiny target. Use the C program in Level 1 below.
Ask three starter questions. Give the full path, because REA rejects relative paths.
Running a program is a separate step. The README says runtime capture "runs or interacts with the selected target". REA's process capture doc says "This is not a sandbox." So never ask your AI to run a file from a stranger on your main machine.
How to check the AI's answer
observed,derivedandinferred. In my A stripped bzip2 build on Linux: what REA returned, checked against the build and the docs #2254 test, facts from Ghidra came backobserved. Facts REA worked out came backderived. Check theinferredones the hardest.objdump -dandnmare on most Linux systems.check_passwordare the AI's labels, not facts. A stripped file keeps no names for your own functions.Level 1: a tiny C program you write yourself
What it is. A program of about 20 lines that you write and compile. You open the build in REA and compare what it shows with your own source.
Why it is a good start. You know the right answer. You can see what the compiler does to your code. A program you wrote is yours to take apart.
Where to get it. On Linux with gcc and binutils, your computer has what you need. The compiler is gcc, which is GPL-3.0-or-later. We read that from the header of
gcc/main.ccin the gcc-mirror GitHub repo. The repo also holdsCOPYING3andCOPYING.RUNTIME. GitHub's license API says GPL-2.0, from the olderCOPYINGfile. Save this ashello.c:Build it four ways:
Claude Code (Sonnet 5.5) ran these on my PC with gcc 16.2.1, while drafting this guide. All four builds work. The flag
-O0means no tuning. The flag-O2lets the compiler tune the code. The toolstripremoves the names of your own functions. Names from shared libraries, likeprintf, stay, since the program needs them to run.Your addresses may differ. Run
file hello-O2. Ours says "LSB executable". If yours says "pie executable", your gcc made a PIE build. Thenmainsits at a different address, so itsFUN_name differs too.First prompts.
What we saw. Claude Code (Sonnet 5.5) opened
hello-O2-strippedwith REA and Ghidra 12.1.4 on my PC on 2026-10-12. We did not open the-O0builds in REA, so we make no claim about those. The reply showed:mainat 0x4003a0, calledFUN_004003a0. Your own names are gone.printf("Sum of 1 to 10 is %d\n",0x37). The call toadd_upis gone. The compiler worked out the sum, 55, before you ever ran it. 0x37 is 55.strcmp. A secret in a file is not secret.What you learn. Stripping removes your own names but keeps text. Optimizing changes the code. A decompiler gives a guess at your source, not the source.
Bonus. Make a small SQLite file yourself, like a to-do list. REA can read it with
inspect_sqlite_database. Its doc says this needs "Node.js 24.x >=24.15 or 26+". So Node 25 is not on the list. SQLite is public domain, says sqlite.org. Untested here.How to pick your own target
Ask these in order. A "no" to the first three means stop.
Details (tap to open)
Level 2: crackmes and CTF challenges
What it is. Small programs built by other people to be taken apart. You find how the check works. A crackme is a program with a hidden check. A CTF (capture the flag) is a puzzle contest.
Why it is a good start. They are made for this, they are small, and many have a write-up to compare with.
Where to get it.
First prompts.
What you learn. Strings, comparisons, and how a program decides yes or no. Aim to find the password and explain how the check works. A keygen for a crackme is fine, and the FAQ says why you might write one. Real software is another matter. There, REA's disclaimer will not help you get past "license checks". The FAQ says patching the file while you study it "is completely fine". But a writeup should not end in a patch, unless the author says it is fine.
Safety. These files come from strangers. Running a file is a separate step from reading it. If you run one, use a VM.
Level 3: a stripped build of a small open-source tool
What it is. A small command-line tool that is open source. You get a stripped build and the real source. Then you ask REA where things are, and check against the source.
Why it is a good start. The source is the answer key. It is how my #2254 demo worked.
Where to get it.
LICENSEfile holds the bzip2 license, a BSD-style one with four conditions. We read it from that tarball on 2026-10-12. My PC already has/usr/bin/bzip2. We checked that it is version 1.0.8, stripped, and has the "Can't guess original name" text. Your distro may differ, and it may patch the source.make. Then strip a copy.First prompts.
What you learn. How a stripped build maps to source. How the compiler can fold small functions into bigger ones. Who calls whom.
Level 4: open-source games, old programs, and your own save files
What it is. This level has three kinds of target. One is bigger open-source programs. One is old programs. One is data files from a single-player game you own.
Why it is a good start. It is the same skill as Level 3 on bigger, more fun targets. They are still open source, so you can still check.
Where to get it.
src/supertux/main.cpp. Get SuperTux on GitHub. Build it yourself. Untested here.appsfolder hasesmtool,bsatoolandniftest. They read data files from an older single-player RPG you own. The project is on OpenMW's GitHub page. A release shipsesmtool. Strip a copy, as in theesmtoolcase in Real examples below.license.txt. The SPDX license list marks it as approved by the OSI, but not as free by the FSF. Builds are on the Open Watcom v2 releases page. REA's DOS doc says REA opens 16-bit DOS programs and refuses NE, LE and LX files. In NE (16-bit Windows) executables through the Ghidra lane: I have a working fork prototype. Would you want it? #2231, a 16-bit Windows (NE) program was refused. This is a stretch goal.First prompts.
What you learn. Bigger call graphs. File formats. How to cut a big program down to one question.
Level 5: your own web app, or an open-source Electron app
What it is. Electron apps are desktop apps built from web pages. REA can read a web page's scripts, and an Electron app's folder or
app.asarfile.Why it is a good start. Scripts are plain text. Your own app has an answer key. A static check reads the files and does not run the app, says the README.
Where to get it.
What we tested. Claude Code (Sonnet 5.5) made a 5-file Electron-style folder on my PC for this guide. It has a main file, a preload file, a page, a script and a
package.json. It pointedanalyze_javascript_applicationat it. REA found 1 window, 1 preload file, 1 bridge API, and 1 message channel. It showed a sender in the page and a handler in the main process. It did not run the app. The reply was about 262,000 characters long. We did not open MarkText or Zettlr.First prompts.
Only your own sites. Use REA's browser tools on pages on your own computer. Never point them at a site you do not own. The disclaimer says a right to inspect a file "does not necessarily" let you do more. One thing it names is "interaction with another party's system".
What you learn. Modules, imports, and how a window talks to the main program.
Level 6: malware, for later
Warnings first.
What it is. You take apart real malware to learn how it works.
Why it is last. One wrong click on a live sample can harm your machine and your files.
Where to get it. MalwareBazaar is run by abuse.ch and Spamhaus. Visit MalwareBazaar. The abuse.ch terms of use say you must be an authenticated user. Use is free for not-for-profit work. The MalwareBazaar FAQ says the batch zip files use the password "infected". How a single download works is unverified. Use a VM program that you trust.
First prompts.
What you learn. Imports, strings, packing, and how to write up what you found.
Real examples: how we use REA on mods and small tools
These are our own runs. Claude Code ran each one on my PC, and each part says which model.
A neon city RPG (wake up, choom): troubleshooting its mod plugins
I don't name the game, because it is closed-source. An earlier Claude Code session ran these, and my notes don't say which model. I always work on a copy of a mod file, never the installed files. The game's own program file is about 60 MB. The first open in REA took about 20 minutes. That time comes from my own notes and we did not re-time it. So small mod files win.
ReportOrphanComponentin the real source at the v1.20.5 tag. It reads two fields, at +0x40 and +0x48. The same file finds game functions by a hash, using RED4ext.SDK (MIT). The error text "Failed to find the address for the hash" sits inside the DLL. Why it helped: open source gives you an answer key. You see REA be right before you trust it on a closed file..redsfile, so we read them as plain text. We asked what each one touches. The notes say the newer one keeps the old version's five files byte for byte. It adds five new spots that need a second "core" mod. Without the core, it shows a popup on every start. The core mod wraps no game code and does no per-frame work. One 8 KB archive stayed unread, because it needs another tool. Why it helped: it is the same habit. Read first, install second. We knew the needs and risks before the install.A dragon-shouting fantasy RPG: a memory bug in its mod plugins, found with kuna
Same rule: I don't name the game, and I don't ask REA to take it apart. These two plugin files are open source. We ran them through kuna, a separate open-source decompiler (Apache-2.0), in kuna issue 1034. Claude Code (Sonnet 5.5, verified by Opus 5.5) ran it, per the footer of that issue. It is not REA, but the habit is the same.
decompile-allwith a 6 GB memory cap per run. 167 finished clean. Two hit the cap. One is the CrashLoggerSSE plugin file (MIT, 3,209,728 bytes). The other is the A-pose fix plugin file (GPL-3.0, with added exceptions). The last file finished, but one of its worker processes hit the cap on the way. The issue counts only 169 of the 170. That last file comes from my run notes. Why it helped: a batch can find odd files that you would never check by hand.--max-fn-memory. On the merged build, the first file finishes in 20 seconds with 8 workers. The second finishes in 17 minutes. There, 390 of 14,543 functions end in errors, mostly from the memory limit. Why it helped: the report led to a fix that other people can use.Small open-source tools, no game names needed
Claude Code ran these too. The tests are in #2326, #2254 and #2231. Each footer there names the model: Sonnet 5.5, verified by Opus 5.5.
esmtool(GPL-3.0). We opened a stripped copy of the 0.51.0 build. We asked REA for the callee lists of 50 functions, then checked each one againstobjdump. 22 of the 50 lost real calls. Twenty of those were picked because they lost the most, so 22 is not a rate. All 100 replies saidcomplete, with no note about the cut. This became issue [Bug] Callee and caller reads give no warning when Ghidra's function body stops short #2326, and another contributor opened a fix in fix(ghidra): warn when callee/caller reads stop at a truncated function body #2360. Both were still open on 2026-10-12. Why it helped: REA's reply was clear enough to test against a second tool, and the gap was easy to show.Not confirmed
-O0builds in REA. We built them but did not open them.Sources
Licenses checked
COPYING3andCOPYING.RUNTIMEthere.app/main.c. The license API said NOASSERTION.LICENSEin the 1.0.8 tarball from Sourceware.src/supertux/main.cppheader says "or (at your option) any later version".license.txt. The SPDX id is Watcom-1.0. SPDX list 3.29.0 marks it OSI-approved, but not FSF-free.LICENSEfile.LICENSEfile. The license API said NOASSERTION.LICENSEfile. The license API said NOASSERTION.LICENSE.md.package.jsonsays "GPL-3.0", and its README says "GNU GPL v3".LICENSEfile, with a modding exception and a linking exception in itsEXCEPTIONSfile.🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊
All reactions