* test(mcp): check advertised schemas against a portable dialect in every profile * fix(mcp): re-emit advertised patterns in a portable regex grammar * fix(mcp): present discover_tools input through the selected profile The hot-cold catalog registered discover_tools directly with the SDK, so the default compact input profile still advertised its canonical schema, including page-size defaults clients apply on their own (#5322). Route every listed input schema, transport discovery included, through one server-owned presentation, and pass the selected presentation to the deferred server, which serves recorded tool schemas but not discovery. * fix(mcp): keep the Evidence union on described borrowed inputs borrowEvidenceInput installed its advertised projection on one schema instance. A call site's .describe() rebuilds the schema from its definition, so match_native_functions advertised left and right as unconstrained values in every input profile. Install the projection in the borrowed parser's constructor so derived schemas keep it, for both borrowed inputs and borrowed arrays. * fix(mcp): validate advertised dialect by selected profile * fix(mcp): preserve schema widening through references * feat(mcp): project compact input schemas into the portable advertised dialect One projection (advertisedDialectProjection.ts) owns the compact input advertisement: one type per node, items on every array, string literals as enums, oneOf widened to anyOf, allOf merged, tuples as element unions, exclusive bounds made inclusive, and every keyword outside the dialect dropped. Each rewrite is exact or widening; server validation is unchanged. The root description and sentences for dropped cross-field constraints move to the tool description, which Codex and Zed keep. The compact baseline falls to nullable values only (29), which the dialect cannot express without narrowing an input. The gateway shape repairs (typeArrayItemUnions, hasGatewayIncompatibleShape), the second dependentRequired-to-prose copy and the strict-gateway test denylist are removed; the dialect checker gates the inline presentation instead. * feat(mcp): omit output schemas from tools/list by default No surveyed model API reads an output schema, MCP client validators repeat REA's own result validation, and complete output schemas were about 92% of the default tools/list. REA_MCP_OUTPUT_SCHEMA_PROFILE now resolves to off through one owner (resolveMcpOutputSchemaProfile); compact and full remain selectable. structuredContent is still delivered, and the deferred server serves both off and full from the recorded catalog with the matching recorded identity. Tests and artifact verifiers that validate results against complete advertised output contracts select full explicitly. * docs: describe omitted output schemas as the default in README translations * fix(mcp): select schemas in verification workflows * fix(mcp): refuse zero-padded repeat bounds and record host-specific path patterns * fix(mcp): keep projected schemas permissive * fix(mcp): keep references valid when presentation widens their targets * fix(mcp): keep a single union branch's closure scoped to its properties * fix(mcp): select complete output schemas in the Electron verifier * fix(mcp): select complete output schemas in standalone verifier probes * fix(mcp): keep an allOf member's tuple tail with its own positions * fix(mcp): relax references into negations and conditionals presentation may remove * refactor(contracts): declare root discriminators as typed schema annotations * test(mcp): select the borrowed Evidence contract from its family * fix(mcp): keep astral literals and dynamic references widening in every mode * fix(mcp): omit astral literals and relax untracked references when presentation widens * fix(mcp): select complete output schemas in every verifier transport * fix(mcp): read reference pointers by schema position, not segment spelling * fix(mcp): protect references into collapsing boolean unions and keep referencing branches out of the collapse * fix(mcp): keep reduced schemas open when their root admits names by pattern * test(mcp): keep the reduced-schema pattern case outside the size-limited block * fix(mcp): omit patterns whose classes name astral characters * fix(mcp): decide union collapse and pointer protection from canonical branches * docs(mcp): document non-u astral matching and pin BMP agreement across V8 modes * fix(mcp): keep prototype-named properties as own properties in the dialect projection * test(mcp): select full output schemas in packet and signal schema checks * test(mcp): expect the advertised base64 schema to omit the unbounded pad-bit probe * fix(mcp): protect references into unevaluated keywords lost evaluation removes * fix(mcp): validate the doctor probe reply against the canonical output contract (#10655) * fix(mcp): validate the doctor probe reply against the canonical output contract * test(mcp): replay doctor probe validation under every output profile * test(mcp): accept typed-branch nullable unions in the advertised dialect (#10649) * test(mcp): select full output schemas in HTTP session workflows * fix(mcp): emit stack-safe classes with non-ASCII members and protect draft-07 reference siblings * fix(mcp): protect references into literal siblings of relaxed draft-07 references * feat(mcp): omit output schemas from tools/list by default (#10646) * feat(mcp): omit output schemas from tools/list by default No surveyed model API reads an output schema, MCP client validators repeat REA's own result validation, and complete output schemas were about 92% of the default tools/list. REA_MCP_OUTPUT_SCHEMA_PROFILE now resolves to off through one owner (resolveMcpOutputSchemaProfile); compact and full remain selectable. structuredContent is still delivered, and the deferred server serves both off and full from the recorded catalog with the matching recorded identity. Tests and artifact verifiers that validate results against complete advertised output contracts select full explicitly. * fix(mcp): select schemas in verification workflows * fix(mcp): select complete output schemas in the Electron verifier * fix(mcp): select complete output schemas in standalone verifier probes * fix(mcp): select complete output schemas in every verifier transport * test(mcp): select full output schemas in packet and signal schema checks * fix(mcp): validate the doctor probe reply against the canonical output contract (#10655) * fix(mcp): validate the doctor probe reply against the canonical output contract * test(mcp): replay doctor probe validation under every output profile * test(mcp): accept typed-branch nullable unions in the advertised dialect (#10649) * test(mcp): select full output schemas in HTTP session workflows * fix(mcp): keep the Evidence union on described borrowed inputs (#10597) * fix(mcp): keep the Evidence union on described borrowed inputs borrowEvidenceInput installed its advertised projection on one schema instance. A call site's .describe() rebuilds the schema from its definition, so match_native_functions advertised left and right as unconstrained values in every input profile. Install the projection in the borrowed parser's constructor so derived schemas keep it, for both borrowed inputs and borrowed arrays. * test(mcp): select the borrowed Evidence contract from its family * docs(mcp): admit baseline growth only for restored contract declarations * fix(mcp): state reduced multi-type properties as typed branches, not type lists The reduced fallback derived a property's types and emitted them as a type list, which Gemini, Moonshot and Ark reject. A property whose canonical schema is anyOf string and number therefore traded a typed union for a rejected construct when the inline projection fell back. Emit one type, or anyOf typed branches, so [T, null] becomes the dialect's nullable union. * feat(mcp)!: retire the full schema profiles and declare complete observations as a typed annotation (#10718) * refactor(mcp): declare complete observations as a typed annotation applied only on the wire * test(mcp): compare complete-observation declarations with their owning text * refactor(schema): couple Zod checks with their JSON Schema constraint keywords (#10725) * refactor(schema): couple Zod checks with their JSON Schema constraint keywords * refactor(schema): declare pattern approximations and object output roots as typed annotations (#10754) * refactor(schema): declare pattern approximations and object output roots as typed annotations * fix(schema): refuse pattern declarations JSON Schema cannot state * test(schema): select guided_workflows from its contract family * feat(mcp)!: retire the full input and output schema profiles (#10841) * feat(mcp)!: retire the full input and output schema profiles The compact input presentation is now the only advertised input schema, and output schemas are either omitted (`off`, the default) or bounded (`compact`). Catalog identity, the build-recorded digests and the recorded startup catalog collapse to those presentations: two digest profiles instead of six, one recorded catalog instead of two, and no input dialect baseline. Tests and verifiers that validated replies against listed full output schemas now validate against the canonical output contract, which REA already enforces server-side; tests that asserted canonical input restrictions read the canonical input schema instead of a full listing. BREAKING CHANGE: `REA_MCP_INPUT_SCHEMA_PROFILE=full` and `REA_MCP_OUTPUT_SCHEMA_PROFILE=full` are refused at startup and by `rea setup` with a configuration error naming the setting. Remove the setting from the client registration (or rerun setup with `REA_MCP_INPUT_SCHEMA_PROFILE=compact` / `REA_MCP_OUTPUT_SCHEMA_PROFILE=compact`). `REA_MCP_INPUT_SCHEMA_PROFILE` still accepts `compact`. Server-side validation is unchanged. * test(mcp): validate replies against canonical output contracts at every listed-schema reader tools/list omits output schemas by default, so fixtures, verifiers and the Android analysis runners that read a listed outputSchema now bind the canonical contract instead. connectLocalToolsMcp and advertisedMcpToolSchemas hand the SDK a definition carrying the canonical output schema, so the SDK client and caller-supplied validators check every successful reply. * test(mcp): resolve Android runners' output contracts from the selected repository The Android efficiency runners imported the canonical output-schema helper from the harness checkout while --repository selects the revision under test. Import it from the selected repository, as the runners already do for the SDK and Ajv. * test(mcp): let Android runners compare revisions before the canonical output helper A selected revision without scripts/lib/canonical-output-schema.mjs could not start the Android runners. Choose the output contracts in one harness helper: the selected revision's canonical contracts when it has them, otherwise its listed schemas under the full output profile it still supports. * fix(scripts): keep caller launch settings when the real Hopper verifier builds its server environment The verifier deleted REA_VERIFY_SERVER_COMMAND and REA_VERIFY_SERVER_ARGS_JSON from process.env itself before reading them, so a caller selecting an installed REA command silently ran the checkout's dist/main.js. Copy the environment, as main does, so only the child's environment changes. * test(mcp): validate whole replies against canonical output contracts wherever a listed definition is held tools/list omits output schemas by default and the full output profile is gone, so tests that handed the SDK a listed definition no longer checked complete replies. Attach the canonical output schema with withCanonicalOutputSchema at every held REA tool definition. Environment-served tools (not REA contracts), and the deferred-runtime and doctor tests that exercise per-profile listings, keep their listed definitions. * test(mcp): record the advertised catalog summary without the retired full profiles Retiring the full input and output profiles leaves only the compact input and compact output listings, so the summary drops the full-profile digests and every pattern only the full listings carried. Regenerated with npm run verify:advertised-schemas -- --update-summary.
30 KiB
English · 简体中文 · 繁體中文 · 日本語 · 한국어 · Türkçe · Русский · Tiếng Việt · ไทย · Deutsch · Español · Français · Українська · Polski · Português (Brasil) · العربية · فارسی · Bahasa Indonesia · Italiano · Ελληνικά · മലയാളം · Roman Urdu · Română · Български
REA:逆向一切
通過一個 MCP 服務,逆向分析二進位檔案、應用程式和執行階段行為。
看到喜歡的功能,弄清它的工作原理,深入到二進位層面。
快速開始 · REA 的工作原理 · 可以分析什麼 · 案例 · 建立 RL 環境 · 常見問題 · 文件
npx rea-agents setup
Important
REA 官方來源: morluto/rea, rea.tools, rea-agents (npm). 請透過這些官方來源提供的安裝與發布連結取得 REA。相似的儲存庫名稱或複製的 README 不能證明下載內容來自官方。
在應用中看到一個想加入自己產品的功能?讓 AI 代理用 REA 調查它。即使沒有原始碼,AI 代理也可以檢查應用、解釋功能的工作方式、展示證據,並為你的專案實現類似功能。
REA 將 AI 代理連接到分析工具,用於檢查原生二進位檔案、JavaScript 和 Electron 應用、.NET 程式集以及網站。你也可以在終端中使用同樣的工具。分析在本機執行,結果包含支撐各項結論的證據和相關限制。
設定流程會向 AI 代理註冊 REA,並安裝對應的工作流程指引。原生分析可以使用已有的 Hopper、Ghidra、IDA 或 Kuna;設定流程也可以在你核准後安裝 Hopper。靜態 JavaScript 分析不需要原生分析引擎。
訪問 REA 網站,查看設定說明、圖解指南和真實案例。
快速開始
Linux 上的 Ghidra、JADX、韌體工具啟動和靜態 JavaScript/Electron 分析需要在 REA 的 PATH 中提供相容 procps 的 ps,用於檢查程序所有權。復原步驟見安裝指南的 Linux 程序所有權前提。
設定 AI 代理
安裝 Node.js 和 npm 後,執行:
npx rea-agents setup
選擇 AI 代理,檢查計劃中的變更並核准。設定流程會添加 REA 的 MCP 服務和對應的工作流程指引,並備份已有組態。完成後重新啟動 AI 代理。
設定流程支援 Claude Code、Codex、Cursor、Gemini CLI、Grok Build 和其他 AI 代理。提供者組態和手動註冊 MCP 的方法見安裝與設定。
MCP 預設使用精簡輸入 Schema,以減少上下文開銷。精簡 Schema 省略的說明會接在工具描述之後。完整工具集和標準的伺服器驗證維持不變;見 MCP 合約指南。
設定會直接登記所選執行環境和 REA 入口指令碼。使用套件執行器時,請保留其快取項目及執行環境,並從目標專案以外的可信任目錄取得套件。 請參閱安裝指南。
預設會從 tools/list 省略輸出 Schema:沒有任何模型 API 會讀取它們,且 REA 會自行驗證每個結果。在 MCP 登記中設定 REA_MCP_OUTPUT_SCHEMA_PROFILE=compact 可在 4096 位元組內公布每個輸出 Schema。所有設定下,伺服器驗證和結構化結果仍保持完整。 請參閱 MCP 合約指南中的「Output schemas」。
詢問 AI 代理
弄清 Notes 應用的搜尋功能如何工作,展示證據,並為我的專案實現類似功能。
把 Notes 替換為目標應用,並描述你想瞭解的功能。
使用終端
檢查已解包的 JavaScript/Electron 應用目錄或 ASAR 檔案:
npx -y rea-agents@latest analyze-javascript-application /absolute/path/to/app --json
結果包含模組、匯入、Electron 邊界及相關證據。將路徑替換為你的目標路徑,例如 Windows 上的 "D:/apps/example"。
如果需要經常使用,可以安裝 rea 命令:
npm install --global rea-agents
rea --help
原生分析需要先設定分析提供者。原生命令、提供者選擇、快照和腳本用法見 CLI 與 Evidence 指南。
更新 REA
REA 更新較快,新版本經常包含錯誤修復。請將安裝的版本保持最新。
通過 npm install --global 或 bun add --global 安裝的 CLI 使用:
rea update
rea --update 是 rea update 的別名,接受相同的全域輸出選項。更新命令合計最多保留 4 MiB 的 stdout/stderr;命令結束後會拒絕過大的中繼資料回應,詳細安裝記錄採用有界診斷。進度輸出遵守終端背壓並等待已提交的寫入完成。
Bun 全域更新需要 Bun 1.2.17 或更新版本。如果使用較舊的 Bun 版本,請先手動升級 Bun,再執行 rea update。
要更新 AI 代理註冊和 skill,請執行更新命令輸出的設定命令。
如果使用 npx,通過以下命令更新 AI 代理設定:
npx rea-agents@latest setup
檢查設定變更並重新啟動 AI 代理。單次 CLI 操作可使用 npx rea-agents@latest,後接所需命令。使用 Bun 時,用 bunx rea-agents@latest 代替 npx rea-agents@latest。
REA 的工作原理
AI 代理通過 MCP 呼叫 REA,檢查目標並追蹤相關程式碼。REA 返回發現及對應證據。AI 代理據此提出後續問題、解釋行為,或編寫並測試實現。CLI 命令使用同樣的工作流程。
可以分析什麼
REA 需要 Node.js 22.x(>=22.23.4)、24.x(>=24.22.1)或 26+ (>=26.12.1),以及 npm。額外工具和主機支援取決於分析目標:
| 目標 | REA 返回的內容 | 要求與指南 |
|---|---|---|
| 原生二進位檔案 | 偽程式碼、組合語言、字串、符號、呼叫和引用 | Hopper、Ghidra、IDA 或 Kuna;原生分析 |
| 離線 ELF 佈局 | 節、段、原始符號/重定位資訊及靜態防護機制候選項 | Linux x64 上由呼叫方提供的 pwntools;二進位診斷 |
| Go 二進位檔案 | 內嵌編譯器版本、模組、替換項和建置設定 | 內建靜態 ELF/PE/thin Mach-O 檢查;無需安裝 Go |
| WASM 工件 | 驗證、節、精確的匯入/匯出 WAT 形式及解碼後的 WAT | 呼叫方提供的 WABT 1.0.42;inspect_wasm_artifact |
| EVM 位元組碼 | 分派選擇器、位元組偏移、推斷的參數和狀態可變性 | Linux x64 上的本地原始位元組/十六進位輸入載體;離線 EVM 指南 |
| Rust binaries | Embedded cargo-auditable dependency list | Rust binaries |
| Erlang BEAM | IFF chunks, atoms, exports, and tables | Built-in static BEAM inspection; Erlang BEAM |
| PE certificates | Authenticode WIN_CERTIFICATE entries and PKCS#7 signer/X.509 identity fields | Built-in static PE inspection; PE certificates |
| PE imports | Import and delay-load DLL names, ordinals, IAT RVAs and pefile import hash | Built-in static PE inspection; PE imports |
| Windows shortcuts | Shell Link target, arguments, working dir, ExtraData and Tracker droid facts | Built-in static LNK inspection; Windows shortcuts |
| ELF notes | PT_NOTE/SHT_NOTE owners, types, GNU build-id and ABI-tag fields | Built-in static ELF inspection; ELF notes |
| Binary hardening | PIE, NX, RELRO, CFG and related header flags for ELF, PE and Mach-O | Built-in static header inspection; binary hardening |
| Apple IPS crashes | .ips metadata, threads, images, registers and crash classes | Built-in static JSON inspection; Apple IPS |
| Linux kernel modules | .modinfo keys, __versions CRCs, this_module presence, and signature trailer | Built-in static ELF inspection; kernel modules |
| 已記錄的 Linux 崩潰 | 原始 note 記錄、每個已記錄執行緒的暫存器/訊號及可選的對映候選項 | Linux x64 上由呼叫方提供的 pwntools;可選的 GDB/pwndbg;已記錄崩潰 |
| 桌面安裝目錄 | 執行階段候選、支持檔案、元件標記與後續操作 | 有界的目錄與檔頭檢查;桌面應用 |
| JavaScript / Electron | 模組、匯入、source map、路由、IPC 和原生附加元件關係 | Node.js 和 npm;應用分析; Linux: procps ps |
| 網站 | 頁面結構、腳本、網路觀察結果和按請求獲取的螢幕擷取畫面 | Chrome 系瀏覽器;瀏覽器分析 |
| 已保存的網路擷取 | 請求、回應、可訪問的酬載和來源位置 | HAR / Fiddler Everywhere SAZ;原生 mitmproxy 擷取需要 Linux 上的 mitmdump;擷取指南 |
| 封包擷取 | 端點、DNS、TLS SNI、通訊協定分佈和 HTTP 請求 | 呼叫端提供的 tshark 和 capinfos (已在 Linux 驗證);pcap 指南 |
| .NET 程式集 | 中繼資料、CIL 指令、聲明的原生依賴和建置對比 | 靜態檢查;托管程式碼指南 |
| PyInstaller | CArchive, PYZ, Python bytecode | Static inspection; Python packaged applications |
| Deno compile binaries | Virtual files, entry point, recorded options, npm snapshot length | Static inspection; Deno compile executables |
| Android APK | 清單聲明、類別、反編譯的方法和引用 | Linux/macOS/Windows x64 上的無界面 JADX 和完整 JDK;Android 指南 |
| Android 裝置 | 裝置、套件、程序、日誌、傾印、螢幕擷取以及 APK/檔案傳輸 | 呼叫端提供的 adb(模擬器或實體裝置);ADB 指南 |
| JEB 專案 | 引擎支援的專案單元、成品摘要和型別/方法的虛擬碼 | 由呼叫端啟動、提供 MCP 的 JEB 用戶端,透過 REA_JEB_MCP_URL 選擇;JEB 指南 |
| Android 資源 | 解碼後的清單、字串表、語系和版本資訊 | 呼叫端提供的 Apktool 啟動器;資源指南 |
| Flutter 應用 | Dart 快照雜湊、依 ABI 的程式庫雜湊及引擎建置來源 | 無(靜態 APK 解析);Flutter 指南 |
| 韌體 | 區域、提取結果和轉交原生分析的內容 | Linux 上的 Binwalk / Unblob;韌體指南 |
| 封包記錄 | 指定欄位、重複值、篩選條件與解碼規則 | Linux: TShark 4.x + prlimit; 封包分析指南 |
| 錄製的邏輯訊號 | 解碼註解、樣本範圍與診斷資訊 | Linux: sigrok-cli 0.7.2 + prlimit; 訊號記錄指南 |
| 軟體包與資源 | 檔案清單、摘要、plist、Apple bundle 結構和提取的資源 | 製品與 JavaScript 指南、Apple 應用 |
| 處理程序行為 | 終端輸出、互動、退出和檔案系統觀察結果,以及執行對比 | 支援原生 PTY 的 Linux/macOS;處理程序擷取 |
| SQLite 資料庫 | 資料表、欄位、索引、檢視、觸發器和選定普通資料表的列 | 本機資料庫/WAL 快照;Node.js 24.x >=24.15 或 26+,具備原生 SQLite 限制 API |
| GPU 程式碼物件 | CUDA/HIP 目標、選定核心參數和資源、保留的 PTX 文字 | 內建靜態檢查 ELF/PE/fatbin/CUBIN/PTX; GPU |
| 模型檔案 | GGUF / safetensors 中繼資料、張量宣告和衍生總量 | 標頭檢查;可選完整檔案雜湊; GGUF / safetensors |
| IL2CPP 中繼資料 | Unity global-metadata.dat 組件映像、型別與方法名稱、索引範圍 | 靜態解碼版本 24、27、29、31 和 39;無需 Unity |
| Godot PCK | 封存清單與擷取、原始標頭和目錄資訊、選定內容身分 | 靜態格式 2、3 和 4;無需 Godot |
| APK 簽章 | v1/v2/v3/v3.1 簽署者、憑證指紋、金鑰輪換和摘要自洽性 | 內建靜態檢查; inspect_apk_signature |
靜態 JavaScript 和 .NET 檢查讀取提供的檔案,不執行應用。執行階段擷取會以你的使用者權限執行目標或與之互動;各執行階段指南說明瞭具體影響。
若要離線檢查原生二進位檔,REA 也支援由呼叫端自行提供的 GNU objdump 和 Rizin。逆向工程工具指南說明了分析提供者的設定、CLI 指令及 Evidence 的限制。REA 不會安裝或更新這兩個分析提供者。
大型二進位檔可透過 REA_GHIDRA_STARTUP_TIMEOUT_MS 或 REA_HOPPER_STARTUP_TIMEOUT_MS 延長提供者啟動期限。
不同提供者支援的原生格式和主機系統有所不同。請參閱 Hopper 與 Ghidra 設定、IDA 指南、Kuna和實驗性 Windows Ghidra 支援。Ghidra 也支援 16 位 DOS 分析。提供者選擇見 CLI 指南。對於最新 npm 版本發佈後新增的功能,請查看發佈可用性。
案例
DX-Ball:重建聲像計算
沿聲音呼叫追蹤到根據位置計算聲像的輔助函數,檢查指令,將不完整的偽程式碼轉為 C。重建結果通過了 3,205 個原始 x86 測試用例,並復現了編譯後函數的全部 63 個位元組。
Notion:追蹤 Electron 剪貼簿橋
找到渲染處理程序的剪貼簿 API,沿 preload 和 IPC 追蹤到主處理程序,並檢查富格式剪貼簿資料。
TH04:恢復 DOS 環形子彈的計算
檢查原始 PC-98 遊戲的 16 位指令,恢復固定角度和瞄準角度的計算,並將重建的 C++ 與當年的編譯器輸出進行對比。
用 REA 建立 RL 環境
錄製 Web 應用程式工作階段,將 API 轉為工具,並匯出 AI 代理可使用的環境。用 AgentEnv 執行,再加入任務與獎勵檢查,用於 RL 訓練或評測。
如果你用 REA 分析了有趣的目標,我們很想瞭解。歡迎通過 issue 或 pull request 分享案例,說明目標、你的問題、REA 如何提供幫助,以及你的發現。
建立 RL 環境
為 AI 代理建立本機練習環境,讓它練習尋找 issue、建立資料夾等任務,無需執行原應用程式。這個環境可用於強化學習(RL),也可用於測試代理完成任務的能力。
REA 將錄製的 API 請求與回應轉為代理可呼叫的工具。環境使用錄製的資料,只有錄製證據確認了某項修改的效果,才會支援該修改。
在代理中設定好 REA 後,將下方範例的網址與資料夾任務替換為你自己的:
使用 REA 為我的測試 Web 應用程式建立 RL 環境,網址是
http://127.0.0.1:3000。
涵蓋列出、建立、重新命名與刪除資料夾。可以建立和刪除測試資料夾,
但不要修改既有資料。
將環境儲存到名為 my-env 的資料夾。檢查哪些操作可用,並告訴我如何執行。
改用命令列
如果你已經將應用程式在瀏覽器中的請求與回應錄製成檔案,可以使用這些命令。執行產生的環境還需要 AgentEnv 與 Docker。
rea environment-build ./session.har ./my-env --name my-env --json
agent-env run ./my-env
REA 匯出可直接執行的環境,並附帶基本測試,檢查環境能否啟動與回應。將它接入 RL 框架,即可設定任務目標、加入獎勵檢查並執行訓練。
桌面應用程式環境
REA 也能為 Linux 桌面應用程式建立環境,代理透過螢幕截圖、滑鼠和鍵盤使用它。只要一行請求,例如「幫我建立一個 Gnote 環境,讓代理在購物清單筆記中加入橄欖油」,你的代理就會在本機建置電腦上安裝應用程式、撰寫任務、匯出環境,並在全新的電腦上檢查任務。建立環境的機器需要 amd64 或 arm64 上的 Linux、Docker,以及指南固定的 agentenv 框架版本。
常見問題
哪些 AI 代理可以使用 REA?
任何支援本地 MCP 服務的 AI 代理都可以使用。設定流程會設定受支援的 AI 代理;其他客戶端可通過手動註冊 MCP 使用。
需要 Hopper、Ghidra、IDA 或 Kuna 嗎?
深入的原生分析需要其中一個引擎。靜態 JavaScript 和 .NET 檢查不需要原生分析引擎。設定流程可以在你核准後安裝 Hopper;Ghidra、IDA 和 Kuna 則使用已有安裝。見提供者設定。
需要先啟動 Hopper 嗎?
REA 會在操作需要時啟動 Hopper。在 macOS 上,首次執行時可能會出現對話框,讓你選擇演示模式或啟用授權。見 Hopper 啟動與故障排查。
從 skills.sh 安裝 skill 有什麼作用?
skill 為 AI 代理提供調查指引。使用 npx rea-agents setup 註冊 REA 的 MCP 服務並安裝對應的指引,然後重新啟動 AI 代理。見僅安裝 skill。
REA 返回什麼程式碼?
原生分析返回偽程式碼和組合語言。JavaScript/Electron 分析恢復模組及其關係。AI 代理利用這些發現編寫並測試實現;案例提供了完整示例。
REA 會上傳我的應用嗎?
REA 在本機分析目標。AI 代理會接收工具結果,其模型提供商有自己的資料政策。
遇到錯誤時該怎麼辦?
先更新;最近的版本可能已經修復了問題。
通過 npm 安裝的 CLI 使用:
rea update
通過 npx 設定 AI 代理時使用:
npx rea-agents@latest setup
如果正在使用 AI 代理,請完成設定更新並重新啟動 AI 代理。重試同一任務。如果問題仍然存在,請提交 issue,附上 REA 版本、目標類型、復現步驟和錯誤輸出。
文件
可以先閱讀網站上的實操指南。具體選項、前提條件和結果契約見:
- 安裝與設定:AI 代理註冊、提供者組態、更新和卸載。
- 就緒檢查與故障排查:診斷特定 AI 代理或分析引擎。
- CLI 與 Evidence:命令、提供者選擇、快照、匯入/匯出和退出狀態。
- MCP 契約和AI 代理提示詞:工具結果、會話和引導式調查。
- 工具目錄:建置時生成的工具、提供者和 CLI 命令清單。
- 路線圖:計劃中的工作和能力跟蹤。
請按照 SECURITY.md 報告漏洞。
Star 歷史
🎉 GitHub Star 達到 400,000 個,感謝大家!
感謝每一位使用 REA、報告錯誤、提出功能需求、測試建置和貢獻修復的朋友。
免責聲明
負責任使用的相關指引請見 DISCLAIMER.md。
REA 用於合法的研究、教育、互通性、軟體保存,以及分析你擁有或獲准檢查的軟體。
本專案對非法或未經授權使用的立場涵蓋所有 REA 版本、分發管道和執行平台; 每份副本仍適用其隨附的授權。
參與貢獻
歡迎幫助改進 REA!你可以提交 issue 報告錯誤或建議功能,也可以提交 pull request 改進程式碼或文件。
開發設定和檢查見 CONTRIBUTING.md,驗證流程見測試指南,專案結構見架構圖。
授權條款
REA 自行編寫的程式碼採用 MIT 授權;第三方內容保留各自的授權和著作權聲明。 依賴清單、授權原文及外部工具條款見第三方聲明。
使用者須自行合法取得商用工具及所需使用權,包括 IDA Pro / Hex-Rays 反編譯器、 Hopper 和 JEB,並遵守各自授權。REA 不提供工具授權、金鑰或啟用權利;試用版和 展示版也須遵守廠商對使用者、功能、自動化及輸出分享的限制。不得使用破解副本、 竊取或違規共用金鑰,也不得繞過授權限制。本指引不變更 MIT 或第三方授權。
