radare2
$ r2 Official Med Riskradare2 (r2) is a comprehensive reverse-engineering suite for disassembling, inspecting imports/sections, and patching ELF, PE, Mach-O, and firmware binaries. While interactive by default, -q -c runs commands headlessly and most inspection commands offer a j suffix (such as ij, aflj, izj) for JSON output.
brew install radare2 r2 -q -c runs targeted JSON disassembly and binary-info queries (ij, aflj) in one shot without keeping stateful interactive sessions open.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Headless -q -c execution with pervasive j-suffixed JSON commands (ij, aflj), though invoking r2 without -q opens an interactive shell and terse mnemonic commands are easy to mistype.
-q -cheadless mode andj-suffixed JSON commands- Interactive REPL by default when
-qis omitted
Opens binaries read-only by default unless -w is passed, though parsing malformed untrusted binaries in C carries parser-bug surface.
- Read-only default without
-w -wpatches target binaries in place
Available via brew, distro repos, and Windows releases, though C build/plugin setup varies across distros.
- Prebuilt packages across macOS, Linux, and Windows
Powerful multi-architecture binary inspection and disassembly in a single fast C tool.
- Supports ELF, PE, Mach-O, firmware, and many CPU ISAs
Actively maintained by radareorg (radareorg/radare2) under LGPL-3.0.
- Active
radareorg/radare2upstream
Vast command vocabulary (? in-shell help) and Radare2 Book, but steep learning curve for terse 2–4 letter commands.
- Documented in book.rada.re, though terse syntax hurts discoverability
Security, Auth & Guardrails
No authentication credentials; stores project metadata and analysis caches locally when explicitly saved.
LGPL-3.0 open-source CLI; completely free.
# radare2 (r2) Agent Rules - Always pass `-q -c "..."` so `r2` never drops into an interactive prompt. - Prefer `j`-suffixed commands (`ij`, `iij`, `aflj`, `izj`) and never pass `-w` unless binary patching is explicitly requested.
Agent-Ready Command Recipes
Safe Read-Only Queries
r2 -q -c "ij" ./target.bin
Opens ./target.bin read-only, runs ij for architecture, canary, NX, and PIE metadata in JSON, and exits via -q.
r2 -A -q -c "aflj" ./target.bin
Runs automatic analysis (-A) and prints the detected function list as JSON (aflj) before quitting.
Controlled Writes & Previews
r2 -w -q -c "s 0x401000; wx 9090" ./target.bin
Opens ./target.bin in write mode (-w), seeks to 0x401000, and writes two NOP bytes (9090).
Strengths for Agents
- +
-q -ccombined withj-suffixed JSON commands (ij,aflj,pdfj) makes batch analysis scriptable. - + Read-only by default unless
-wis explicitly supplied.
Caveats & Pitfalls
- ! Omitting
-qdrops into an interactive REPL that hangs non-TTY agent shells. - ! Cryptic 2–4 character internal commands (
afl,pdf,wx) are prone to LLM syntax errors.