Skip to main content
skill CX Codex

ghidra-headless — Claude Code skill: reverse binaries without the GUI

This skill drives Ghidra's headless analyzer to pull functions, strings, symbols and call graphs out of a binary. Useful when there is no source to read.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add trailofbits/skills-curated --skill ghidra-headless -a claude-code
Open on GitHub

What ghidra-headless does

The skill wraps Ghidra's analyzeHeadless: it imports a binary, runs auto-analysis, decompiles functions to C and writes the results to files. Inside are wrapper scripts and a set of Java exporters. ExportAll.java returns a summary, decompilation, function list, strings and functions matching security-relevant patterns in one pass. ExportCalls.java handles the call graph, ExportSymbols.java covers imports, exports and internal symbols.

You run it through {baseDir}/scripts/ghidra-analyze.sh. Flags: -o for the output directory, -s for a post-analysis script, -p for the processor, --timeout to cap time per file, --no-analysis to skip auto-analysis when you want speed. Firmware usually needs the architecture spelled out, e.g. -p "ARM:LE:32:v7". The script looks for Ghidra in common install paths and reads GHIDRA_HOME when it sits somewhere else.

Ghidra itself and Java (OpenJDK 17+) have to be in place first. Check that before the first run, because the wrapper will not start without them. Decompiled output does not always match the original, so cross-reference it with disassembly. .NET assemblies and Java bytecode are out of scope here.

What it helps with

  • decompile a binary into C pseudocode for review
  • extract strings and symbols from an executable
  • map a call graph to follow control flow
  • triage a firmware image with no source
  • batch-analyze several binaries and compare them

Example prompts for the agent

  • analyze ./unknown_binary with ghidra-headless and show me the summary
  • decompile firmware.bin, architecture ARM:LE:32:v7
  • grep the decompiled output for strcpy and sprintf calls

How to install ghidra-headless

1Skills CLI (Vercel)

npx skills add trailofbits/skills-curated --skill ghidra-headless -a claude-code

2Manually: put the files in place

~/.claude/skills/ghidra-headless/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ghidra-headless/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about ghidra-headless

How do I install ghidra-headless in Claude?

Run npx skills add trailofbits/skills-curated --skill ghidra-headless -a claude-code. The skill file then lands at ~/.claude/skills/ghidra-headless/SKILL.md.

What does ghidra-headless do?

It runs Ghidra's headless analyzer and exports decompiled C, functions, strings, symbols and a call graph from a binary. No GUI involved.

What do I need before using it?

Ghidra installed and Java (OpenJDK 17+) available. If Ghidra lives outside the usual paths, set the GHIDRA_HOME environment variable.

Similar skills

All skills for Security →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor