Decompilers & Static AnalysisCLI Flag: --provider ghidra

REA vs NSA Ghidra• AI Reverse Engineering Guide

NSA's open-source multi-architecture decompiler suite with headless Java bridge.

AI Overview Direct AnswerREA vs NSA Ghidra Integration & AI Workflow

In AI-assisted reverse engineering with REA (rea-agents), NSA Ghidra is bridged via --provider ghidra to allow Claude Code, Cursor, and Windsurf to extract symbol graphs, trace control flow, and decompile binaries headlessly via Model Context Protocol.

Synergy & ComparisonAutonomous AI Acceleration

How REA Enhances NSA Ghidra with Autonomous AI Agents

Manual NSA Ghidra Workflow

Traditional reverse engineering in NSA Ghidra requires manual CFG graph navigation, manual symbol naming, and isolated local scripts without LLM code intelligence.

REA + NSA Ghidra Agentic Pipeline

AI coding agents (Claude Code, Cursor) invoke NSA Ghidra headlessly via REA's Model Context Protocol (MCP), generating clean-room specifications and reconstructive code in seconds.

Open SourceOpen Source (Apache 2.0)
100% Free
Official Download & Website ↗

Multi-Platform Installation Recipes

macOS (Homebrew)
brew install --cask ghidra
Windows (Winget)
winget install NationalSecurityAgency.Ghidra
Linux (APT Prerequisites)
sudo apt install openjdk-21-jdk -y
Connect to AI Agents Once Installed
Verify REA detects this tool and enables Claude / Cursor MCP bridges:
rea doctor --provider ghidra

Supported Platforms & Targets

Host Operating Systems:
macOSLinuxWindows
Target Architectures:
x86 / x86_64ARM / AArch64MIPSPowerPC16-bit DOS

Tool Overview & Role

NSA Ghidra is an open-source reverse engineering framework built on the Sleigh processor modeling language. It lifts machine instructions into P-Code (a register transfer intermediate language), constructs High-P-Code representations in Static Single Assignment (SSA) form, performs control-flow graph simplification, and emits structured C pseudocode. REA integrates with Ghidra via ReaGhidraBridge.java executed by Ghidra's headless launcher (analyzeHeadless), binding directly to FlatProgramAPI and DecompInterface to compute xrefs, extract symbol inventories, and recover type signatures.

REA Bridge Mechanism

Executed via Ghidra's analyzeHeadless launcher with ReaGhidraBridge.java. Drives FlatProgramAPI and DecompInterface directly. Includes support for 16-bit DOS PC-98 games (ghidra-dos), NativeAOT binaries, and MIPS. Configurable memory allocation and deadline via REA_GHIDRA_STARTUP_TIMEOUT_MS.

Key Capabilities

High-fidelity C pseudocode decompilation
Segmented 16-bit real mode DOS support
MIPS, ARM, x86, and NativeAOT binary analysis
Cross-reference (xrefs) and call-tree calculation

CLI Usage Examples

Execute direct terminal analysis with --provider ghidra:

rea ghidra example
rea function ./program main --provider ghidra --json
rea decompile ./program 0x1000 --provider ghidra --json