Airsc miễn phí cho tất cả. Nếu nó giúp bạn, hãy ủng hộ $2–$20.

Ủng hộ
MCP serverAn toànTính năng AI & LLMNâng cao

GhidrAssistMCP

symgraph · symgraph/GhidrAssistMCP

GhidrAssistMCP là một tiện ích mở rộng của Ghidra cung cấp máy chủ MCP, cho phép các trợ lý AI tương tác với các công cụ và dữ liệu kỹ thuật đảo ngược của Ghidra.

An native MCP server extension for Ghidra

761 sao71Giấy phép: MITCập nhật 3 tháng trước0 lượt mở

Xem trước

▍

Bạn có thể làm gì với nó

  • Một agent AI có thể thực hiện phân tích nhị phân tự động bằng trình dịch ngược và trình gỡ lỗi mạnh mẽ của Ghidra.
  • Truy vấn Ghidra thông qua một agent để trích xuất thông tin về các hàm, chuỗi và nhập khẩu từ một tệp nhị phân.
  • Tự động hóa các tác vụ kỹ thuật đảo ngược hoặc quy trình phân tích bảo mật phổ biến với sự hỗ trợ của AI.

Kiểm tra an toàn

An toàn

Không thấy dấu hiệu rủi ro trong các file đã quét.

Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.

Trích từ README

GhidrAssistMCP

A powerful Ghidra extension that provides an MCP (Model Context Protocol) server, enabling AI assistants and other tools to interact with Ghidra's reverse engineering capabilities through a standardized API.

Overview

GhidrAssistMCP bridges the gap between AI-powered analysis tools and Ghidra's comprehensive reverse engineering platform. By implementing the Model Context Protocol, this extension allows external AI assistants, automated analysis tools, and custom scripts to seamlessly interact with Ghidra's analysis capabilities.

Key Features

  • MCP Server Integration: Full Model Context Protocol server implementation using official SDK
  • Dual HTTP Transports: Supports SSE and Streamable HTTP transports for maximum client compatibility
  • 49 Built-in Tools: Comprehensive set of analysis tools with action-based consolidation for cleaner APIs
  • 6 MCP Resources: Static data resources for program info, functions, strings, imports, exports, and segments
  • 7 MCP Prompts: Pre-built analysis prompts for common reverse engineering tasks
  • Result Caching: Intelligent caching system to improve performance for repeated queries
  • Async Task Support: Long-running operations execute asynchronously with task management
  • Multi-Program Support: Work with multiple open programs simultaneously using program_name; use list_binaries Project Path values to disambiguate duplicate filenames
  • Multi-Window Support: Single MCP server shared across all CodeBrowser windows with intelligent focus tracking
  • Active Context Awareness: Automatic detection of which binary window is in focus, with context hints in all tool responses
  • Configurable UI: Easy-to-use interface for managing tools and monitoring activity
  • Real-time Logging: Track all MCP requests and responses with detailed logging
  • Dynamic Tool Management: Enable/disable tools individually with persistent settings

Clients

Shameless self-promotion: GhidrAssist supports GhidrAssistMCP right out of the box.

Screenshots

Installation

Prerequisites

  • Ghidra 11.4+ (tested with Ghidra 12.1 Public)
  • An MCP Client (Like GhidrAssist)

Binary Release (Recommended)

  1. Download the latest release:

    • Go to the Releases page
    • Download the latest .zip file (e.g., GhidrAssistMCP-v1.0.0.zip)
  2. Install the extension:

    • In Ghidra: File → Install Extensions → Add Extension
    • Select the downloaded ZIP file
    • Restart Ghidra when prompted
  3. Enable the plugin:

    • File → Configure → Configure Plugins
    • Search for "GhidrAssistMCP"
    • Check the box to enable the plugin

Building from Source

Source builds require Java 25 or newer. The included Gradle wrapper pins the supported Gradle release; use it instead of a system Gradle installation.

  1. Clone the repository:

    git clone <repository-url>
    cd GhidrAssistMCP
    
  2. Point Gradle at your Ghidra install:

    • Set GHIDRA_INSTALL_DIR (environment variable), or pass -PGHIDRA_INSTALL_DIR= when you run Gradle.
  3. Build + install:

    Ensure Ghidra isn't running and run:

    ./gradlew installExtension
    

    This copies the built ZIP into your Ghidra install ([GHIDRA_INSTALL_DIR]/Extensions/Ghidra) and extracts it into your Ghidra user Extensions folder (replacing any existing extracted copy).

    If you need to override that location, pass -PGHIDRA_USER_EXTENSIONS_DIR=.

  4. Restart / verify:

    • Restart Ghidra.
    • If the plugin doesn't appear, enable it via File → Configure → Configure Plugins (search for "GhidrAssistMCP").

Configuration

Initial Setup

  1. Open the Control Panel:

    • Window → GhidrAssistMCP (or use the toolbar icon)
  2. Configure Server Settings:

    • Host: Default is localhost
    • Port: Default is 8080
    • Enable/Disable: Toggle the MCP server on/off

Tool Management

The Configuration tab allows you to:

  • View all available tools (49 total)
  • Enable/disable individual tools using checkboxes
  • Save configuration to persist across sessions
  • Monitor tool status in real-time

Headless Mode Quickstart

GhidrAssistMCP can also be started from Ghidra's analyzeHeadless launcher. This is useful when you want MCP access to a program loaded in headless Ghidra without opening the CodeBrowser UI.

First, build and install the extension so Ghidra can load the compiled classes and bundled dependencies:

cd /path/to/GhidrAssistMCP

export GHIDRA_INSTALL_DIR=/path/to/ghidra_12.1_PUBLIC
./gradlew installExtension

Set paths for your Ghidra install and extracted user extension. On Linux, Ghidra user extensions usually live under ~/.config/ghidra/<ghidra_profile>/Extensions:

export GHIDRA_INSTALL_DIR=/path/to/ghidra_12.1_PUBLIC
export GHIDRA_USER_EXTENSIONS_DIR="$HOME/.config/ghidra/ghidra_12.1_PUBLIC/Extensions"
export GHIDRASSISTMCP_EXT="$GHIDRA_USER_EXTENSIONS_DIR/GhidrAssistMCP"

Import a binary and start the MCP server as a headless pre-script:

"$GHIDRA_INSTALL_DIR/support/analyzeHeadless" /tmp/ghidra-projects McpHeadless \
  -import /path/to/binary \
  -scriptPath "$GHIDRASSISTMCP_EXT/ghidra_scripts" \
  -preScript GAMCPStartServerScript.java "host=127.0.0.1" "port=8080"

For a binary that is already imported into the project, use -process instead:

"$GHIDRA_INSTALL_DIR/support/analyzeHeadless" /tmp/ghidra-projects McpHeadless \
  -process binary_name \
  -scriptPath "$GHIDRASSISTMCP_EXT/ghidra_scripts" \
  -preScript GAMCPStartServerScript.java "host=127.0.0.1" "port=8080"

To keep a headless MCP session open after analysis completes, run the server as a post-script with wait mode:

"$GHIDRA_INSTALL_DIR/support/analyzeHeadless" /tmp/ghidra-projects McpHeadless \
  -process binary_n
Xem mã nguồn trên GitHub