/iothackbot:bn-headlessfrom iothackbot
Headless Binary Ninja CLI for decompiling, disassembling, and reverse-engineering ELF/PE/Mach-O/raw binaries across x86, ARM, MIPS, RISC-V, and more. Use for pseudo-C/HLIL/MLIL decompilation, xrefs, callees, string analysis, and vulnerability hunting without the GUI.
Ships in iothackbot. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
You are helping the user reverse-engineer compiled binaries from the command line using Binary Ninja's headless API, with no GUI involved. This covers firmware executables, shared libraries, and any ELF/PE/Mach-O or raw binary across any architecture Binary Ninja lifts.
bnhl is a self-contained CLI wrapper (scripts/bnhl.py) around the Binary Ninja Python API. It loads any file on disk, runs full analysis, caches the result, and prints readable output to stdout. It is the right tool when you want to:
For reading compiled code, bnhl is far more productive than raw objdump, gdb, or radare2 because it gives you readable decompilation and a resolved call graph.
Use bnhl (CLI) for automated analysis, scripting, batch processing, headless/server environments, and any self-directed decompilation. Use the Binary Ninja GUI (or its MCP server) only for interactive, manual exploration when the user explicitly asks for it, because the GUI only sees the one binary an operator has loaded by hand.
sys.path, so no PYTHONPATH setup is needed.bnhl autodetects the API in these locations, in order:
$BN_PYTHON (your install's python directory), if set$BN_INSTALL_DIR/python, if BN_INSTALL_DIR is set~/binaryninja/python/opt/binaryninja/python/Applications/Binary Ninja.app/Contents/Resources/python (macOS)If your install is elsewhere, set the env var once:
export BN_PYTHON="/path/to/binaryninja/python"
Invoke through the bnhl shim in this repo's bin/ (add bin/ to your PATH):
bnhl <command> <bin> [args]
If bnhl is not on your PATH, call the script directly:
python3 skills/bn-headless/scripts/bnhl.py <command> <bin> [args]
| Command | What it does |
|---|---|
info <bin> | arch, platform, entry, function/string/import counts, sections |
functions <bin> [--filter REGEX] [--limit N] | list functions (addr, size, name) |
decompile <bin> <func|0xADDR> [more...] [--il pseudoc|hlil|mlil|disasm] | decompile one or more functions (default: pseudo-C) |
at <bin> <0xADDR> | decompile whichever function contains an address |
xrefs <bin> <func|0xADDR> | callers + code references to the target |
callees <bin> <func|0xADDR> | functions the target calls |
strings <bin> [--filter REGEX] [--min N] | dump strings |
grepstr <bin> <REGEX> | strings matching REGEX plus the functions that reference each |
imports <bin> / exports <bin> / sections <bin> | symbol / section inventory |
func selector: an exact symbol name, a unique substring of a name, or a hex address (0x...). Most commands also accept --raw for machine-readable JSON where supported.
bnhl info ./libtarget.so # orient: arch, counts, sections
bnhl grepstr ./libtarget.so 'password|secret|/dev' # interesting constants + their handlers
bnhl functions ./libtarget.so --filter -i auth # find the auth functions
bnhl decompile ./libtarget.so handle_cmd # read the pseudo-C
bnhl xrefs ./libtarget.so is_privileged # trace an authz gate's callers
bnhl decompile ./libtarget.so 0x823b1 # or decompile by address
system() / popen() / exec*() with attacker-influenced stringsstrcpy, sprintf, memcpy with unchecked lengths)printf-family with a non-constant format argument)The first analysis of a binary is cached to a .bndb under ~/.cache/bnhl/ (override with $BNHL_CACHE), keyed by path + mtime + size. Repeat calls on the same binary are near-instant. A small .so analyzes in under a second cold; a few-hundred-KB daemon with ~1000 functions takes several seconds cold and under a second warm. Multi-MB binaries pay a proportional cost on the first call only.
.bndb needs a one-time internal re-analysis to materialize the linear view; the tool does this automatically, so you may see a brief pause on the first decompile after a cold analysis. HLIL/MLIL/disassembly come straight from cache with no re-analysis.disasm (or cross-check with objdump) before reporting. Decompiled HLIL can rotate loops and rebase expressions, so a claim that hinges on exact control flow should be confirmed against the disassembly.bnhl is the code-reading stage after you have a binary in hand:
ffind to identify file types and extract filesystems from a firmware image, then point bnhl at the interesting ELF binaries (web daemons, update handlers, auth helpers) in the extracted rootfs.chipsec to inventory EFI executables from a BIOS dump, then decompile individual modules with bnhl.iotnet, nmap, onvifscan, or telnetshell.jadx (Android app decompilation) with the matching device-side logic you read in bnhl.IMPORTANT: Only reverse-engineer binaries you own or are authorized to analyze.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub brownfinesecurity/iothackbot --plugin iothackbot14 skills in this plugin
/apktoolAndroid APK unpacking and resource extraction tool for reverse engineering. Use when you need to decode APK files, extract resources, examine AndroidManifest.xml, analyze smali code, or repackage modified APKs./chipsecStatic analysis of UEFI/BIOS firmware dumps using Intel's chipsec framework. Decode firmware structure, detect known malware and rootkits (LoJax, ThinkPwn, HackingTeam, MosaicRegressor), generate EFI executable inventories with hashes, extract NVRAM variables, and parse SPI flash descriptors. Use when analyzing firmware .bin/.rom/.fd/.cap files offline without requiring hardware access./ffindAdvanced file finder with type detection and filesystem extraction for analyzing firmware and extracting embedded filesystems. Use when you need to analyze firmware files, identify file types, or extract ext2/3/4 or F2FS filesystems.Other plugins' skills for the same job