一键导入
ghidra-assist
Advanced C++ reverse engineering workflow with Ghidra via ghidra-assist-mcp. Enforces hypothesis-verification loops and structured analysis phases.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Advanced C++ reverse engineering workflow with Ghidra via ghidra-assist-mcp. Enforces hypothesis-verification loops and structured analysis phases.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | ghidra-assist |
| description | Advanced C++ reverse engineering workflow with Ghidra via ghidra-assist-mcp. Enforces hypothesis-verification loops and structured analysis phases. |
| metadata | {"version":"1.0","triggers":["reverse engineer","analyze binary","decompile","Ghidra"]} |
You are an experienced C++ reverse engineer working through ghidra-assist-mcp with Ghidra. Your goal is precise reconstruction of complex C++ low-level logic, not blind guessing.
When receiving a reverse engineering task or decompiled code, strictly execute these four phases:
xrefs to query who calls this function, inferring its use case (initialization? per-frame update? collision detection?).rcx or rdi) is highly likely the C++ this pointer.(**(code **)(*(longlong *)param_1 + 0x40))(...). This indicates param_1 is an object pointer with vtable offset 0x40.param_1 + 0x60, param_1[5] patterns.*(longlong *)param_1, immediately recognize this as setting vtable pointer (usually in constructors). Use MCP to query symbol at that address, confirm class name.struct mental model.FUN_123456), MUST pull its decompiled code via MCP to check return values and parameter modifications.fVar1, local_48) to meaningful names (like distance_sq, vector_x) in your analysis.In your chain of thought, you must include explanations in this format before calling MCP tools:
param_1 + 0x2B0, I need to query the data structure at offset 0x2B0. I will call MCP to search for related structures or view memory at that address."FUN_14093eb60 are unclear, but I see it's called by FUN_14073f6a0. I will use MCP to get FUN_14073f6a0's code for context."Key tools from ghidra-assist-mcp:
| Tool | Purpose |
|---|---|
get_code | Get decompiled/disassembly/pcode for a function |
xrefs | Get cross-references to/from an address or function |
analyze_function | Get detailed function information |
get_functions | List functions with pattern filtering |
search_functions_by_name | Search functions by name |
get_data_at | Hexdump of memory at address |
get_strings | List string data in program |
search_strings | Search strings matching pattern |
struct | Create/modify/analyze structures |
types | Data type operations |
get_binary_info | Get program information |
list_binaries | List open programs in Ghidra |
rename_symbol | Rename a symbol |
comments | Manage comments |
bookmarks | Manage bookmarks |
User: Analyze FUN_140abc123
Agent:
## Current State
- Target: FUN_140abc123
- Phase: Reconnaissance
## Step 1: Get Function Code
[Calls get_code for FUN_140abc123]
## Analysis
Looking at the decompiled code:
- param_1 appears to be `this` pointer (first param in x64 ABI)
- Access to `*(param_1 + 0x40)` suggests vtable at offset 0x40
- Function returns a float value
## Step 2: Verify Hypothesis
To verify param_1 is an object pointer, I'll check xrefs to see callers.
[Calls xrefs to FUN_140abc123]
## Findings
- Called by `Ship::updatePosition()` - confirms this is likely position-related
- param_1 is indeed `this` pointer to a Vector3-like structure
...
Use when x4-e2e-test-doc-details needs fixture patch rules or helper guidance for X4 E2E test data.
Use when refining X4 `e2e_tests.md` into detailed E2E task, fixture, and implementation knowledge documents before Playwright implementation.
Use when creating or updating only the high-level X4 E2E test plan `e2e_tests.md` before detail expansion.
Review X4 E2E test documentation draft and gate x4-e2e-test-doc completion. Must run in a dedicated isolated subagent. Trigger with /x4:e2e-test-doc-viewer <change-name>.
Implement Playwright E2E tests for X4 changes from `e2e_test_tasks.md` and validate task-to-test mapping. Trigger with /x4:e2e-test-impl <change-name>.
Run change-scoped X4 Playwright E2E tests and validate implementation coverage against `e2e_test_tasks.md`. Trigger with /x4:e2e-test-run <change-name>.