ghidraMCP
ghidraMCP 是一个模型上下文协议 (MLM) 服务器,允许 LLM 自主地对应用程序进行逆向工程。它向 MCP 客户端公开了 Ghidra 核心功能中的众多工具。
https://github.com/user-attachments/assets/36080514-f227-44bd-af84-78e29ee1d7f9
特征
MCP 服务器 + Ghidra 插件
- 在 Ghidra 中反编译和分析二进制文件
- 自动重命名方法和数据
- 列出方法、类、导入和导出
安装
先决条件
吉德拉
首先,从此仓库下载最新版本。其中包含 Ghidra 插件和 Python MCP 客户端。然后,你可以直接将插件导入 Ghidra。
- 运行 Ghidra
- 选择
File
->Install Extensions
- 点击
+
按钮 - 从下载的版本中选择
GhidraMCP-1-2.zip
(或您选择的版本) - 重启 Ghidra
- 确保在
File
->Configure
->Developer
中启用了 GhidraMCPPlugin - 可选:使用
Edit
->Tool Options
->GhidraMCP HTTP Server
在 Ghidra 中配置端口
视频安装指南:
https://github.com/user-attachments/assets/75f0c176-6da1-48dc-ad96-c182eb4648c3
MCP 客户端
理论上,任何 MCP 客户端都可以与 ghidraMCP 兼容。下面给出了三个示例。
示例 1:Claude Desktop
要将 Claude Desktop 设置为 Ghidra MCP 客户端,请转到Claude
-> Settings
-> Developer
-> Edit Config
-> claude_desktop_config.json
并添加以下内容:
或者,直接编辑此文件:
服务器 IP 和端口可配置,应设置为指向目标 Ghidra 实例。如果未设置,则两者均默认为 localhost:8080。
示例 2:克莱恩
要将 GhidraMCP 与Cline一起使用,还需要手动运行 MCP 服务器。首先运行以下命令:
唯一必需的参数是传输。如果所有其他参数均未指定,则默认为上述参数。MCP 服务器启动后,打开 Cline 并选择顶部的MCP Servers
。
然后选择Remote Servers
并添加以下内容,确保 URL 与 MCP 主机和端口匹配:
- 服务器名称:GhidraMCP
- 服务器网址:
http://127.0.0.1:8081/sse
8081/sse
例 3:5ire
另一个支持后端多种模型的 MCP 客户端是5ire 。要设置 GhidraMCP,请打开 5ire,然后前往Tools
-> New
,并设置以下配置:
- 工具密钥:ghidra
- 名称:GhidraMCP
- 命令:
python /ABSOLUTE_PATH_TO/bridge_mcp_ghidra.py
从源代码构建
- 将以下文件从 Ghidra 目录复制到此项目的
lib/
目录:
Ghidra/Features/Base/lib/Base.jar
Ghidra/Features/Decompiler/lib/Decompiler.jar
Ghidra/Framework/Docking/lib/Docking.jar
Ghidra/Framework/Generic/lib/Generic.jar
Ghidra/Framework/Project/lib/Project.jar
Ghidra/Framework/SoftwareModeling/lib/SoftwareModeling.jar
Ghidra/Framework/Utility/lib/Utility.jar
Ghidra/Framework/Gui/lib/Gui.jar
- 通过运行以下命令使用 Maven 进行构建:
mvn clean package assembly:single
生成的 zip 文件包含构建的 Ghidra 插件及其资源。这些文件是 Ghidra 识别新扩展所必需的。
- lib/GhidraMCP.jar
- 扩展属性
- 模块清单
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
MCP 服务器允许 LLM 通过公开 Ghidra 功能自主地对应用程序进行逆向工程,从而实现方法和数据的反编译、分析和自动重命名。
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server that enables secure terminal command execution, directory navigation, and file system operations through a standardized interface for LLMs.Last updated -1023PythonMIT License
- AsecurityFlicenseAqualityA lightweight MCP server that provides a unified interface to various LLM providers including OpenAI, Anthropic, Google Gemini, Groq, DeepSeek, and Ollama.Last updated -6218Python
- -securityFlicense-qualityEnables LLMs to perform binary analysis using Ghidra in headless mode, extracting functions, pseudocode, structs, and enums from binaries for interactive reverse-engineering.Last updated -1Python
- AsecurityAlicenseAqualityMCP server implementation that enables LLMs to interact with Rollbar error tracking data, allowing users to list and analyze errors, view occurrences, track deployments, and access project information.Last updated -132562TypeScriptMIT License