Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

radare2

$ r2 Official Med Risk
radareorg · Security & Secrets · LGPL-3.0 · macos / linux / windows

radare2 (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.

FCRS-1.0 Score
74 /100
Usable w/ Caveats
Medium Confidence
Zero-Friction Install
brew install radare2
CLI vs MCP Decision CLI Preferred vs MCP

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

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
✓ Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 18 / 25

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 -c headless mode and j-suffixed JSON commands
  • Interactive REPL by default when -q is omitted
Trust & Safety 18 / 25

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
  • -w patches target binaries in place
Setup & Portability 12 / 15

Available via brew, distro repos, and Windows releases, though C build/plugin setup varies across distros.

  • Prebuilt packages across macOS, Linux, and Windows
Utility & Efficiency 12 / 15

Powerful multi-architecture binary inspection and disassembly in a single fast C tool.

  • Supports ELF, PE, Mach-O, firmware, and many CPU ISAs
Maintenance & Lineage 8 / 10

Actively maintained by radareorg (radareorg/radare2) under LGPL-3.0.

  • Active radareorg/radare2 upstream
Docs & Verifiability 6 / 10

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

Auth Modes
No Auth
Credential Storage

No authentication credentials; stores project metadata and analysis caches locally when explicitly saved.

Side Effects
Read-Only Local Write
Cost & Quotas

LGPL-3.0 open-source CLI; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

Dump binary headers and security flags as JSON
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.

Analyze and list functions in JSON
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

Patch bytes at a specific virtual address
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 -c combined with j-suffixed JSON commands (ij, aflj, pdfj) makes batch analysis scriptable.
  • + Read-only by default unless -w is explicitly supplied.

Caveats & Pitfalls

  • ! Omitting -q drops 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.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI