Ghidra Zig插件

Ghidra Zig插件

一个Ghidra插件,通过Zig实现与MCP服务器的桥接,增强程序分析能力。

快速入门

  1. 克隆仓库: git clone https://github.com/yourusername/ghidra-mcp-zig.git cd ghidra-mcp-zig

  2. 创建 .env 文件并设置路径: GHIDRA_PATH=/path/to/ghidra_11.3.1_PUBLIC/Ghidra/Features/Base/lib/Base.jar JAVA_HOME=/path/to/your/jdk

  3. 构建项目: make all

  4. 启动MCP服务器: make run-server

  5. 安装插件: make build-plugin cp zig-out/lib/libghidra-mcp-zig.dylib /path/to/ghidra/Extensions/Ghidra/ghidra-mcp-zig/

  6. 重启Ghidra并在插件管理器中启用。

可用命令

  • decompile:反编译函数
  • rename_function:重命名函数
  • list_functions:列出所有函数