REA in practice
01 / The goal · Binary investigation
Reverse engineer
with AI.
Follow the evidence.
What makes a binary accept one flag and reject another? Follow REA from the first clue to the checking code, then test the answer against the original program.
03 / The result
26 equations recovered.
One candidate verified.
Z3 solved the recovered constraints. REA’s capture_process_scenario recorded the original binary accepting the candidate and rejecting a one-character change.
DownUnderCTF 2023 · Guided reproduction
Fresh REA queries, solver output and original-program verification.
A clue hidden in four bytes
The 22nd character
has to be 7.
REA reads EB 01 F2 00 from the binary. Decoded, that mask selects just one character.
Skip 21
Select 1
Skip 14
Try the recovered rule above. Both full-program verdicts were captured with REA; this browser demo replays those two inputs.
Ask your agent
Use REA to inspect ms_flag_checker. Find the flag-checking logic and extract its constraints. Solve them with Z3, then test the candidate and a one-character change against the original binary.
Suggested instruction. You give the goal; the operations below show the recorded investigation.
- 01
Find the entry point.
Search the binary for the input prompt and verdict messages.
search_strings {"pattern":"flag|correct|wrong|input", "mode":"regex","case_sensitive":false} - 02
Reach the checker.
Follow the prompt’s reference to the function that checks the input.
xrefs {"address":"0x102004"} resolve_containing_procedure {"address":"0x10126d"} analyze_function {"procedure":"0x10124d"} - 03
Extract the constraints.
Read the encoded masks and target sums to reconstruct 26 equations.
read_bytes {"address":"0x1040e0","length":624} read_bytes {"address":"0x104060","length":104}
01 / The goal · Inside Joplin
Reverse engineer
with AI.
See how apps work.
Two notes share a title. Their links still need to reach the right file. Follow REA into Joplin’s Markdown exporter to see how it keeps everything connected.
03 / The result
Export order explained.
Five links checked.
Joplin reserves note paths, copies attachments, then rewrites links before writing notes. A controlled replay of the shipped code confirmed distinct filenames for same-title notes and five links that resolve.
Joplin 3.7.21 · Shipped-code analysis
Verified with synthetic notes in a controlled replay.
Two notes. The same title.
Reserve the filenames.
Then connect the notes.
Work/Research/Roadmap_ Q4.mdWork/Research/Roadmap_ Q4-1.md- 01Assign paths
- 02Copy resources
- 03Rewrite links
- 04Write notes
[Next](:/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb)[Next](../../Work/Research/Roadmap_%20Q4-1.md)The first note can link to the second before its file exists. Shipped Joplin modules produced this output with synthetic notes and controlled adapters.
Ask your agent
Use REA to inspect Joplin’s app.asar. Follow the Markdown export command into its implementation. Explain how note and attachment IDs become file paths, then verify the mechanism with a controlled replay.
Suggested instruction. You give the goal; the operations below show the recorded investigation.
- 01
Inspect the application package.
Identify the installed version and inventory the packaged program files.
rea inspect-artifact "[Joplin resources]/app.asar" --format json - 02
Follow the export entry points.
Analyze the export commands and locate their calls into InteropService.export. Command excerpt:
rea analyze-javascript-application "[Joplin resources]/app.asar" --source-path commands/exportNotes.js …Show full recorded command
rea analyze-javascript-application "[Joplin resources]/app.asar" --source-path InteropServiceHelper.js --source-path commands/exportNotes.js --source-path commands/exportFolders.js --max-heap-mb 2048 --format json - 03
Trace IDs to exported paths.
Analyze analyst-selected service and exporter code, then query reads and writes of notePaths and destResourcePaths.
trace_javascript_semantics query: {"seed":{"kind":"property","name":"notePaths"}, "direction":"forward-influence"}
Choose your next investigation.
Find the tools that fit your target and environment.
REA
Agent-powered workflow
Connect your coding agent to tools for investigating apps and understanding their behavior.
RevEng.AI
Binary analysis platform
Explore AI-assisted binary analysis, decompilation, and code understanding in one platform.
Sidekick
Binary Ninja extension
Bring AI-assisted exploration and code explanations into your Binary Ninja workflow.
Choose with context.
REA vs RevEng.AI
An agent-connected workflow or a binary analysis platform? Start with the task you need to solve.
Learn the method.
Your first AI-assisted investigation
Getting started · 6 min read
Make the original program check the answer
Verification · 5 min read