binary-re:static-analysis

Analyze binary structure and decompile functions with radare2 and Ghidra headless.

90|6|Updated Oct 15, 2025
One-click install
npx skills add https://github.com/2389-research/claude-plugins --skill binary-re-static-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: binary-re:static-analysis
Source: https://github.com/2389-research/claude-plugins/tree/main/binary-re/skills/static-analysis
Command: npx skills add https://github.com/2389-research/claude-plugins --skill binary-re-static-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables defensive and audit-grade understanding of binary code without executing it. It focuses on mapping binary structure, enumerating functions, tracking cross-references, and producing decompiled views and control-flow graphs to guide verification and vulnerability assessment.

Core Features & Use Cases

  • Stage 1: Light Analysis using radare2 to enumerate functions, extract strings, resolve imports, and identify cross-references for rapid triage.
  • Stage 2: Deep Analysis with r2ghidra or Ghidra headless to decompile target functions, generate CFGs, and recover data-flow for critical routines.
  • Use Case: You have a proprietary binary with unclear behavior; use this Skill to identify key functions, call graphs, and potential data flows to form hypotheses before dynamic testing.

Quick Start

  1. Launch quick static analysis on a binary: run r2 with controlled settings, e.g., r2 -q0 -e scr.color=false -e anal.timeout=120 -e anal.maxsize=67108864 binary
  2. Enumerate functions: aflj
  3. Inspect references and cross-references: axtj @sym.imp.open or axtj @sym.main
  4. If needed, decompile a function: pdgj @sym.main

Frequently Asked Questions about binary-re:static-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform static binary analysis to enumerate functions and resolve cross-references?

Static binary analysis maps a binary's structure without execution by using radare2 to enumerate functions, extract strings, and resolve cross-references. You can then use commands like `aflj` to list functions and `axtj` to inspect references for rapid triage.

Can I decompile code and generate control-flow graphs with radare2 and Ghidra headless?

Yes, you can decompile code and generate control-flow graphs by leveraging r2ghidra or Ghidra headless. This allows you to recover data-flow and decompile target routines, producing detailed decompiled views for critical functions using the `pdgj` command.

Does r2ghidra work with radare2 for deep binary investigations?

Yes, r2ghidra integrates directly with radare2 to enable deep binary investigations. It extends radare2's light analysis capabilities by allowing you to decompile functions and recover data-flow logic without leaving the radare2 environment.

What is the best way to triage a proprietary binary with unclear behavior?

To triage a proprietary binary with unclear behavior, start with light static analysis using radare2 to identify key functions and call graphs. This approach helps form hypotheses about potential data flows before committing to dynamic testing.

Do I need Ghidra headless to run r2ghidra for decompilation?

No, Ghidra headless is an optional dependency for decompilation. You can use r2ghidra independently within radare2 to decompile target functions and generate control-flow graphs, while Ghidra headless remains available for deeper analysis if needed.

What are the limitations of static analysis when mapping binary structure?

Static analysis maps binary structure without executing the code, meaning it cannot observe runtime behavior or dynamically resolved dependencies. It is designed for forming hypotheses and verifying logic through control-flow graphs, but must be followed by dynamic testing for complete behavioral verification.