Communitygithub.com

ghidra-reverse

用於免費/開放原始碼逆向工程的 Ghidra(無頭或 GUI),包括反編譯、交叉引用,以及在沒有 IDA 時可選用 Ghidra MCP 工作流程。

ghidra-reverse 是什麼?

此技能提供了一套完整的 Ghidra 逆向工程工作流程,涵蓋圖形化介面與無頭(headless)批次分析模式。它能協助開發者或 AI 代理在缺乏 IDA Pro 授權時,利用開源的 Ghidra 進行反編譯、交叉引用分析、腳本自動化(Java/Jython/PyGhidra),並可選用 Ghidra MCP 橋接 AI 工具。技能支援多種平台(包括 Cli 環境與 CI/CD),並強制要求從 `tool-index` 讀取正確的 Ghidra 路徑,避免路徑錯誤。工作流程包含建立專案、自動分析、關鍵函數定位與重命名、以及與 `patch-diff-exploit` 等技能聯動進行補丁差分。最後提供任務完成自檢清單,確保步驟可重現。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/zhaoxuya520/reverse-skill/tree/main/skills/ghidra-reverse

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Ghidra 逆向工程

必要操作(讀完後立刻執行)

  1. 立即: 讀取 ../field-journal/precedent-reverse.md
  2. 立即: 確認需要 Ghidra(無 IDA / 偏好開源 / 批次 headless)
  3. 下一步: 讀 ../tool-index.md 查詢 ghidra / ghidra-mcp 路徑
  4. 下一步: 缺少工具 → 自行安裝 ghidra-mcp(若 manifest 支援)或按照手動步驟安裝 Ghidra
  5. 執行: 導入樣本 → 自動分析 → 匯出關鍵函數反編譯

適用場景

  • 無 IDA 授權時的主要逆向入口
  • 批次 headless 分析 / CI 中反編譯
  • Ghidra 腳本(Java/Python Jython/PyGhidra)自動化
  • 與 binary-diff / patch-diff-exploit 的 ghidriff 聯動

與 IDA 分工

需求優先使用
已有 IDA MCP 深層分析ida-reverse/
開源 / 批次 / 教學本技能
僅 CLI 快速偵察radare2/

工作流程

1. 專案與自動分析

□ 新建 Project → 匯入檔案 → 分析(預設分析器)
□ 記錄語言/編譯器識別結果與基底位址
□ 標記入口、匯出表、字串交叉引用

2. 關鍵函數

□ 從字串 / 匯入 API 反向查詢
□ 反編譯視窗還原演算法
□ 重新命名函數/變數;撰寫 Plate 註解
□ 需要動態分析時交接 Frida/GDB(逆向工程動態章節)

3. Headless(批次)

# 範例:analyzeHeadless 路徑因安裝而異,必須從 tool-index 取得
analyzeHeadless /path/to/project Proj -import sample.bin -postScript ExportDecomp.py

4. MCP(若已設定)

□ 確認 ghidra MCP 埠號(常見 8765,以 tool-index 為準)
□ 使用 MCP 工具拉取反編譯 / xrefs,禁止猜測埠號

工具鏈

工具用途自舉方式
Ghidra反編譯主要工具手動 release / 套件管理員
ghidra-mcpAI 橋接自舉能力名稱 ghidra-mcp
ghidriff補丁差異比對見 patch-diff-exploit

參考資料

  • references/ghidra-cheatsheet.md
  • ../ida-reverse/ ../radare2/ ../binary-diff/

路由上下文

上游: MASTER R22
下游: 動態驗證 → Frida/GDB;利用 → pwn-chain
同級: ida-reverse(商業深層分析)

任務完成自檢

  • 是否基於真實 Ghidra/tool-index 路徑?
  • 是否標註函數位址並重新命名?
  • 是否有可重現步驟?
  • Check list / 日誌?

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

api-security

Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication, authorization, rate-limit, and CI/CD testing.

apk-reverse

在 CLI 环境下做 Android APK 逆向时使用。适用于 APK 解包、Java 反编译、smali 修改、重打包、Frida 动态 Hook,以及按需切换到 so/native 分析。优先使用本机已安装的 jadx、apktool、frida、adb、ida-reverse、radare2。

attack-chain

Use for authorized multi-stage attack-path planning and orchestration when a task spans reconnaissance, initial access, privilege escalation, lateral movement, or impact assessment. Route single-stage tasks directly to their specialist skill.

binary-diff

|

binary-ninja-reverse

Use for authorized binary analysis in Binary Ninja, including HLIL/MLIL/LLIL inspection, strings/imports/exports, cross-references, types, patch review, Python API automation, and optional Binary Ninja MCP or localhost HTTP integration.

browser-automation

|

browser-extension-reverse

Use for authorized reverse engineering of browser extensions (Chrome/Firefox) including manifest analysis, background workers, and extension-based credential or traffic logic recovery.

case-review

Reviews a reverse-skill case package for scope readiness, Evidence to Finding to Path traceability, work item coverage, timeline references, and optional artifact hash integrity before report handoff.

cloud-k8s

Use for authorized cloud, container, and Kubernetes security assessment including metadata SSRF, IAM misconfig, container escape paths, and cluster RBAC review.

code-audit

Use for authorized source-code security review and SAST workflows including Semgrep, CodeQL patterns, dangerous API hunting, and fix verification.

ctf-sandbox

Thin PRIMARY for CTF / AWD / 靶场 multi-type orchestration. Hands off to the sidecar CTF-Sandbox-Orchestrator. Use when the user says CTF, AWD, 靶场, or 比赛题 and no more specific pwn/APK/IDA route already won.

database-security

Use for authorized database security assessment covering PostgreSQL/MySQL/MSSQL/Mongo/Redis exposure, authz, UDF/command paths, and misconfiguration review.

diagram-generator

generate, refine, validate, and render diagrams from natural language, notes, code snippets, schemas, tables, or existing diagram source. use for flowcharts, swimlanes, sequence diagrams, state diagrams, er diagrams, class diagrams, architecture/c4-style diagrams, dependency graphs, gantt charts, mind maps, user journeys, sankey-style flows, org charts, network graphs, and other visual models. supports mermaid by default, graphviz dot for complex graph layout, plantuml for uml-heavy engineering diagrams, and svg output when direct markup is more reliable.

digital-forensics

Use for authorized digital forensics including memory dumps, disk timelines, PCAP investigation, artifact triage, and IR evidence preservation.

docs-generator

|

dotnet-reverse

.NET / C# 二进制逆向。当目标是 .NET assembly(PE 头含 CLR、.exe/.dll 托管程序)、C# 编译产物(含 NativeAOT)、红队 Sharp* 工具(Rubeus / SharpHound / SharpHound 等)、.NET 混淆程序(ConfuserEx / SmartAssembly / Babel / Eazfuscator)、.NET loader / info-stealer / 套壳 malware 时使用。优先用 dnSpyEx + de4dot,需要 AI 直接操作时联动 dnSpy MCP。不用于纯 native 二进制(走 reverse-engineering / ida-reverse)。

edr-bypass-re

|

email-security

Use for authorized email security review including phishing analysis, header authentication (SPF/DKIM/DMARC), BEC patterns, and mailbox token abuse research.

firmware-pentest

|

go-rust-reverse

Use for reverse engineering stripped Go and Rust binaries including runtime recognition, pclntab/moduel data recovery, panic strings, and idiomatic decompilation recovery.

相關技能