RUST · BINARY ANALYSIS & SECURITY

rea-rs — Native Rust Binary Triage, Disassembly & Reverse Engineering for AI Agents

rea-rs is a fast, memory-safe Rust binary analysis toolkit and MCP server that equips AI coding assistants to inspect ELF, PE, and Mach-O executables. It performs control-flow graph recovery, string and symbol extraction, entropy packing detection, and multi-architecture disassembly in milliseconds.

$ cargo install rea-rs
GitHub ↗

Architected for Speed & Reliability

Engineered from the ground up in memory-safe Rust with zero unnecessary dependencies.

⚡

Sub-5ms Execution Startup

Replaces Node.js with native machine code. Immediate startup and triage for command-line workflows and agent loops without V8 compilation lag.

🔬

Tri-Format Binary Parser

Built-in parsing for Mach-O (Apple Silicon / Intel), ELF (Linux / Android), and PE (Windows) headers, sections, segment maps, imports, and exports.

🕸️

Control Flow Graph (CFG)

Extracts basic blocks, function boundaries, jump tables, and call graph hierarchies into structured JSON or visual ASCII graphs for quick analysis.

🤖

Native MCP Server for Agents

Direct Model Context Protocol integration allows Claude Code, Cursor, Codex, and Windsurf to inspect disassembly and binary structures on the fly.

🛡️

Entropy & Security Auditing

Computes Shannon entropy across binary sections to spot packed payloads, encryption blocks, missing stack canaries, and DEP/ASLR vulnerabilities.

📦

Zero External Dependencies

Self-contained static executable with zero required system shared libraries or dynamic interpreter dependencies.

Get Started in Seconds

Install via Cargo and run immediately on macOS, Linux, or Windows.

Terminal
# Install from source
cargo install --git https://github.com/bhubbard/rea-rs

# Analyze binary metadata, headers, and security mitigations
rea analyze ./my_target_binary

# Extract Control Flow Graph for a specific symbol
rea cfg --func main ./my_target_binary

# Run native MCP server for AI pair programmers
rea mcp

Engine Architecture

Streamlined execution pipeline with deterministic memory isolation and zero runtime overhead.

Pipeline Flow
┌───────────────────────────────────────────────────────────┐
│               Security Analyst / AI Coding Assistant      │
└─────────────────────────────┬─────────────────────────────┘
                              │ Stdio / CLI
┌─────────────────────────────▼─────────────────────────────┐
│                        REA-RS Core                        │
│  ┌─────────────────┐   ┌──────────────────┐  ┌──────────┐ │
│  │ Mach-O / ELF /PE│   │ Disassembly Engine│ │ MCP Tool │ │
│  │ Section Parser  │   │  & CFG Generator │  │ Handler  │ │
│  └─────────────────┘   └──────────────────┘  └──────────┘ │
└─────────────────────────────┬─────────────────────────────┘
                              │ Zero Allocation
┌─────────────────────────────▼─────────────────────────────┐
│                 Target Executable / Binary Map            │
└───────────────────────────────────────────────────────────┘