RECheat sheets
Reverse Engineering with rea
rea 6.7.0 with Ghidra 12.1.4: inspect binaries, read Evidence records and compare bundles.
Where rea stops and Ghidra starts#
One inspection, step by step#
One binary, start to finish#
rea doctor --provider ghidrais the provider healthy
rea inspect-artifact <path>artifact graph of the file, no Ghidra
rea analyze <path> --provider ghidrasegments, procedure and string counts
rea function <path> <name> --provider ghidrathe dossier of one procedure
rea decompile <path> <name> --provider ghidrapseudocode of one procedure
Work with Evidence bundles#
| Task | Code |
|---|
| List the records of a bundle without payloads | rea inspect-evidence-bundle '{"path":"<bundle>", "detail": "summary"}' |
|---|
| Write a canonical copy with sorted keys | rea evidence-export <bundle> <out> |
|---|
| Validate every record id and manifest of a bundle | rea evidence-import <bundle> |
|---|
| Compare two bundles by record membership | rea compare <left> <right> |
|---|
| Map a virtual address to a file offset | rea address-to-file-offset <path> <address> --provider ghidra |
|---|
Ask rea one question#
| Task | Code |
|---|
| Check Ghidra and the environment | rea doctor --provider ghidra --format json --filter-output healthy,environment_healthy,scope,scope_checks |
|---|
| List the capabilities | rea capabilities --format json |
|---|
| Inspect an artifact | rea inspect-artifact fixtures/ledger-arm64-O1 --format json |
|---|
| Inspect a Mach-O layout on macOS | rea inspect-macho |
|---|
Commands and environment variables#
| Command | What it does |
|---|
rea function | Calls analyze_function for one dossier per procedure |
|---|
rea decompile | Calls procedure_pseudo_code for pseudocode |
|---|
rea analyze | Calls binary_overview for the whole binary |
|---|
GHIDRA_INSTALL_DIR | Ghidra install directory, else the Homebrew path |
|---|
Questions and answers#
- Does
inspect-artifact need Ghidra? - No. It returns in under a second, without Java.
- Which command gives pseudocode for one function?
rea decompile, which calls procedure_pseudo_code.- What is the first call on a new file?
- Run
rea inspect-artifact. It needs no engine.
Tips#
- Ask rea for an Evidence record, and read Ghidra's own listing when you doubt it.
- Use the CLI for one question and the MCP server for a session of many.
- Expect 7 to 9 s for the first Ghidra question on a file, and milliseconds after it.