An advanced LLM-powered plugin for interactive reverse engineering assistance in Ghidra.
Description
GhidrAssist integrates Large Language Models (LLMs) into Ghidra to provide intelligent assistance for binary exploration and reverse engineering. It supports any OpenAI v1-compatible API, including local models (Ollama, LM-Studio, Open-WebUI) and cloud providers (OpenAI, Anthropic, Azure).
Key Features
Core Functionality:
Code Explanation - Explain functions and instructions in both disassembly and decompiled pseudo-C
Security analysis panel showing risk level, activity profile, and API usage
Editable summaries with user-edit protection from auto-overwrite
Interactive Chat - Multi-turn conversational queries with persistent chat history
Custom Queries - Direct LLM queries with optional context from current function/location
Graph-RAG Knowledge System:
Semantic Knowledge Graph - Hierarchical representation of binary analysis
High: Deep security analysis (~30-60s, 2x cost, recommended for vulnerability hunting)
Note: Agentic mode requires models with strong function calling and multi-step reasoning capabilities. Smaller models may struggle with complex investigations. Extended thinking is optional but can significantly improve analysis quality for complex reverse engineering tasks.
Using GhidrAssistMCP for Tool-Based Analysis
GhidrAssistMCP provides MCP tools that allow the LLM to interact directly with Ghidra's analysis capabilities.
Setup
Start the MCP Server
Configure GhidrAssist:
Open Tools → GhidrAssist Settings → MCP Servers tab
Add server: http://127.0.0.1:8081 as GhidrAssistMCP with transport type SSE
Enable MCP in queries:
In the Custom Query tab, check "Use MCP"
Optionally enable "Agentic" for autonomous investigation mode
Usage Modes
Regular MCP Queries:
Enable "Use MCP" checkbox
Ask questions like "What does the current function do?"
LLM can call tools to get decompilation, cross-references, etc.
Agentic Mode (Recommended):
Enable both "Use MCP" and "Agentic" checkboxes
Ask complex questions like "Find vulnerabilities in this function" or "Analyze the call graph"
The ReAct agent will:
Propose investigation steps as a todo list
Systematically execute tools to gather information
Track progress and accumulate findings
Synthesize a comprehensive answer with evidence
Example Queries:
"What security vulnerabilities exist in this function?"
"Trace the data flow from user input to this call"
"Find all functions that modify global variable X"
"Analyze the error handling in the current function"
Using the Semantic Graph (Graph-RAG)
The Semantic Graph tab provides a knowledge graph interface for exploring binary analysis results without requiring LLM calls for every query.
Getting Started
Index the Binary:
Open the Semantic Graph tab
Click "ReIndex Binary" to extract structural relationships
Click "Semantic Analysis" to generate LLM summaries (requires API)
Progress is shown in the status bar
Explore the Graph:
List View: Browse all indexed functions with summaries and security flags
Graph View: Visualize call relationships with configurable N-hop depth
Search View: Full-text search across summaries and security annotations
Security Analysis:
Click "Security Analysis" to scan for security-relevant features