ghidra-rpc  by cellebrite-labs

Agentic reverse engineering for LLMs

Created 2 months ago
263 stars

Top 96.7% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

<2-3 sentences summarising what the project addresses and solves, the target audience, and the benefit.> ghidra-rpc provides an agentic skill enabling Large Language Models (LLMs) to autonomously perform complex reverse engineering tasks within Ghidra. It targets AI coding assistants and researchers, offering a powerful way to decompile, navigate, annotate, and patch binaries without direct human intervention, significantly accelerating RE workflows.

How It Works

ghidra-rpc operates by running Ghidra as a persistent background daemon, utilizing PyGhidra to interface with the Ghidra JVM. It exposes Ghidra's extensive reverse engineering capabilities through a command-line interface that communicates with the daemon via JSON over Unix sockets. This architecture allows AI agents to issue commands, receive structured JSON outputs, and maintain Ghidra's analysis state across multiple operations, avoiding redundant analysis and ensuring all modifications (renames, annotations, type definitions) are persistently saved to the Ghidra project.

Quick Start & Requirements

  • Installation: Install ghidra-rpc using uv tool install /path/to/ghidra-rpc.
  • Prerequisites: Ghidra 11+, Python 3.11+, Java 17+.
  • Usage: Start the daemon with ghidra-rpc start --project <path>, then load binaries and execute commands (e.g., ghidra-rpc decompile <binary> <function>).
  • Documentation: Refer to docs/install.md and docs/quickstart.md for detailed setup and walkthroughs.

Highlighted Details

  • Enables LLMs to autonomously perform complex reverse engineering tasks: decompile functions to pseudo-C, disassemble, inspect control flow graphs (CFG) and P-code.
  • Supports deep navigation through call graphs, searching strings/byte patterns, finding cross-references, and annotating code (renaming, comments, type definitions).
  • Includes advanced capabilities for patching binaries via assembly (SLEIGH) or raw bytes, and diffing binary versions using BSim for change tracking.
  • All modifications are saved directly to the Ghidra project, ensuring persistence and visibility within the Ghidra GUI.

Maintenance & Community

No specific details on contributors, sponsorships, or community links (Discord/Slack) are present in the provided README.

Licensing & Compatibility

  • License: MIT.
  • Compatibility: Permissive MIT license generally allows for commercial use and integration into closed-source projects.

Limitations & Caveats

The reliance on a persistent daemon and Unix sockets may introduce operational complexities in highly dynamic or sandboxed environments. Detailed information regarding daemon crash recovery or advanced error handling is not explicitly provided in the README.

Health Check
Last Commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.