rea-agents 5.0.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +157 -650
- package/bridge/mitmproxy/capture.py +210 -0
- package/bridge/native/rea_lldb_tracer.py +303 -0
- package/bridge/process/ProcessRunTokenReader.swift +263 -0
- package/bridge/process/ProcessRunTokenReaderMain.swift +35 -0
- package/bridge/pwndbg/core_context.py +101 -0
- package/bridge/pwndbg/launch.py +39 -0
- package/bridge/pwndbg/launch_impl.py +34 -0
- package/bridge/pwntools/decoder_runtime.py +59 -0
- package/bridge/pwntools/layout.py +39 -0
- package/bridge/pwntools/layout_impl.py +309 -0
- package/bridge/pwntools/recorded_crash.py +39 -0
- package/bridge/pwntools/recorded_crash_impl.py +143 -0
- package/dist/android/JadxProvider.js +1 -0
- package/dist/application/CapabilityInventory.js +21 -0
- package/dist/application/DirectAnalysis.js +97 -23
- package/dist/application/EvidenceBundleFiles.js +1 -1
- package/dist/application/ReconstructionObligationCandidates.js +5 -1
- package/dist/application/WebNetworkCapturePort.js +1 -0
- package/dist/application/WebNetworkCaptureService.js +132 -0
- package/dist/application/WindowsCapabilities.js +1 -1
- package/dist/application/binary/AnalysisSnapshotCache.js +49 -6
- package/dist/application/binary/BinarySession.js +38 -10
- package/dist/application/binary/BinarySessionOpen.js +16 -3
- package/dist/application/binary/BinarySessionRecords.js +20 -0
- package/dist/application/binaryDiagnostics/BinaryLayoutPort.js +1 -0
- package/dist/application/binaryDiagnostics/BinaryLayoutService.js +57 -0
- package/dist/application/binaryDiagnostics/RecordedCrashPort.js +1 -0
- package/dist/application/binaryDiagnostics/RecordedCrashService.js +60 -0
- package/dist/application/evm/EvmInterfacePort.js +1 -0
- package/dist/application/evm/EvmInterfaceService.js +62 -0
- package/dist/application/javascript/JavaScriptApplicationEvidence.js +1 -2
- package/dist/application/javascript/JavaScriptApplicationService.js +15 -2
- package/dist/application/javascript/JavaScriptArtifactAnalysis.js +42 -23
- package/dist/application/javascript/JavaScriptArtifactGraphDocuments.js +26 -2
- package/dist/application/javascript/JavaScriptArtifactPathResolution.js +74 -24
- package/dist/application/javascript/JavaScriptArtifactReconstruction.js +23 -10
- package/dist/application/javascript/JavaScriptSemanticGraphAsyncProjection.js +7 -7
- package/dist/application/javascript/JavaScriptSemanticGraphBuilder.js +145 -70
- package/dist/application/javascript/JavaScriptSemanticGraphChildProcessProjection.js +14 -15
- package/dist/application/javascript/JavaScriptSemanticGraphConstruction.js +41 -1
- package/dist/application/javascript/JavaScriptSemanticGraphDataProjection.js +7 -7
- package/dist/application/javascript/JavaScriptSemanticGraphFlowProjection.js +5 -9
- package/dist/application/javascript/JavaScriptSemanticGraphObjectProjection.js +3 -3
- package/dist/application/javascript/JavaScriptSemanticGraphProjection.js +118 -12
- package/dist/application/javascript/JavaScriptSemanticGraphResourceProjection.js +3 -3
- package/dist/application/javascript/JavaScriptSemanticGraphValueProjection.js +5 -5
- package/dist/application/{ProcessCli.js → process/ProcessCli.js} +10 -10
- package/dist/application/{ProcessEvidence.js → process/ProcessEvidence.js} +4 -4
- package/dist/artifacts/ArtifactProvider.js +30 -3
- package/dist/artifacts/ArtifactProviderMetadata.js +2 -1
- package/dist/artifacts/ZipArtifactReader.js +3 -0
- package/dist/artifacts/apple/DylibResolutionReader.js +259 -0
- package/dist/artifacts/apple/MachoLoadCommandReader.js +294 -0
- package/dist/{application → artifacts/extraction}/ArtifactExtraction.js +10 -10
- package/dist/{application → artifacts/inventory}/ArtifactGraphConstruction.js +3 -3
- package/dist/{application → artifacts/inventory}/ArtifactInventory.js +4 -4
- package/dist/{application/ArtifactInventory → artifacts/inventory}/classify.js +2 -2
- package/dist/{application/ArtifactInventory → artifacts/inventory}/reader.js +5 -5
- package/dist/{application/ArtifactInventory → artifacts/inventory}/scanCanonical.js +3 -3
- package/dist/{application/ArtifactInventory → artifacts/inventory}/scanReader.js +5 -5
- package/dist/artifacts/readStableArtifact.js +20 -4
- package/dist/browser/CdpCaptureEventHandlers.js +90 -2
- package/dist/browser/CdpCaptureEvents.js +9 -0
- package/dist/browser/PlaywrightElectronActiveProvider.js +12 -3
- package/dist/browser/history/CaptureFailures.js +101 -0
- package/dist/browser/history/CaptureFormatError.js +10 -0
- package/dist/browser/history/CaptureRedaction.js +65 -0
- package/dist/browser/history/CaptureRelease.js +12 -0
- package/dist/browser/history/HarCapture.js +165 -0
- package/dist/browser/history/HarCaptureAdapter.js +20 -0
- package/dist/browser/history/HarCaptureProcess.js +57 -0
- package/dist/browser/history/HarJson.js +91 -0
- package/dist/browser/history/HarSchema.js +72 -0
- package/dist/browser/history/HistoricalCaptureDecoder.js +186 -0
- package/dist/browser/history/HistoricalCaptureFormatAdapter.js +1 -0
- package/dist/browser/history/MitmproxyCaptureAdapter.js +42 -0
- package/dist/cli/artifactCommands.js +26 -1
- package/dist/cli/binaryDiagnosticsCommands.js +39 -0
- package/dist/cli/coreAnalysisCommands.js +2 -2
- package/dist/cli/coreBinaryCommands.js +8 -8
- package/dist/cli/electronCommands.js +16 -9
- package/dist/cli/evmCommands.js +24 -0
- package/dist/cli/firmwareCommands.js +6 -3
- package/dist/cli/javascriptApplicationAnalysis.js +16 -3
- package/dist/cli/jsonOutput.js +133 -0
- package/dist/cli/nativeCallCommands.js +35 -0
- package/dist/cli/processCommands.js +1 -1
- package/dist/cli/streamedJsonOutput.js +56 -0
- package/dist/cli/utilityCommands.js +2 -0
- package/dist/cli/webNetworkCaptureCommands.js +40 -0
- package/dist/cli.js +9 -3
- package/dist/cliBrowserScenarioCommands.js +2 -2
- package/dist/cliCommandNames.js +6 -0
- package/dist/cliJsonInput.js +30 -1
- package/dist/cliOutput.js +21 -6
- package/dist/composition/binaryDiagnostics.js +8 -0
- package/dist/composition/evm.js +4 -0
- package/dist/composition/webNetworkCaptures.js +6 -0
- package/dist/contracts/artifactToolContracts.js +6 -0
- package/dist/contracts/browserCaptureToolInputSchema.js +43 -0
- package/dist/contracts/browserToolContracts.js +4 -3
- package/dist/contracts/errorSchemas.js +8 -1
- package/dist/contracts/evm/evmToolContracts.js +20 -0
- package/dist/contracts/investigationExamples.js +2 -2
- package/dist/contracts/managed/managedToolContracts.js +7 -3
- package/dist/contracts/native/binaryDiagnosticsToolContracts.js +42 -0
- package/dist/contracts/native/nativeToolContracts.js +17 -1
- package/dist/contracts/officialToolContracts.js +12 -9
- package/dist/contracts/process/processCaptureExample.js +2 -0
- package/dist/contracts/sessionLifecycleInputs.js +22 -5
- package/dist/contracts/sessionStatusContract.js +10 -2
- package/dist/contracts/sessionToolContracts.js +8 -1
- package/dist/contracts/sessionToolSchemas.js +10 -3
- package/dist/contracts/toolContractExamples.js +1 -1
- package/dist/contracts/toolContracts.js +6 -0
- package/dist/contracts/toolEffects.js +30 -0
- package/dist/contracts/toolOutputSchemaGroups.js +5 -1
- package/dist/contracts/toolOutputSchemaPrimitives.js +1 -1
- package/dist/contracts/webNetworkCaptureToolContracts.js +24 -0
- package/dist/domain/analysisErrorBase.js +15 -0
- package/dist/domain/analysisErrorCore.js +59 -5
- package/dist/domain/analysisErrorPresentation.js +29 -1
- package/dist/domain/analysisErrorProjection.js +52 -2
- package/dist/domain/analysisSnapshot.js +166 -2
- package/dist/domain/apple/dyldPaths.js +81 -0
- package/dist/domain/apple/dylibResolution.js +367 -0
- package/dist/domain/apple/dylibResolutionFindings.js +75 -0
- package/dist/domain/artifactPathSyntax.js +1 -1
- package/dist/domain/browserObservation.js +1 -1
- package/dist/domain/browserObservationSchemas.js +13 -0
- package/dist/domain/browserScenarioValues.js +9 -2
- package/dist/domain/callPathSchemas.js +1 -1
- package/dist/domain/canonicalDigest.js +13 -1
- package/dist/domain/changedBehavior.js +3 -3
- package/dist/domain/comparisonStatus.js +2 -30
- package/dist/domain/conformanceTrustGate.js +0 -16
- package/dist/domain/evidence.js +17 -5
- package/dist/domain/evm/evmInterface.js +63 -0
- package/dist/domain/explicitSensitiveFailure.js +92 -0
- package/dist/domain/explicitSensitiveValues.js +10 -0
- package/dist/domain/firmware/firmwareAnalysis.js +8 -1
- package/dist/domain/javascript/electronActiveObservation.js +9 -4
- package/dist/domain/javascript/htmlArtifactReferences.js +40 -0
- package/dist/domain/javascript/javascriptExportShapeComparison.js +21 -5
- package/dist/domain/javascript/javascriptExportShapeVariants.js +0 -10
- package/dist/domain/javascript/javascriptSemanticGraph.js +21 -5
- package/dist/domain/jsonValue.js +4 -0
- package/dist/domain/localPath.js +2 -0
- package/dist/domain/native/binaryLayout.js +357 -0
- package/dist/domain/native/nativeCallObservation.js +164 -0
- package/dist/domain/native/objcSwiftMetadata.js +0 -39
- package/dist/domain/native/recordedCrash.js +266 -0
- package/dist/domain/native/recordedCrashNoteCoverage.js +73 -0
- package/dist/domain/{processCapture.js → process/processCapture.js} +139 -2
- package/dist/domain/{processCaptureExample.js → process/processCaptureExample.js} +5 -0
- package/dist/domain/process/processCaptureParsing.js +54 -0
- package/dist/domain/{processCaptureValidation.js → process/processCaptureValidation.js} +18 -2
- package/dist/domain/{processComparison.js → process/processComparison.js} +1 -1
- package/dist/domain/{processObservation.js → process/processObservation.js} +1 -1
- package/dist/domain/{processTraceSpecification.js → process/processTraceSpecification.js} +1 -1
- package/dist/domain/providerSelectionError.js +4 -2
- package/dist/domain/reconstructionVerification.js +3 -3
- package/dist/domain/reconstructionVerificationSchemas.js +1 -1
- package/dist/domain/residualUnknown.js +3 -2
- package/dist/domain/staticRuntimeCorrelation.js +3 -3
- package/dist/domain/webCaptureDiff.js +1 -0
- package/dist/domain/webNetworkCapture.js +118 -0
- package/dist/domain/webNetworkCaptureCoordinates.js +58 -0
- package/dist/dotnet/ManagedExceptionRegionValidation.js +41 -0
- package/dist/dotnet/ManagedMemberInspector.js +4 -2
- package/dist/dotnet/ManagedMemberInspectorCore.js +38 -32
- package/dist/dotnet/ManagedMemberInstructionDecoder.js +23 -7
- package/dist/dotnet/ManagedMemberRows.js +14 -3
- package/dist/dotnet/ManagedMetadataHeaps.js +20 -2
- package/dist/dotnet/ManagedMetadataInventory.js +38 -28
- package/dist/dotnet/ManagedMetadataInventoryRows.js +24 -10
- package/dist/dotnet/ManagedMethodBodyReader.js +7 -1
- package/dist/dotnet/ManagedNativeBoundaryHelpers.js +15 -3
- package/dist/dotnet/ManagedNativeBoundaryInspector.js +3 -1
- package/dist/dotnet/ManagedPeReader.js +11 -0
- package/dist/evm/EvmBytecodeCarrier.js +21 -0
- package/dist/evm/EvmWorkerLimits.js +40 -0
- package/dist/evm/EvmoleFailures.js +126 -0
- package/dist/evm/EvmoleInterfaceAdapter.js +53 -0
- package/dist/evm/EvmoleInterfaceProvider.js +273 -0
- package/dist/evm/EvmoleInterfaceWorker.js +87 -0
- package/dist/evm/EvmoleRelease.js +16 -0
- package/dist/firmware/FirmwareCommand.js +1 -0
- package/dist/generatedPackageMetadata.js +2 -2
- package/dist/ghidra/GhidraLauncher.js +1 -0
- package/dist/ghidra/GhidraProvider.js +2 -2
- package/dist/ghidra/GhidraProviderCapabilities.js +1 -1
- package/dist/hopper/BridgeLauncher.js +2 -0
- package/dist/hopper/LinuxPrivateDisplayProbe.js +4 -2
- package/dist/javascript/recovery/WakaruCommand.js +3 -0
- package/dist/javascript/sourceMaps/SourceMapCommand.js +1 -0
- package/dist/native/CommandRunner.js +2 -1
- package/dist/native/LldbCallTracer.js +278 -0
- package/dist/native/NativeCallObservation.js +135 -0
- package/dist/native/NativeMacOSProvider.js +19 -3
- package/dist/native/NativeMacOSProviderMetadata.js +8 -3
- package/dist/native/pwndbg/PwndbgCoreContext.js +160 -0
- package/dist/native/pwntools/PwntoolsDecoder.js +203 -0
- package/dist/native/pwntools/PwntoolsFailures.js +180 -0
- package/dist/native/pwntools/PwntoolsLayoutProvider.js +36 -0
- package/dist/native/pwntools/PwntoolsRecordedCrashProvider.js +75 -0
- package/dist/native/pwntools/PwntoolsRelease.js +19 -0
- package/dist/native/pwntools/PwntoolsResourceLimits.js +76 -0
- package/dist/native/pwntools/RecordedCrashSourceBindings.js +46 -0
- package/dist/native/pwntools/RecordedCrashStructureBindings.js +101 -0
- package/dist/process/DarwinProcessRunTokenReader.js +294 -0
- package/dist/process/OwnedCommand.js +113 -0
- package/dist/process/ProcessOwnership.js +263 -33
- package/dist/process/ProcessOwnershipObservation.js +161 -24
- package/dist/process/ProviderProcess.js +30 -3
- package/dist/{application → process/capture}/ProcessCaptureCapability.js +15 -0
- package/dist/{application → process/capture}/ProcessCaptureError.js +17 -1
- package/dist/process/capture/ProcessCaptureLifecycle.js +615 -0
- package/dist/{application → process/capture}/ProcessHarness.js +195 -29
- package/dist/{application → process/capture}/ProcessSampling.js +2 -2
- package/dist/server/createServer.js +22 -0
- package/dist/server/promptCompletion.js +10 -3
- package/dist/server/registerBinaryDiagnosticsTools.js +17 -0
- package/dist/server/registerEvidenceTools.js +1 -1
- package/dist/server/registerEvmTools.js +17 -0
- package/dist/server/registerProcessComparisonTool.js +1 -1
- package/dist/server/registerRecordedCrashTools.js +17 -0
- package/dist/server/registerSessionTools.js +2 -2
- package/dist/server/registerWebNetworkCaptureTool.js +28 -0
- package/dist/server/sessionAvailabilityPolicy.js +3 -0
- package/dist/server/sessionToolPolicies.js +1 -1
- package/dist/server/toolResult.js +1 -1
- package/native/windows/build/manifest.json +2 -2
- package/native/windows/build/rea-windows-x64.node +0 -0
- package/package.json +37 -9
- package/scripts/rea.mjs +11 -3
- package/skills/reverse-engineer-anything/SKILL.md +23 -3
- package/skills/reverse-engineer-anything/references/native-and-artifacts.md +29 -0
- package/third_party/README.md +60 -0
- package/third_party/evmole/LICENSE +21 -0
- package/third_party/evmole/README.md +22 -0
- package/third_party/pwndbg/LICENSE.md +21 -0
- package/third_party/pwndbg/README.md +23 -0
- package/third_party/pwntools/README.md +40 -0
- package/dist/application/AuthorizedArtifactInventory.js +0 -7
- package/dist/application/ProcessCaptureLifecycle.js +0 -299
- package/dist/application/StoreFileLock.js +0 -124
- package/dist/contracts/processCaptureExample.js +0 -2
- package/dist/domain/bytecodeProvider.js +0 -178
- package/dist/domain/customProtocolCapture.js +0 -137
- package/dist/domain/eventProcessTree.js +0 -225
- package/dist/domain/mobileApplicationInvestigation.js +0 -159
- package/dist/domain/packageAnalysis.js +0 -123
- package/dist/domain/peInspection.js +0 -197
- package/dist/domain/processCaptureParsing.js +0 -21
- package/dist/domain/protocolCapture.js +0 -217
- package/dist/domain/runtimeIdentification.js +0 -212
- package/dist/generatedMcpToolCatalog.js +0 -37
- /package/dist/application/{ArtifactExtractionDestination.js → artifacts/ArtifactExtractionDestination.js} +0 -0
- /package/dist/{application/ArtifactInventory → artifacts/inventory}/policy.js +0 -0
- /package/dist/{application/ArtifactInventory → artifacts/inventory}/types.js +0 -0
- /package/dist/domain/{processEvidenceProvider.js → process/processEvidenceProvider.js} +0 -0
- /package/dist/domain/{processScenario.js → process/processScenario.js} +0 -0
- /package/dist/domain/{processTraceComparison.js → process/processTraceComparison.js} +0 -0
- /package/dist/domain/{processTraceDimensionProjection.js → process/processTraceDimensionProjection.js} +0 -0
- /package/dist/domain/{processTraceEvaluation.js → process/processTraceEvaluation.js} +0 -0
- /package/dist/{application → process/capture}/FilesystemSnapshot.js +0 -0
- /package/dist/{application → process/capture}/ProcessCaptureEnvironment.js +0 -0
- /package/dist/{application → process/capture}/ProcessCaptureJournal.js +0 -0
- /package/dist/{application → process/capture}/ProcessFilesystemEffects.js +0 -0
- /package/dist/{application → process/capture}/ProcessNormalization.js +0 -0
- /package/dist/{application → process/capture}/ProcessScenarioRuntimeValidation.js +0 -0
- /package/dist/{application → process/capture}/ProcessTimer.js +0 -0
- /package/dist/{application → process/capture}/TerminalRenderer.js +0 -0
package/README.md
CHANGED
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
|
|
11
11
|
[](https://www.npmjs.com/package/rea-agents)
|
|
12
12
|
[](https://github.com/morluto/rea/actions/workflows/ci.yml)
|
|
13
|
-
[](
|
|
13
|
+
[](docs/product-catalog.json)
|
|
14
14
|
[](https://nodejs.org/)
|
|
15
|
+
[](https://skills.sh/morluto/rea/reverse-engineer-anything)
|
|
15
16
|
[](LICENSE)
|
|
16
17
|
[](https://discord.gg/GkcryMnJDM)
|
|
17
18
|
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
|
|
20
21
|
**[Website](https://morluto.github.io/rea/) · [Guides](https://morluto.github.io/rea/guides/) · [Showcases](https://morluto.github.io/rea/showcase/)**
|
|
21
22
|
|
|
22
|
-
[Quick start](#quick-start) · [
|
|
23
|
+
[Quick start](#quick-start) · [How REA works](#how-rea-works) · [What you can analyze](#what-you-can-analyze) · [Showcases](#showcases) · [FAQ](#faq) · [Documentation](#documentation)
|
|
23
24
|
|
|
24
25
|
<code>npx rea-agents setup</code>
|
|
25
26
|
|
|
@@ -53,760 +54,266 @@ REA connects your agent to tools for inspecting native binaries, JavaScript and
|
|
|
53
54
|
|
|
54
55
|
Setup registers REA with your agent and installs matching workflow instructions. Native analysis can use an existing Hopper or Ghidra installation; setup can optionally install Hopper with approval. Static JavaScript analysis needs neither engine.
|
|
55
56
|
|
|
57
|
+
> **[Visit the REA website](https://morluto.github.io/rea/)** for setup instructions, illustrated guides, and real case studies.
|
|
58
|
+
|
|
56
59
|
## Quick start
|
|
57
60
|
|
|
58
|
-
###
|
|
61
|
+
### Set up your agent
|
|
59
62
|
|
|
60
|
-
|
|
63
|
+
With Node.js and npm installed, run:
|
|
61
64
|
|
|
62
65
|
```bash
|
|
63
66
|
npx rea-agents setup
|
|
64
67
|
```
|
|
65
68
|
|
|
66
|
-
Choose
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
### AI Coding Assistants (optional)
|
|
71
|
-
|
|
72
|
-
Add the skill to your AI coding assistant for richer context:
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
npx skills add morluto/rea --skill reverse-engineer-anything
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
The skill provides REA's investigation workflow. Run setup above to connect REA to your agent and configure analysis tools. Setup already installs a version-matched skill by default; this command installs the repository version.
|
|
79
|
-
|
|
80
|
-
### With an agent (recommended)
|
|
81
|
-
|
|
82
|
-
After setup, restart your agent and [describe the app or feature](#just-ask-your-agent) you want to understand. Hopper can run in demo mode; if it shows a first-run prompt, choose the demo or enter an existing license.
|
|
83
|
-
|
|
84
|
-
REA supports Claude Code, Claude Desktop, Codex, Cursor, Gemini CLI, Windsurf, Devin, OpenCode, Antigravity, GitHub Copilot CLI, Command Code, and VS Code. Existing REA registrations are selected by default during setup; other detected agents remain unselected until chosen. Other agents can use the [manual MCP configuration](#manual-mcp-configuration).
|
|
85
|
-
|
|
86
|
-
### First result from the terminal
|
|
87
|
-
|
|
88
|
-
For your extracted JavaScript/Electron application tree or ASAR, run:
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
npx -y rea-agents@latest analyze-javascript-application /absolute/path/to/app --json
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
Replace the path with your target (for example, `"D:/apps/example"` on Windows).
|
|
95
|
-
This returns inline Evidence, recovered graph, limitations, and unknowns without
|
|
96
|
-
MCP setup, Hopper, Ghidra, or executing the application. For a native app, configure
|
|
97
|
-
its engine first, then use `analyze` with that app's path. Run `doctor` when you
|
|
98
|
-
need diagnosis; it is not a prerequisite for each analysis.
|
|
99
|
-
|
|
100
|
-
### Check readiness for the task at hand
|
|
101
|
-
|
|
102
|
-
`rea doctor` without options is an audit of the whole integration. It checks
|
|
103
|
-
every detected agent registration, the installed skill, and every optional
|
|
104
|
-
analysis engine, so it can report `healthy: false` while your current task works.
|
|
105
|
-
Choose a readiness scope for the work you are doing:
|
|
106
|
-
|
|
107
|
-
| Task | Readiness check |
|
|
108
|
-
| ----------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
109
|
-
| Static JavaScript/Electron analysis | None. Run `analyze-javascript-application` directly. |
|
|
110
|
-
| Troubleshoot one analysis engine | `rea doctor --provider ghidra --json` (or `hopper`, `ida`) |
|
|
111
|
-
| Check one agent's MCP registration | `rea doctor --client codex --json` (see [client IDs](docs/installation.md#supported-agents)) |
|
|
112
|
-
| Check the installed skill | `rea doctor --skill --json` |
|
|
113
|
-
|
|
114
|
-
A scoped report has `scope.mode: "explicit"`. Only `scope_checks` determine
|
|
115
|
-
`healthy` and the exit status. Everything else is listed in
|
|
116
|
-
`informational_checks`; you don't need to fix it for this task. For example, a
|
|
117
|
-
missing engine you are not using needs no repair. `environment_healthy` still
|
|
118
|
-
summarizes the full audit. `--target` adds a target check, but without a scope
|
|
119
|
-
option the report remains audit-wide.
|
|
120
|
-
|
|
121
|
-
When more than one installed engine supports a native target, REA does not pick
|
|
122
|
-
one: opening the target fails with `code: "capability_unavailable"`,
|
|
123
|
-
`details.selection_reason: "ambiguous"`, and the providers in
|
|
124
|
-
`details.candidate_ids`. Choose one once: pass `--provider` on
|
|
125
|
-
the CLI or `provider_id` on `open_binary`, or set `REA_ANALYSIS_PROVIDER` as a
|
|
126
|
-
standing preference. An explicit selector overrides the environment variable.
|
|
127
|
-
The session keeps that choice and never falls back to another engine.
|
|
128
|
-
Recovery depends on `details.selection_reason`. For `ambiguous`, choose one of
|
|
129
|
-
the candidates. For `provider_unavailable`, the engine you selected needs repair,
|
|
130
|
-
so run `rea doctor --provider <id> --json` and follow its remediation. Neither
|
|
131
|
-
reason means you have to install every engine. See
|
|
132
|
-
[Choosing a deep-analysis provider](#choosing-a-deep-analysis-provider).
|
|
133
|
-
|
|
134
|
-
### Install the rea command
|
|
135
|
-
|
|
136
|
-
Install the command-line interface:
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
curl -fsSL https://raw.githubusercontent.com/morluto/rea/main/install.sh | bash
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
The installer adds `rea` to your system and starts setup when run in a terminal. It requires Node.js and npm to be installed already.
|
|
143
|
-
|
|
144
|
-
Alternatively, install with npm, then run setup:
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
npm install --global rea-agents
|
|
148
|
-
rea setup
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
Update either installation with `rea update`.
|
|
152
|
-
|
|
153
|
-
### Requirements
|
|
154
|
-
|
|
155
|
-
Static JavaScript inspection requires the Node/npm runtime only. Host and
|
|
156
|
-
external-tool prerequisites depend on the selected workflow; the native
|
|
157
|
-
provider guides describe their supported platforms.
|
|
158
|
-
|
|
159
|
-
- macOS 12 or newer
|
|
160
|
-
- Ubuntu 24.04+, Fedora 41+, 64-bit Arch Linux, or CachyOS
|
|
161
|
-
- Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+
|
|
162
|
-
- npm; REA does not require or install a particular npm version
|
|
163
|
-
|
|
164
|
-
Deep native binary analysis requires [Hopper](https://www.hopperapp.com/), [Ghidra](#ghidra-analysis-provider), or [IDA Pro](#ida-pro-analysis-provider). Hopper is separate software with its own license; its demo supports analysis with vendor-defined limits. Ghidra and IDA are bring-your-own providers.
|
|
165
|
-
|
|
166
|
-
Firmware region inspection and explicit extraction use caller-supplied Binwalk and Unblob on Linux. See [Firmware analysis](docs/firmware-analysis.md) for setup, provenance, resource limits and native handoff.
|
|
167
|
-
|
|
168
|
-
Static APK analysis uses a separately supplied headless JADX JAR and a full JDK, with no emulator or APK execution. See [Android analysis](docs/android-analysis.md) for setup, CLI/MCP operations, coverage and public test fixtures. Authenticated IPA and macOS `.app`, ZIP, or DMG inventory Evidence can be projected into bundle anatomy, such as XPC services, app extensions, login items, privileged helpers, and launchd plists, with [Apple application analysis](docs/apple-application-analysis.md).
|
|
169
|
-
|
|
170
|
-
Repository main and npm 4.1.0 include experimental Windows x64 Ghidra support for native x86-64 PE applications on local NTFS, with bundled Job Object, private-DACL, and path-admission controls. Check the [release boundary](docs/installation.md#released-package-and-main) before expecting this from an older npm package. See [Windows Ghidra P0](docs/windows-ghidra-p0.md) for prerequisites and verified scope.
|
|
171
|
-
|
|
172
|
-
If something is not working, run:
|
|
173
|
-
|
|
174
|
-
```bash
|
|
175
|
-
npx -y rea-agents@latest doctor
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
`doctor` checks your host, dependencies, analysis tools, and agent configuration without changing them. Use `--json` for structured diagnostics.
|
|
179
|
-
|
|
180
|
-
### Linux installation and troubleshooting
|
|
181
|
-
|
|
182
|
-
On macOS, setup can install Hopper in `~/Applications` after approval. It verifies the official download and does not need Homebrew or administrator privileges.
|
|
183
|
-
|
|
184
|
-
On supported Linux distributions, setup can install Hopper and its demo-session dependencies through your system package manager. You may see a system authorization prompt. Demo sessions use a private virtual display, leaving your desktop alone. See [Hopper installation](docs/installation.md#hopper) for download verification and platform details.
|
|
185
|
-
|
|
186
|
-
REA prefers an executable `/opt/hopper/bin/Hopper` on Linux. If it is unavailable, REA automatically checks `~/.local/share/rea/hopper/bin/Hopper`. If Hopper was installed elsewhere:
|
|
187
|
-
|
|
188
|
-
```bash
|
|
189
|
-
export HOPPER_LAUNCHER_PATH=/absolute/path/to/Hopper
|
|
190
|
-
rea doctor --json
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
If doctor reports a missing analysis engine even though the file exists, inspect shared-library resolution with:
|
|
194
|
-
|
|
195
|
-
```bash
|
|
196
|
-
ldd /absolute/path/to/Hopper | grep 'not found'
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
Install the missing packages and rerun `rea setup`. The Linux demo needs Xvfb, Python 3, X11, and XTEST; approved setup installs these dependencies. If you use the curl installer, add `~/.local/bin` to your shell `PATH` when needed.
|
|
200
|
-
|
|
201
|
-
REA uses `/Applications/Hopper Disassembler.app/Contents/MacOS/hopper` by default on macOS. On Linux it prefers executable `/opt/hopper/bin/Hopper`, then executable `~/.local/share/rea/hopper/bin/Hopper`, and keeps `/opt/hopper/bin/Hopper` as the diagnostic fallback if neither exists. Explicit `HOPPER_LAUNCHER_PATH` configuration always takes precedence.
|
|
202
|
-
|
|
203
|
-
### Ghidra analysis provider
|
|
204
|
-
|
|
205
|
-
Already use Ghidra? REA can connect it to your agent on Linux x64 or macOS x64/arm64. It accepts **Ghidra 12.1.x** and the **64-bit full JDK** that installation declares (`application.java.min` through `application.java.max`). Current 12.1 releases require JDK 21 or newer and set no maximum. The bridge is verified with Ghidra 12.1.4 and JDK 21. On macOS, your Ghidra installation must also include the native decompiler for your architecture.
|
|
206
|
-
|
|
207
|
-
Set the installation paths, then run setup:
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
export GHIDRA_INSTALL_DIR=/absolute/path/to/ghidra_12.1.4_PUBLIC
|
|
211
|
-
export JAVA_HOME=/absolute/path/to/jdk-21 # optional when java and javac resolve from PATH
|
|
212
|
-
rea doctor --json
|
|
213
|
-
rea setup
|
|
214
|
-
rea providers --json
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
Setup checks the installations and saves their paths in your selected agents' configuration after approval. Ghidra and Java must already be installed; REA does not download or change them.
|
|
218
|
-
|
|
219
|
-
The adapter exposes inventory, function, memory and load-image inspection, plus atomic function annotation edits on Linux and macOS. `annotate_native_function` edits names and entry comments in the session database and returns a refreshed function dossier; executable bytes stay unchanged. Ghidra does not provide GUI controls through REA.
|
|
220
|
-
|
|
221
|
-
Opening a Ghidra target selects its provider; the first analysis query starts import and auto-analysis. That query can take longer than a client's default request deadline. See [first-query deadlines and recovery](docs/mcp-contracts.md#ghidra-first-query-deadlines-and-recovery) for an SDK example and cancellation recovery.
|
|
222
|
-
|
|
223
|
-
REA analyzes a temporary copy of the target and removes the temporary project when the session closes. Results identify what Ghidra observed and what it could not resolve. Decompilation produces pseudocode rather than the original source.
|
|
224
|
-
|
|
225
|
-
Ghidra also imports DOS MZ executables with an explicit 16-bit x86 real-mode profile. Function results include complete observed body ranges, distinguishing owned bytes from the enclosing span. See the [DOS analysis guide](docs/ghidra-dos.md) for addresses, packing, and verification boundaries.
|
|
226
|
-
See [optional NativeAOT metadata recovery](docs/ghidra-nativeaot.md) for the pinned
|
|
227
|
-
headless adapter, supported layout and existing native-tool workflow.
|
|
228
|
-
|
|
229
|
-
Windows Ghidra P0 uses bundled native controls for its read-only native x86-64 PE boundary on local NTFS; see the [Windows Ghidra P0 guide](docs/windows-ghidra-p0.md). See [Ghidra installation](docs/installation.md#ghidra), [provider evaluation](docs/provider-evaluation.md), and [testing](docs/testing.md) for configuration details, coverage, and real-provider verification.
|
|
230
|
-
|
|
231
|
-
To remove only REA-owned MCP registrations and the managed skill:
|
|
232
|
-
|
|
233
|
-
```bash
|
|
234
|
-
rea uninstall
|
|
235
|
-
rea uninstall --purge-data # also removes only ~/.rea/cache and ~/.rea/state
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
Uninstall preserves Hopper, Node.js, Evidence files, captures, unrelated skills, and other MCP servers. It refuses malformed client configuration and never follows purge-data symlinks.
|
|
239
|
-
|
|
240
|
-
### IDA Pro analysis provider
|
|
241
|
-
|
|
242
|
-
Already have [mrexodia/ida-pro-mcp](https://github.com/mrexodia/ida-pro-mcp) working? REA can reuse its MCP registration for read-only analysis of the current GUI target, or use its database supervisor to open and analyze a supplied binary headlessly.
|
|
243
|
-
|
|
244
|
-
```bash
|
|
245
|
-
export REA_IDA_MCP_CONFIG=/absolute/path/to/ida-mcp.json
|
|
246
|
-
rea function /absolute/path/to/program main --provider ida --json
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
The registration selects `attached` (default, legacy 1.4 tools) or `headless` (modern database supervisor). Setup can preserve this file reference in your selected agent's REA registration. REA adapts existing analysis contracts and manages its own headless database; it leaves an attached GUI database open and never saves it. Results stay live because external IDA database changes are not immutable snapshots.
|
|
250
|
-
|
|
251
|
-
See the [IDA provider guide](docs/ida-provider.md) for upstream installation links, exact configuration examples, Windows-native headless operation, lifecycle cleanup, and coverage. The initial real workflows cover a Windows GUI and Windows x64 headless IDA 9.3; other engine/platform combinations remain unverified. Use a package version that includes this adapter; repository main can lead the npm release.
|
|
252
|
-
|
|
253
|
-
### CLI or agent?
|
|
254
|
-
|
|
255
|
-
| If you want to… | Use |
|
|
256
|
-
| ---------------------------------------------------------------- | ------------------------------------------------------------------- |
|
|
257
|
-
| Ask an agent to investigate an app and build a feature | Run setup, restart your agent, then describe the task |
|
|
258
|
-
| Inspect or decompile one part of an app from the Terminal | `rea analyze` or `rea decompile` |
|
|
259
|
-
| Validate, canonicalize, or compare Evidence bundles | `rea evidence-import`, `rea evidence-export`, or `rea compare` |
|
|
260
|
-
| Map a local JavaScript/Electron application without executing it | `rea analyze PATH` or `rea analyze-javascript-application` |
|
|
261
|
-
| Reuse immutable analysis results without relaunching a provider | Pass `--snapshot /path/to/analysis.json` to a deep-analysis command |
|
|
262
|
-
| Import source as historical reference | `rea import-reference-source` |
|
|
263
|
-
| Capture or compare controlled process behavior | `rea capture-process` or `rea compare-process-captures` |
|
|
264
|
-
|
|
265
|
-
```bash
|
|
266
|
-
rea evidence-import /absolute/path/to/evidence/bundle.json
|
|
267
|
-
rea evidence-export /absolute/path/to/evidence/bundle.json /absolute/path/to/evidence/canonical.json
|
|
268
|
-
rea compare /absolute/path/to/evidence/left.json /absolute/path/to/evidence/right.json
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
Analyze a JavaScript application directory or ASAR without executing it:
|
|
272
|
-
|
|
273
|
-
```bash
|
|
274
|
-
rea analyze /absolute/path/to/releases/app.asar --json
|
|
275
|
-
rea analyze-javascript-application /absolute/path/to/releases/app.asar --json
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
For a directory or `.asar`, generic `rea analyze` automatically selects the
|
|
279
|
-
static JavaScript application provider when neither `--provider` nor
|
|
280
|
-
`--snapshot` is supplied. Both routes return the analysis and its Evidence
|
|
281
|
-
context inline.
|
|
69
|
+
Choose your agents, review the proposed changes, and approve them. Setup adds
|
|
70
|
+
REA's MCP server and matching workflow instructions, with backups of existing
|
|
71
|
+
configuration. Restart your agent afterward.
|
|
282
72
|
|
|
283
|
-
|
|
73
|
+
Setup supports Claude Code, Codex, Cursor, Gemini CLI and
|
|
74
|
+
[other agents](docs/installation.md#supported-agents). See
|
|
75
|
+
[installation and setup](docs/installation.md) for provider configuration and
|
|
76
|
+
manual MCP registration.
|
|
284
77
|
|
|
285
|
-
|
|
286
|
-
rea import-reference-source /absolute/path/to/source
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
Historical-source import requires safe no-follow file opens and currently runs
|
|
290
|
-
on Linux and macOS. Native Windows reports `unsupported_host`; run the import
|
|
291
|
-
with Linux REA in WSL or on another supported host. Changing permissions or
|
|
292
|
-
reinstalling REA does not enable this Windows workflow.
|
|
293
|
-
|
|
294
|
-
Imports read the path supplied to the command. File names do not cause automatic omissions; files are represented by hashes and metadata. To exclude selected paths, set `REA_REFERENCE_SECRET_PATTERNS_JSON` to a JSON string array of ignore patterns. Exports never replace an existing file unless `--overwrite` is explicit.
|
|
295
|
-
|
|
296
|
-
Use a snapshot to save successful analysis results and reuse them on later runs. REA reuses a result only when the target bytes, operation, parameters, analysis tool, and settings match. It does not cache changes or cursor-dependent calls. Snapshot files stay local and use owner-only permissions.
|
|
297
|
-
|
|
298
|
-
```bash
|
|
299
|
-
rea analyze /absolute/path/to/app --snapshot /absolute/path/to/analysis/app.json
|
|
300
|
-
# The same exact query can be answered from that snapshot.
|
|
301
|
-
rea analyze /absolute/path/to/app --snapshot /absolute/path/to/analysis/app.json
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
Exact CLI cached-evidence reads happen before any provider process starts. In MCP sessions,
|
|
305
|
-
pass `snapshot_path` to `open_binary` to import a snapshot atomically while
|
|
306
|
-
opening its matching target; MCP providers may still start before a cached call
|
|
307
|
-
result is returned. Pass `snapshot_path` and, when required, `overwrite: true` to
|
|
308
|
-
`close_binary` to save atomically before Hopper resources are released. If the
|
|
309
|
-
save fails, REA deliberately leaves the session open.
|
|
310
|
-
|
|
311
|
-
## Just ask your agent
|
|
312
|
-
|
|
313
|
-
After [setup](#quick-start), restart your agent and ask:
|
|
78
|
+
### Ask your agent
|
|
314
79
|
|
|
315
80
|
```text
|
|
316
81
|
Understand how search works in the Notes app, show me the evidence, and build a
|
|
317
82
|
similar feature for my project.
|
|
318
83
|
```
|
|
319
84
|
|
|
320
|
-
Replace Notes with
|
|
321
|
-
|
|
322
|
-
## The investigation model
|
|
323
|
-
|
|
324
|
-
<table>
|
|
325
|
-
<tr>
|
|
326
|
-
<td width="33%" valign="top">
|
|
327
|
-
<strong>Decompile</strong><br /><br />
|
|
328
|
-
Open an app and recover readable code, strings, names, and other clues about how it works.
|
|
329
|
-
</td>
|
|
330
|
-
<td width="33%" valign="top">
|
|
331
|
-
<strong>Understand</strong><br /><br />
|
|
332
|
-
Follow the code from one part of the app to another until the agent can explain how a feature actually works.
|
|
333
|
-
</td>
|
|
334
|
-
<td width="33%" valign="top">
|
|
335
|
-
<strong>Recreate</strong><br /><br />
|
|
336
|
-
Turn what the agent learned into a feature for your own product, adapted to your stack, interface, and requirements.
|
|
337
|
-
</td>
|
|
338
|
-
</tr>
|
|
339
|
-
</table>
|
|
340
|
-
|
|
341
|
-
REA shows how it reached its conclusions. It does not claim to recover original source code or automatically clone an application.
|
|
342
|
-
|
|
343
|
-
## Why REA
|
|
344
|
-
|
|
345
|
-
| | |
|
|
346
|
-
| ------------------------ | ----------------------------------------------------------------------------------------------------- |
|
|
347
|
-
| **Built for agents** | Ask what an app does and let your agent inspect it instead of guessing. |
|
|
348
|
-
| **CLI and MCP** | Run the same reverse-engineering capabilities from your terminal or agent. |
|
|
349
|
-
| **Guided setup** | Configure your agent, connect an existing analysis tool, or install Hopper with your approval. |
|
|
350
|
-
| **From insight to code** | Understand a feature, then build your own version in the same coding session. |
|
|
351
|
-
| **Local by design** | Analysis runs on your supported local host. REA does not upload the app to a hosted analysis service. |
|
|
352
|
-
| **Keeps context** | Investigate several apps without starting over for every question. |
|
|
353
|
-
|
|
354
|
-
## One prompt, a full investigation
|
|
355
|
-
|
|
356
|
-
```text
|
|
357
|
-
Reverse engineer the Notes app. Find how offline search works, explain it,
|
|
358
|
-
and build a version for my project using TypeScript and SQLite.
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
REA gives the agent a clear path from that request to working code:
|
|
362
|
-
|
|
363
|
-
| Step | What the agent does | REA tools |
|
|
364
|
-
| ---: | --------------------------------------- | ---------------------------------------------------------------- |
|
|
365
|
-
| 1 | Opens and identifies the binary | `open_binary`, `binary_overview` |
|
|
366
|
-
| 2 | Finds likely offline-search clues | `search_strings`, `search_procedures`, `list_names` |
|
|
367
|
-
| 3 | Connects those clues to executable code | `find_xrefs_to_name`, `xrefs`, `procedure_callers` |
|
|
368
|
-
| 4 | Reconstructs the relevant control flow | `get_call_graph`, `procedure_callees`, `procedure_info` |
|
|
369
|
-
| 5 | Decompiles the relevant routines | `procedure_pseudo_code`, `procedure_assembly`, `batch_decompile` |
|
|
370
|
-
| 6 | Builds the feature in your project | code adapted to your stack, product, and requirements |
|
|
371
|
-
|
|
372
|
-
REA handles the app analysis in steps 1 through 5. The agent performs step 6 with its normal file-editing and test tools, using what it learned about the app.
|
|
373
|
-
|
|
374
|
-
## Showcase
|
|
375
|
-
|
|
376
|
-
### DX-Ball: game reconstruction (in progress)
|
|
377
|
-
|
|
378
|
-
[DX-Ball](https://github.com/N0zoM1z0/dx-ball) follows the journey from a classic
|
|
379
|
-
Windows game's executable to maintainable C. Using REA's Ghidra provider, the
|
|
380
|
-
project traces functions, game state and dependencies, then checks reconstructed
|
|
381
|
-
behavior with original-x86 differential tests and pinned-compiler replay.
|
|
382
|
-
|
|
383
|
-
A [sound-pan investigation](https://github.com/N0zoM1z0/dx-ball/blob/main/docs/GAMEPLAY_OWNER.md)
|
|
384
|
-
turns incomplete pseudocode into a C implementation that passes 3,205 original-x86
|
|
385
|
-
cases and reproduces all 63 compiled function bytes. Follow its
|
|
386
|
-
[REA workflow](https://github.com/N0zoM1z0/dx-ball/blob/main/docs/REA.md)
|
|
387
|
-
from binary evidence to reconstruction.
|
|
388
|
-
|
|
389
|
-
## What agents can do
|
|
390
|
-
|
|
391
|
-
- Investigate a feature you like and build a version tailored to your own product.
|
|
392
|
-
- Explain how a feature works when its source code is unavailable.
|
|
393
|
-
- Reconstruct an app's authentication, storage, update, or networking flow.
|
|
394
|
-
- Recover enough structure to document an undocumented format or interface.
|
|
395
|
-
- Trace a suspicious behavior from a string or symbol to the code that implements it.
|
|
396
|
-
- Turn recovered behavior into product features, tests, migration notes, ports, or interoperable replacements.
|
|
397
|
-
- Analyze Swift and Objective-C metadata without manually untangling every mangled symbol.
|
|
398
|
-
- Leave names, comments, and bookmarks in Hopper so human and agent analysis reinforce each other.
|
|
399
|
-
|
|
400
|
-
See [native investigation](docs/native-investigation.md) for keyed archives, instruction/call/type primitives, typed dispatch metadata, value traces and native desktop observation.
|
|
401
|
-
|
|
402
|
-
## Tool catalog for investigation
|
|
403
|
-
|
|
404
|
-
| Tool family | Count | Examples |
|
|
405
|
-
| ------------------------- | ----: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
406
|
-
| Native inspection | 41 | functions, pseudocode, assembly, strings, symbols, calls, references, annotations, byte reads, and file offsets |
|
|
407
|
-
| Investigation workflows | 14 | app overviews, function dossiers, native APIs and dispatch, batch decompilation, feature traces, call paths, call graphs, Swift and Objective-C discovery |
|
|
408
|
-
| Native macOS utilities | 7 | Mach-O metadata, code signatures, plists, architectures, and Swift demangling without launching Hopper |
|
|
409
|
-
| Artifact graph | 5 | directory and package inventories, compiled Interface Builder files, Apple asset catalogs, and extraction |
|
|
410
|
-
| Managed PE/CLI | 7 | .NET identity, metadata, CIL instructions, native dependencies, reconstruction imports, and build comparisons |
|
|
411
|
-
| Firmware | 2 | Linux firmware region inspection and explicit extraction |
|
|
412
|
-
| Android APK | 5 | package and manifest declarations, class search, member inventories, method decompilation, and incoming static references |
|
|
413
|
-
| Browser observation | 11 | page structure, network metadata, scripts, source maps, WebMCP discovery, screenshots, and capture comparisons |
|
|
414
|
-
| Electron analysis | 5 | renderer observation, static app mapping, and static/runtime reconciliation |
|
|
415
|
-
| JavaScript runtime | 2 | Node/Electron Inspector target discovery, script locations, and execution-context events |
|
|
416
|
-
| Application workflows | 13 | captured website script export; Android/Apple inventory projections; cross-layer feature traces, build comparisons, historical source mapping, static return-shape comparison, and reconstruction checks |
|
|
417
|
-
| Workspace and observation | 21 | sessions, evidence bundles, navigation context, process/artifact/function comparisons, and open-question tracking |
|
|
418
|
-
|
|
419
|
-
The public interface describes what the agent is trying to learn. Providers decide how to answer. macOS utilities handle common semantic inspection without launching Hopper; Hopper handles deeper native analysis; the process harness records direct behavioral captures.
|
|
420
|
-
|
|
421
|
-
## Current status
|
|
422
|
-
|
|
423
|
-
REA supports native application, JavaScript, Electron, .NET, and browser investigation on macOS and Linux. Individual tools have platform and runtime prerequisites. `rea capabilities` and `rea providers` describe the binary-session providers and auxiliary operations; they are not an inventory of every browser, Android, or application workflow. Use the connected MCP tool list and `binary_session` tool availability for the full MCP surface, and the relevant guide for each tool's prerequisites. Repository main can be ahead of [the npm release](docs/installation.md#released-package-and-main).
|
|
424
|
-
|
|
425
|
-
Static Android APK inspection supports Linux and macOS; the current metadata bridge is verified on macOS arm64 with headless JADX; see [Android analysis](docs/android-analysis.md) for its separate prerequisites and coverage.
|
|
426
|
-
|
|
427
|
-
- **Native binaries:** Open Mach-O, ELF, PE, and Mac `.app` targets through a selected deep provider. Hopper and Ghidra cover broad inventory and function analysis; the IDA adapter supplies its documented read-only function/string operations. Hopper also accepts `.hop` databases and supports annotations.
|
|
428
|
-
- **Packages and resources:** Inspect directories, ZIP, APK, IPA, ASAR, plists, compiled Interface Builder files, and Apple asset catalogs. Artifact requests name the input and requested extraction or traversal directly; macOS DMG traversal also requires the host's native mounting support.
|
|
429
|
-
- **JavaScript and Electron:** Map modules, imports, source maps, routes, IPC channels, storage, and native add-ons without running the app. Compare builds and trace a feature across the recovered graph. Dynamic and ambiguous relationships remain unresolved. See [JavaScript application workflows](docs/javascript-application-workflows.md).
|
|
430
|
-
- **Websites:** Inspect a selected page in an existing Chrome-family browser. Capture page structure, network metadata, script evidence, and screenshots requested by the call. Passive observation does not navigate or execute page JavaScript. See [browser observation](docs/browser-observation.md).
|
|
431
|
-
|
|
432
|
-
Export retained scripts with `export_web_scripts` / `rea export-web-scripts`
|
|
433
|
-
into a verified local directory, then use the existing JavaScript analysis
|
|
434
|
-
and tracing tools. Source URLs, frame or transaction references, competing
|
|
435
|
-
versions, and missing-source states remain inline. See
|
|
436
|
-
[captured website scripts](docs/website-script-export.md).
|
|
437
|
-
Inspect a selected node's listener sources or observe an externally triggered
|
|
438
|
-
execution window with `inspect_web_event_listeners` / `observe_web_execution`.
|
|
439
|
-
Precise coverage resets counters and affects optimized execution; see
|
|
440
|
-
[website runtime attribution](docs/web-runtime.md).
|
|
441
|
-
Trace one exported script's native imports with `trace_web_module_imports` /
|
|
442
|
-
`rea trace-web-module-imports`, preserving query/fragment identity and optional
|
|
443
|
-
import-map context. Requires caller-supplied Chromium via
|
|
444
|
-
`REA_BROWSER_EXECUTABLE`; see [module relationships](docs/website-module-trace.md).
|
|
445
|
-
|
|
446
|
-
- **Source locations:** Trace one retained website script point through a selected
|
|
447
|
-
local source map with `rea trace-web-source-location`. See
|
|
448
|
-
[captured website source locations](docs/web-source-location.md) for byte
|
|
449
|
-
identities, embedded original content and coverage limits.
|
|
450
|
-
Recover readable modules from selected local bundles with
|
|
451
|
-
`recover_javascript_sources` / `rea recover-javascript-sources`, then pass
|
|
452
|
-
the returned `analysis_input` to static analysis. This optional Linux x64
|
|
453
|
-
adapter requires caller-supplied Wakaru 1.13.0; see
|
|
454
|
-
[JavaScript source recovery](docs/javascript-recovery.md).
|
|
455
|
-
|
|
456
|
-
- **Electron and Node runtime observation:** Inspect selected Electron pages or attach to a Node/Electron V8 Inspector target. Inspector observation records script locations and execution-context events; it does not infer imports, IPC activity, or which modules executed. See [runtime observation](docs/javascript-runtime-observation.md).
|
|
457
|
-
- **.NET assemblies:** Inspect metadata and CIL instructions, compare builds, and check declared native dependencies without loading or running the assembly. Imported decompiler output is labeled as analyst inference. See [managed-code analysis](docs/managed-code-analysis.md).
|
|
458
|
-
- **Controlled behavior capture:** Run process, browser, or Electron scenarios with the target, actions, and lifecycle declared in each request, then compare the resulting evidence. Missing observations cannot establish that two runs behaved the same way.
|
|
459
|
-
- **Evidence and comparison:** Save results with artifact identity, provider, locations, confidence, and limitations. Export or import bundles, compare artifacts and functions, and connect static findings to runtime observations without claiming causality from correlation.
|
|
460
|
-
- **Open questions:** Track unresolved findings, contradictions, and follow-up probes. Reconstruction checks report pass, fail, or unknown rather than treating missing evidence as a pass.
|
|
461
|
-
- **Guided workflows:** Start six [MCP investigation workflows](docs/mcp-prompts.md) with suggestions based on your current session.
|
|
462
|
-
|
|
463
|
-
Windows x64 Ghidra P0 supports native, non-managed, non-DLL x86-64 PE applications on fixed local NTFS with 25 read-only operations. Linux/macOS Ghidra additionally supports atomic session-scoped function names and entry comments. Ghidra has no GUI controls; Windows P0 has no mutation authority.
|
|
464
|
-
|
|
465
|
-
### Website observation with CDP
|
|
466
|
-
|
|
467
|
-
REA can inspect an already-running Chrome-family browser through a literal loopback CDP endpoint. Each request names the endpoint and target; an optional origin filter can narrow discovery:
|
|
85
|
+
Replace Notes with your target app and the feature you want to understand.
|
|
468
86
|
|
|
469
|
-
|
|
470
|
-
rea list-browser-targets http://127.0.0.1:9222 --json
|
|
471
|
-
rea inspect-web-page http://127.0.0.1:9222 TARGET_ID --json
|
|
472
|
-
```
|
|
473
|
-
|
|
474
|
-
The eight passive browser tools work through both CLI and MCP. They inspect the selected page without navigating, clicking, or evaluating its JavaScript. Credentials, cookies, authorization headers, and raw payload values are not retained. A request selects whether to include script sources, accessibility text, screenshots, or console and payload summaries. REA cannot observe activity that happened before it attached. See [browser observation](docs/browser-observation.md) for browser startup, capture options, and limits.
|
|
475
|
-
|
|
476
|
-
### Controlled browser scenarios
|
|
87
|
+
### Use the terminal
|
|
477
88
|
|
|
478
|
-
|
|
479
|
-
Playwright. Unlike passive observation, it can interact with the page. Each
|
|
480
|
-
step records evidence such as screenshots, page structure, navigation, and
|
|
481
|
-
network activity. Missing or truncated observations cannot establish that two
|
|
482
|
-
runs behaved the same way.
|
|
89
|
+
Inspect an extracted JavaScript/Electron app directory or ASAR:
|
|
483
90
|
|
|
484
91
|
```bash
|
|
485
|
-
rea
|
|
92
|
+
npx -y rea-agents@latest analyze-javascript-application /absolute/path/to/app --json
|
|
486
93
|
```
|
|
487
94
|
|
|
488
|
-
|
|
489
|
-
the
|
|
490
|
-
disconnects without closing the external browser. The request supplies the
|
|
491
|
-
selected executable or endpoint, actions, and any origin or environment
|
|
492
|
-
selections needed by the scenario. Scenario JSON contains secret references and
|
|
493
|
-
environment-variable names, never secret values. The default capture retains
|
|
494
|
-
only the final URL; request `dom`, `accessibility`, or `screenshot` when an
|
|
495
|
-
interaction changes the page without navigating. For asynchronous updates,
|
|
496
|
-
wait for a page-specific result-ready condition before capture. See the
|
|
497
|
-
[browser scenario contract](docs/browser-scenario-contract.md), including its
|
|
498
|
-
interaction example.
|
|
499
|
-
|
|
500
|
-
### Node and Electron V8 Inspector observation
|
|
95
|
+
The result includes modules, imports, Electron boundaries and their evidence.
|
|
96
|
+
Replace the path with your target, such as `"D:/apps/example"` on Windows.
|
|
501
97
|
|
|
502
|
-
|
|
98
|
+
To install the `rea` command for regular use:
|
|
503
99
|
|
|
504
100
|
```bash
|
|
505
|
-
|
|
506
|
-
rea
|
|
507
|
-
--runtime-kind node --json
|
|
508
|
-
```
|
|
509
|
-
|
|
510
|
-
REA records script locations and execution-context events without evaluating
|
|
511
|
-
code or setting breakpoints. These observations do not establish import
|
|
512
|
-
relationships, event activity, IPC, process identity, or Electron roles. See
|
|
513
|
-
[Node and Electron runtime observation](docs/javascript-runtime-observation.md)
|
|
514
|
-
for the exact coverage.
|
|
515
|
-
|
|
516
|
-
Exact package, tool-family, provider, setup-client, schema, and CLI facts are generated from source in [`docs/product-catalog.json`](docs/product-catalog.json). PR CI verifies this catalog, narrative documentation, and generated schemas.
|
|
517
|
-
|
|
518
|
-
## Roadmap
|
|
519
|
-
|
|
520
|
-
The [current status](#current-status) section describes shipped capabilities. These are the next areas of work.
|
|
521
|
-
|
|
522
|
-
### Now
|
|
523
|
-
|
|
524
|
-
1. **Keep documentation accurate:** update the generated catalog and documentation checks when tools, providers, setup options, or versions change.
|
|
525
|
-
2. **Test more native binaries:** expand architecture and indirect-call coverage across Hopper and Ghidra.
|
|
526
|
-
|
|
527
|
-
### Next
|
|
528
|
-
|
|
529
|
-
1. **Connect more application layers:** add static extractors and runtime observations to feature traces.
|
|
530
|
-
2. **Extend .NET analysis:** improve comparisons of obfuscated assemblies and connect managed findings to verified native analysis. See the [managed-code guide](docs/managed-code-analysis.md).
|
|
531
|
-
3. **Compare more runtime behavior:** expand process, protocol, filesystem, reconnect, and version-comparison coverage.
|
|
532
|
-
|
|
533
|
-
### Later
|
|
534
|
-
|
|
535
|
-
1. **Expand browser and Electron interaction:** add scenario actions beyond the current click and wait operations.
|
|
536
|
-
2. **Observe native apps at runtime:** explore LLDB, Frida, system logs, and native API tracing.
|
|
537
|
-
3. **Evaluate more tools and targets:** assess Binary Ninja, Rizin, LIEF, Windows-native tools, mobile apps, and firmware. IDA support already ships via the bring-your-own upstream adapter; see the [IDA provider guide](docs/ida-provider.md).
|
|
538
|
-
|
|
539
|
-
Setup already lets you choose agent integration and Hopper installation. Support for installing additional analysis tools is future work, described in the [installation roadmap](docs/roadmap.md).
|
|
540
|
-
|
|
541
|
-
See [provider evaluation](docs/provider-evaluation.md) for coverage and remaining requirements, and the [native investigation guide](docs/native-investigation.md) for UI, dispatch, and value-flow analysis.
|
|
542
|
-
|
|
543
|
-
## Using REA with other agents
|
|
544
|
-
|
|
545
|
-
Setup offers supported agent integrations for selection. Existing REA registrations are selected by default; newly detected agents remain unselected until chosen. Any agent that supports local MCP servers can use the configuration below.
|
|
546
|
-
|
|
547
|
-
### Manual MCP configuration
|
|
548
|
-
|
|
549
|
-
<!-- x-release-please-start-version -->
|
|
550
|
-
|
|
551
|
-
```json
|
|
552
|
-
{
|
|
553
|
-
"mcpServers": {
|
|
554
|
-
"rea": {
|
|
555
|
-
"command": "npx",
|
|
556
|
-
"args": ["-y", "rea-agents@5.0.0", "mcp"]
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
```
|
|
561
|
-
|
|
562
|
-
<!-- x-release-please-end -->
|
|
563
|
-
|
|
564
|
-
Persistent registrations should use one exact package version. `rea setup`
|
|
565
|
-
maintains that pin, updates the bundled skill at the same time, and gives Codex
|
|
566
|
-
a 30-second startup allowance for a cold package-runner start. `rea update`
|
|
567
|
-
installs an exact release and verifies the new executable. It returns an
|
|
568
|
-
unapplied maintenance plan for existing REA integrations, with a scoped setup
|
|
569
|
-
command to review and approve their changes. Restart affected agents afterward.
|
|
570
|
-
|
|
571
|
-
MCP clients that support prompts can also discover six ordered investigation
|
|
572
|
-
workflows through `prompts/list`. Their optional identifier arguments use the
|
|
573
|
-
current session for bounded `completion/complete` suggestions; see
|
|
574
|
-
[Guided MCP prompts and completion](docs/mcp-prompts.md).
|
|
575
|
-
|
|
576
|
-
## How it works
|
|
577
|
-
|
|
578
|
-
```mermaid
|
|
579
|
-
flowchart LR
|
|
580
|
-
Agent["Agent"] --> REA["REA<br/>CLI + MCP"]
|
|
581
|
-
Terminal --> REA
|
|
582
|
-
REA --> Session["Target-bound session router"]
|
|
583
|
-
Session --> Registry["Deep-provider registry<br/>deterministic selection"]
|
|
584
|
-
Registry --> Hopper["Hopper provider"]
|
|
585
|
-
Registry --> Ghidra["Ghidra provider<br/>inventory + function analysis + annotations"]
|
|
586
|
-
Registry --> Ida["IDA MCP provider<br/>attached GUI or owned headless database"]
|
|
587
|
-
Hopper --> Runtime["Owned provider runtime<br/>deadline + bounded diagnostics + cleanup"]
|
|
588
|
-
Ghidra --> Runtime
|
|
589
|
-
Ida --> IdaRuntime["Upstream MCP lifecycle<br/>live observations + owned database cleanup"]
|
|
590
|
-
IdaRuntime --> Target
|
|
591
|
-
Session --> Native["Native macOS provider"]
|
|
592
|
-
Session --> Artifact["Artifact graph provider"]
|
|
593
|
-
REA --> Browser["Browser CDP provider"]
|
|
594
|
-
REA --> Android["Android static provider<br/>headless JADX adapter"]
|
|
595
|
-
Android --> Runtime
|
|
596
|
-
REA --> Firmware["Firmware providers<br/>Binwalk / Unblob adapters"]
|
|
597
|
-
Firmware --> Runtime
|
|
598
|
-
REA --> Process["Process capture provider"]
|
|
599
|
-
Runtime --> Target["Target software"]
|
|
600
|
-
Process --> Target
|
|
601
|
-
Native --> Target
|
|
602
|
-
Artifact --> Target
|
|
101
|
+
npm install --global rea-agents
|
|
102
|
+
rea --help
|
|
603
103
|
```
|
|
604
104
|
|
|
605
|
-
|
|
105
|
+
For native analysis, configure a provider first. See the
|
|
106
|
+
[CLI and Evidence guide](docs/cli.md) for native commands, provider selection,
|
|
107
|
+
snapshots and scripting.
|
|
606
108
|
|
|
607
|
-
|
|
109
|
+
### Update REA
|
|
608
110
|
|
|
609
|
-
|
|
111
|
+
REA changes quickly, and new releases include frequent bug fixes. Keep your
|
|
112
|
+
installation up to date.
|
|
610
113
|
|
|
611
|
-
|
|
612
|
-
npx -y rea-agents@latest analyze /Applications/Notes.app
|
|
613
|
-
npx -y rea-agents@latest inspect /Applications/Notes.app
|
|
614
|
-
npx -y rea-agents@latest search /Applications/Notes.app "offline"
|
|
615
|
-
npx -y rea-agents@latest function /Applications/Notes.app 0x1000
|
|
616
|
-
npx -y rea-agents@latest xrefs /Applications/Notes.app 0x1000
|
|
617
|
-
npx -y rea-agents@latest trace /Applications/Notes.app "offline"
|
|
618
|
-
npx -y rea-agents@latest compare /absolute/path/to/left-evidence.json /absolute/path/to/right-evidence.json
|
|
619
|
-
npx -y rea-agents@latest capabilities
|
|
620
|
-
npx -y rea-agents@latest providers
|
|
621
|
-
```
|
|
622
|
-
|
|
623
|
-
Run `npx -y rea-agents@latest --help` for direct decompilation, bounded search and
|
|
624
|
-
other options. `analyze` and `inspect` share the same overview workflow;
|
|
625
|
-
`function`, `xrefs`, and `trace` return the same Evidence envelopes as MCP.
|
|
626
|
-
|
|
627
|
-
Or install the `rea` command globally:
|
|
114
|
+
For an npm-installed CLI:
|
|
628
115
|
|
|
629
116
|
```bash
|
|
630
|
-
npm install --global rea-agents
|
|
631
|
-
rea --help
|
|
632
117
|
rea update
|
|
633
|
-
rea mcp
|
|
634
118
|
```
|
|
635
119
|
|
|
636
|
-
|
|
120
|
+
To refresh your agent registrations and skill, run the setup command printed
|
|
121
|
+
by the update.
|
|
637
122
|
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
Choose which analysis tool to use from the CLI:
|
|
123
|
+
If you use `npx`, update your agent setup with:
|
|
641
124
|
|
|
642
125
|
```bash
|
|
643
|
-
rea
|
|
644
|
-
rea analyze /absolute/path/to/program --provider hopper
|
|
645
|
-
REA_ANALYSIS_PROVIDER=hopper rea decompile /absolute/path/to/program 0x1000
|
|
126
|
+
npx rea-agents@latest setup
|
|
646
127
|
```
|
|
647
128
|
|
|
648
|
-
|
|
129
|
+
Review the setup changes and restart your agent. For one-off CLI commands,
|
|
130
|
+
use `npx rea-agents@latest` followed by the command.
|
|
649
131
|
|
|
650
|
-
|
|
651
|
-
{
|
|
652
|
-
"path": "/absolute/path/to/program",
|
|
653
|
-
"provider_id": "hopper"
|
|
654
|
-
}
|
|
655
|
-
```
|
|
132
|
+
## How REA works
|
|
656
133
|
|
|
657
|
-
|
|
134
|
+
Your agent calls REA through MCP to inspect the target and trace relevant code.
|
|
135
|
+
REA returns findings with their evidence. The agent uses them to ask follow-up
|
|
136
|
+
questions, explain the behavior, or write and test an implementation.
|
|
137
|
+
CLI commands use the same workflows.
|
|
658
138
|
|
|
659
|
-
|
|
139
|
+

|
|
660
140
|
|
|
661
|
-
|
|
141
|
+
[Open the full-size figure](website/public/assets/figures/rea-investigation-flow.svg).
|
|
662
142
|
|
|
663
|
-
|
|
143
|
+
<a id="current-status"></a>
|
|
664
144
|
|
|
665
|
-
|
|
145
|
+
## What you can analyze
|
|
666
146
|
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
| `0` | The operation completed. Results may still include warnings, partial evidence, or unresolved questions. |
|
|
670
|
-
| `1` | The operation could not complete, for example because of invalid input, host permission denial, cancellation, or timeout. Structured output reports the reason when available. |
|
|
671
|
-
| `128 + N` | The process ended from signal `N`, where the shell or runtime preserves the conventional signal-derived status. |
|
|
147
|
+
REA requires Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+, plus npm.
|
|
148
|
+
Additional tools and host support depend on the target:
|
|
672
149
|
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
150
|
+
| Target | What REA returns | Requirements and guide |
|
|
151
|
+
| ---------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
152
|
+
| Native binaries | Pseudocode, assembly, strings, symbols, calls and references | Hopper, Ghidra or IDA; [native analysis](https://morluto.github.io/rea/guides/native/) |
|
|
153
|
+
| Offline ELF layout | Sections, segments, original symbols/relocations and static mitigation candidates | Caller-supplied pwntools on Linux x64; [binary diagnostics](docs/binary-diagnostics.md) |
|
|
154
|
+
| EVM bytecode | Dispatch selectors, byte offsets, inferred arguments and mutability | Local raw/hex carrier; [offline EVM guide](docs/evm-bytecode.md) |
|
|
155
|
+
| Recorded Linux crashes | Raw notes, every recorded thread's registers/signals and optional mapping candidates | Caller-supplied pwntools; optional GDB/pwndbg; [recorded crashes](docs/recorded-crashes.md) |
|
|
156
|
+
| JavaScript / Electron | Modules, imports, source maps, routes, IPC and native add-on relationships | Node.js and npm; [application analysis](https://morluto.github.io/rea/guides/javascript/) |
|
|
157
|
+
| Websites | Page structure, scripts, network observations and requested screenshots | A Chrome-family browser; [browser analysis](https://morluto.github.io/rea/guides/browser/) |
|
|
158
|
+
| Saved network captures | Requests, responses, exposed payloads and source locations | HAR; mitmdump on Linux for native mitmproxy captures; [capture guide](docs/web-network-captures.md) |
|
|
159
|
+
| .NET assemblies | Metadata, CIL instructions, declared native dependencies and build comparisons | Static inspection; [managed-code guide](docs/managed-code-analysis.md) |
|
|
160
|
+
| Android APKs | Manifest declarations, classes, decompiled methods and references | Headless JADX and a full JDK on Linux/macOS; [Android guide](docs/android-analysis.md) |
|
|
161
|
+
| Firmware | Regions, extraction results and native-analysis handoffs | Binwalk / Unblob on Linux; [firmware guide](docs/firmware-analysis.md) |
|
|
162
|
+
| Packages and resources | File inventories, digests, plists, Apple bundle anatomy and extracted resources | [Artifact and JavaScript guide](docs/javascript-artifact-reconstruction.md), [Apple applications](docs/apple-application-analysis.md) |
|
|
163
|
+
| Process behavior | Terminal output, interactions, exit and filesystem observations, and run comparisons | Linux/macOS with a native PTY; [process capture](docs/process-capture.md) |
|
|
681
164
|
|
|
682
|
-
|
|
683
|
-
|
|
165
|
+
Static JavaScript and .NET inspection read the supplied files without running
|
|
166
|
+
the application. Runtime capture runs or interacts with the selected target
|
|
167
|
+
using your user permissions; each runtime guide describes its effects.
|
|
684
168
|
|
|
685
|
-
|
|
686
|
-
set -o pipefail
|
|
687
|
-
rea inspect-artifact ./app.asar --json | jq . > inspection.json
|
|
688
|
-
```
|
|
169
|
+
<a id="choosing-a-deep-analysis-provider"></a>
|
|
689
170
|
|
|
690
|
-
|
|
171
|
+
Native formats and host support vary by provider. See
|
|
172
|
+
[Hopper and Ghidra setup](docs/installation.md#hopper), the
|
|
173
|
+
[IDA guide](docs/ida-provider.md), and
|
|
174
|
+
[experimental Windows Ghidra support](docs/windows-ghidra-p0.md).
|
|
175
|
+
Ghidra also supports [16-bit DOS analysis](docs/ghidra-dos.md).
|
|
176
|
+
For provider selection, see the [CLI guide](docs/cli.md#choose-a-provider).
|
|
177
|
+
Check [release availability](docs/installation.md#released-package-and-main)
|
|
178
|
+
for features added since the latest npm release.
|
|
691
179
|
|
|
692
|
-
|
|
180
|
+
## Showcases
|
|
693
181
|
|
|
694
|
-
|
|
182
|
+
### DX-Ball: reconstruct a sound-pan calculation
|
|
695
183
|
|
|
696
|
-
|
|
184
|
+
Follow a sound call into its position-to-pan helper, inspect the instructions,
|
|
185
|
+
and turn incomplete pseudocode into C. The reconstruction passes 3,205
|
|
186
|
+
original-x86 cases and reproduces all 63 compiled function bytes.
|
|
697
187
|
|
|
698
|
-
|
|
188
|
+
[Read the case study](https://morluto.github.io/rea/showcase/dx-ball/) ·
|
|
189
|
+
[Reconstruction repository](https://github.com/N0zoM1z0/dx-ball)
|
|
699
190
|
|
|
700
|
-
|
|
191
|
+
### Notion: trace the Electron clipboard bridge
|
|
701
192
|
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
paths select what to snapshot. The process runs with your user permissions;
|
|
705
|
-
Process Capture records behavior and is not a security sandbox.
|
|
193
|
+
Find the renderer's clipboard API, follow it through preload and IPC into the
|
|
194
|
+
main process, and inspect the rich clipboard format.
|
|
706
195
|
|
|
707
|
-
|
|
196
|
+
[Read the case study](https://morluto.github.io/rea/showcase/notion/)
|
|
708
197
|
|
|
709
|
-
|
|
710
|
-
rea capture-process ./authority-scenario.json --json > authority-capture.json
|
|
711
|
-
rea capture-process ./reconstruction-scenario.json --json > reconstruction-capture.json
|
|
712
|
-
rea compare-process-captures authority-capture.json reconstruction-capture.json --json
|
|
713
|
-
```
|
|
714
|
-
|
|
715
|
-
The comparison reports each observed dimension separately and identifies the
|
|
716
|
-
first terminal, interaction, exit, filesystem, or process divergence.
|
|
717
|
-
See [Process Capture](docs/process-capture.md) for scenario fields, limits, and
|
|
718
|
-
evidence boundaries.
|
|
719
|
-
|
|
720
|
-
Process Capture currently runs on Linux and macOS with a working native PTY
|
|
721
|
-
backend. Native Windows capture remains unavailable until the PTY adapter can
|
|
722
|
-
verify descendant cleanup; installing or reinstalling its Windows PTY binary
|
|
723
|
-
does not enable capture. For Linux commands, run Linux REA inside WSL.
|
|
724
|
-
Comparing existing capture Evidence remains available on Windows.
|
|
725
|
-
|
|
726
|
-
On supported capture hosts, a missing or incompatible PTY binary can be fixed
|
|
727
|
-
by reinstalling REA for the current platform, architecture, and Node.js version
|
|
728
|
-
with optional dependencies enabled. Use separate scenario and output files;
|
|
729
|
-
`--json` produces the JSON consumed by the comparison command.
|
|
730
|
-
|
|
731
|
-
ASAR inventory verifies Electron integrity metadata for both archive entries
|
|
732
|
-
and `.asar.unpacked` companion files. Integrity failures identify the logical
|
|
733
|
-
path, declared and calculated SHA-256 values, and whether the entry was
|
|
734
|
-
unpacked; REA does not silently accept the mismatched artifact. If a supplied
|
|
735
|
-
ASAR declares unpacked companion bytes that are absent from the local artifact
|
|
736
|
-
set, REA keeps that occurrence as `unavailable` and continues analyzing the
|
|
737
|
-
embedded JavaScript instead of treating the missing native/resource bytes as
|
|
738
|
-
verified or absent.
|
|
739
|
-
|
|
740
|
-
## Security model
|
|
198
|
+
### TH04: recover a DOS bullet-ring calculation
|
|
741
199
|
|
|
742
|
-
|
|
200
|
+
Inspect the original PC-98 game's 16-bit instructions, recover the fixed and
|
|
201
|
+
aimed angle calculations, and compare the reconstructed C++ with the
|
|
202
|
+
historical compiler output.
|
|
743
203
|
|
|
744
|
-
|
|
204
|
+
[Read the case study](https://morluto.github.io/rea/showcase/th04/) ·
|
|
205
|
+
[Reconstruction repository](https://github.com/N0zoM1z0/th04)
|
|
745
206
|
|
|
746
|
-
|
|
207
|
+
If you've used REA on something interesting, we'd love to see it. Share your
|
|
208
|
+
case in an [issue](https://github.com/morluto/rea/issues) or a
|
|
209
|
+
[pull request](https://github.com/morluto/rea/pulls), including the target,
|
|
210
|
+
your question, how REA helped, and what you found.
|
|
747
211
|
|
|
748
212
|
## FAQ
|
|
749
213
|
|
|
750
214
|
<details>
|
|
751
|
-
<summary><strong>
|
|
215
|
+
<summary><strong>Which agents can use REA?</strong></summary>
|
|
752
216
|
|
|
753
|
-
|
|
217
|
+
Any agent that supports local MCP servers. Setup configures the
|
|
218
|
+
[supported agents](docs/installation.md#supported-agents); other clients can use
|
|
219
|
+
[manual MCP registration](docs/installation.md#mcp-registry).
|
|
754
220
|
|
|
755
221
|
</details>
|
|
756
222
|
|
|
757
223
|
<details>
|
|
758
|
-
<summary><strong>
|
|
224
|
+
<summary><strong>Do I need Hopper, Ghidra or IDA?</strong></summary>
|
|
759
225
|
|
|
760
|
-
|
|
226
|
+
Deep native analysis uses one of them. Static JavaScript and .NET inspection
|
|
227
|
+
work without a native analysis engine. Setup can install Hopper after approval;
|
|
228
|
+
Ghidra and IDA use your existing installations. See [provider setup](docs/installation.md#hopper).
|
|
761
229
|
|
|
762
230
|
</details>
|
|
763
231
|
|
|
764
232
|
<details>
|
|
765
|
-
<summary><strong>
|
|
233
|
+
<summary><strong>Do I need to start Hopper first?</strong></summary>
|
|
766
234
|
|
|
767
|
-
|
|
235
|
+
REA starts Hopper when an operation needs it. On macOS, a first-run dialog may
|
|
236
|
+
ask you to choose demo mode or activate your license. See
|
|
237
|
+
[Hopper startup and troubleshooting](docs/installation.md#launcher-paths-and-troubleshooting).
|
|
768
238
|
|
|
769
239
|
</details>
|
|
770
240
|
|
|
771
241
|
<details>
|
|
772
|
-
<summary><strong>
|
|
242
|
+
<summary><strong>What does installing the skill from skills.sh do?</strong></summary>
|
|
773
243
|
|
|
774
|
-
|
|
244
|
+
The skill supplies investigation instructions for your agent. Use `rea setup`
|
|
245
|
+
to register REA's MCP server and install the matching instructions, then restart
|
|
246
|
+
your agent. See [skill-only installation](docs/installation.md#skill-only-installation).
|
|
775
247
|
|
|
776
248
|
</details>
|
|
777
249
|
|
|
778
250
|
<details>
|
|
779
|
-
<summary><strong>
|
|
251
|
+
<summary><strong>What code does REA return?</strong></summary>
|
|
780
252
|
|
|
781
|
-
|
|
253
|
+
Native analysis returns pseudocode and assembly. JavaScript/Electron analysis
|
|
254
|
+
recovers modules and their relationships. Your agent uses these findings to
|
|
255
|
+
write and test an implementation; the [showcases](#showcases) give worked examples.
|
|
782
256
|
|
|
783
257
|
</details>
|
|
784
258
|
|
|
785
259
|
<details>
|
|
786
|
-
<summary><strong>
|
|
260
|
+
<summary><strong>Does REA upload my app?</strong></summary>
|
|
787
261
|
|
|
788
|
-
|
|
262
|
+
REA analyzes targets locally. Your agent receives the tool results, and its
|
|
263
|
+
model provider has its own data policy.
|
|
789
264
|
|
|
790
265
|
</details>
|
|
791
266
|
|
|
792
267
|
<details>
|
|
793
|
-
<summary><strong>
|
|
268
|
+
<summary><strong>What should I do if I hit a bug?</strong></summary>
|
|
269
|
+
|
|
270
|
+
Update first; a recent release may already fix it.
|
|
794
271
|
|
|
795
|
-
|
|
272
|
+
For an npm-installed CLI:
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
rea update
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
For agent setup through `npx`:
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
npx rea-agents@latest setup
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
If you're using an agent, complete the [setup refresh](#update-rea) and restart
|
|
285
|
+
it. Retry the same task. If the problem persists, [open an issue](https://github.com/morluto/rea/issues)
|
|
286
|
+
with your REA version, target type, steps to reproduce and error output.
|
|
796
287
|
|
|
797
288
|
</details>
|
|
798
289
|
|
|
799
|
-
##
|
|
290
|
+
## Documentation
|
|
291
|
+
|
|
292
|
+
Start with the website's [worked guides](https://morluto.github.io/rea/guides/).
|
|
293
|
+
For exact options, prerequisites and result contracts:
|
|
294
|
+
|
|
295
|
+
- [Installation and setup](docs/installation.md): agent registration, provider configuration, updates and uninstall.
|
|
296
|
+
- [Readiness and troubleshooting](docs/installation.md#check-readiness-for-your-task): diagnose one agent or analysis engine.
|
|
297
|
+
- [CLI and Evidence](docs/cli.md): commands, provider selection, snapshots, import/export and exit statuses.
|
|
298
|
+
- [MCP contracts](docs/mcp-contracts.md) and [agent prompts](docs/mcp-prompts.md): tool results, sessions and guided investigations.
|
|
299
|
+
- [Tool catalog](docs/product-catalog.json): generated inventory of tools, providers and CLI commands.
|
|
300
|
+
- [Roadmap](docs/roadmap.md): planned work and capability trackers.
|
|
301
|
+
|
|
302
|
+
Report vulnerabilities through [SECURITY.md](SECURITY.md).
|
|
800
303
|
|
|
801
|
-
|
|
304
|
+
## Contributing
|
|
802
305
|
|
|
803
|
-
|
|
306
|
+
We'd love your help with REA! [Open an issue](https://github.com/morluto/rea/issues) to
|
|
307
|
+
report a bug or suggest a feature, or [send a pull request](https://github.com/morluto/rea/pulls)
|
|
308
|
+
to improve the code or docs.
|
|
804
309
|
|
|
805
|
-
|
|
310
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and checks,
|
|
311
|
+
[testing](docs/testing.md) for verification lanes, and the
|
|
312
|
+
[architecture map](docs/architecture.mermaid) for the project structure.
|
|
806
313
|
|
|
807
314
|
## Project links
|
|
808
315
|
|
|
809
|
-
[npm](https://www.npmjs.com/package/rea-agents) · [
|
|
316
|
+
[Website](https://morluto.github.io/rea/) · [npm](https://www.npmjs.com/package/rea-agents) · [skills.sh](https://skills.sh/morluto/rea/reverse-engineer-anything) · [Issues](https://github.com/morluto/rea/issues) · [Security](SECURITY.md)
|
|
810
317
|
|
|
811
318
|
## License
|
|
812
319
|
|