adversarial-rea
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@adversarial-reaanalyze ./target.elf and trace calls, but don't claim vulnerabilities"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Adversarial REA: Evidence-First Binary Triage
Local native telemetry, bounded MCP tools, and unverified review candidates.
Start with what the binary says. Mark everything else as a question.
MCP Guide · Tool Catalog · Showcases
Quick start · How Adversarial REA works · What you can analyze · Swarm roles · Showcases · Exploit chains · FAQ · Documentation
node bin/cli.js analyze ./target.elf --no-chain
GetAdversarial REA from Cultistsid/adversarial-rea-mcp.
Native telemetry extraction runs locally. Imports, strings, call sites, gadget candidates, and generated review candidates are not verified vulnerabilities. Native source-to-sink flow and observed native triggers are not produced by this release; chains remain blocked without them. Separately, synthetic .flow.json fixtures can be correlated and replayed entirely in memory. Fixture observations cannot validate a native binary.
Need a first-pass review of a native binary without source code? Connect your MCP client to Adversarial REA or use adv-rea from a terminal. It extracts bounded symbols, strings, sections, and mitigation signals from local files, then offers follow-up questions rather than claiming that a risky import proves a bug.
Use it to narrow manual review: identify suspicious imports, inspect observed call instructions, and distinguish unknown mitigations from observed absences. Native ELF and Mach-O extraction use host tools; PE headers and mitigation flags can be previewed without host PE tools. Packages, archives, WebAssembly, firmware images, text, and JavaScript receive bounded metadata inspection, not deep code or exploit analysis.
Quick start
Adversarial REA requires Node.js >= 22.0.0, npm, and standard host binary utilities (objdump, nm, strings, file; plus otool on macOS).
git clone https://github.com/Cultistsid/adversarial-rea-mcp.git
cd adversarial-rea
npm installSet up your MCP client
Add adversarial-rea to your MCP client configuration (mcp.json):
{
"mcpServers": {
"adversarial-rea": {
"command": "node",
"args": ["/absolute/path/to/adversarial-rea/src/mcp/main.js"],
"env": {}
}
}
}Restart your MCP client after saving. All 12 inspection tools register over stdio JSON-RPC 2.0 and require zero external API keys.
Ask your agent
Run analyze_binary and trace_calls on ./target.elf. Compare import observations
with actual call instructions; do not claim an input flow or bug from either.Replace ./target.elf with a native ELF or Mach-O file. For a script or container, use inspect_carrier instead. PE code extraction depends on your host objdump/nm build.
Use the terminal
Run local inspection without a key; the separate candidate-triage commands use a remote reasoning service and require its API key.
# Offline metadata for APK/IPA/JAR/ASAR, Wasm, JS/text, PE, firmware, or .app bundles
node bin/cli.js inspect ./package.apk --limit 50
# Reproduce a declarative fixture flow in memory, not a native program
node bin/cli.js inspect test/fixtures/flow-direct.flow.json --flow-fixture
# Offline call sites on native files, or byte-verified gadget candidates on ELF64 x86_64
node bin/cli.js inspect ./target.elf --calls --gadgets
# Candidate analysis on a native ELF file
node bin/cli.js analyze ./target.elf --agents 8 --trace-calls --no-chain --output results.json
# Deploy a targeted agent swarm with custom mission and offensive roles
node bin/cli.js swarm ./target.elf \
--mission "Review possible heap corruption and address leaks" \
--roles mem-corrupt,mitigation-bypass
# Triage selected CWE patterns (candidate findings only)
node bin/cli.js hunt ./target.elf --patterns UNCHECKED_BOUNDS,FORMAT_STRING --critical-only
# Attack surface enumeration only (vectors, trust boundaries, primitives)
node bin/cli.js surface ./libtarget.so --type elfTo install the adv-rea command globally for regular terminal use:
npm install --global .
adv-rea --helpRelated MCP server: BinSight
How Adversarial REA works
The native analyzer reads a regular file (up to 64 MiB), identifies its magic bytes, and invokes local tools with argument arrays, timeouts, and output limits. The separate carrier inspector reads bounded headers and indexes without unpacking or executing content. A separate fixture evaluator follows explicit single-argument steps and repeats a deterministic in-memory sink observation; it does not run binaries. Extraction failures remain visible; unknown mitigation status is not converted to "off." Optional reasoning only receives a bounded structural summary, never extracted secret-like string values by default.
Local telemetry (
BinaryAnalyzer,CarrierInspector) — Native metadata or metadata-only previews for other file formats; carrier previews do not imply code parsing.Instruction evidence (
CallSiteExtractor,GadgetCandidateFinder) — Opt-in direct call instructions with target hashes and versioned evidence IDs; selected ELF64 x86_64 gadget candidates are checked against executable file bytes. Neither proves reachable input flow or exploitability.Review hypotheses (
AttackSurfaceEnumerator,VulnHunter) — Suggests possible vectors and CWE follow-up checks. Triage scores and remote answers remain unverified.Evidence gate (
ExploitChainBuilder) — Requires independently verified native flow, stage references, and an observed native trigger trace. Those native flow/trigger producers are not implemented; fixture-only records are excluded, so ordinary analyses return no validated exploit chain.
What you can analyze
The file signature decides the native format; --type only asserts an expected native format. Use inspect_carrier or adv-rea inspect for metadata-only carriers; the native analyze_binary tool still rejects them.
Input | Status | What works |
ELF native file | Native triage where | Bounded metadata, disassembly, RELRO signals, opt-in call sites, and byte-verified gadget candidates only for ELF64 x86_64 |
Mach-O native file | Native triage on macOS | Bounded metadata and mitigation signals; opt-in direct call sites select the host architecture by default (including |
PE native file (including drivers) | Experimental |
|
Text / JavaScript | Metadata-only | Byte and line counts; no AST or dependency analysis |
| Metadata-only |
|
APK / IPA / JAR / ZIP | Metadata-only | Bounded ZIP central-directory listing cross-checked against local names/methods/extents, suspicious path/symlink flags and declared expansion size; no unpacking or manifest analysis; ZIP64/multi-disk unsupported |
ASAR archives | Metadata-only | Bounded header file index and declared file offsets; no script execution, AST, or IPC analysis |
WebAssembly | Metadata-only | Version 1 section offsets/sizes; no instruction decoder |
Raw | Metadata-only | First ELF magic offset and up to 16 structurally plausible ELF header candidates; no filesystem extraction or executable verification |
Declarative | Fixture-only | One explicit source, one sink, literal/copy/allowlist steps, and two deterministic in-memory replays; no native flow or vulnerability verdict |
Large files (over 64 MiB) and non-regular files are rejected; flow fixtures have a separate 16 KiB / 32-step limit. Each native subprocess has a 15-second timeout and a 2 MiB output cap; truncated or unavailable evidence is not treated as proof of safety. For an MCP client that should see only one directory, set ADV_REA_ALLOWED_ROOTS=/absolute/path/to/targets in its server environment. Without it, any readable local regular file can be submitted for inspection.
MCP Tool Catalog
Every tool exposed by src/mcp/main.js runs locally with zero network dependencies:
Tool | What it extracts | Key arguments |
| File identity (SHA-256), counts, mitigation signals, redacted string samples, import observations |
|
| Up to 100 symbols, optionally filtered by literal substring |
|
| Up to 100 categorized strings, sensitive categories redacted by default |
|
| Known/unknown mitigation signals and a score only if all required checks succeeded |
|
| Up to 500 disassembly lines (20 KiB returned) |
|
| Bounded native section listing |
|
| Bounded native headers |
|
| Unverified import/string observations and observed missing mitigation signals |
|
| Decoded direct native calls with target hash and provider version; input flow unknown |
|
| ELF64 x86_64 gadget candidates verified against executable file bytes; runtime addresses unknown |
|
| Bounded metadata for ZIP/APK/IPA/JAR/ASAR, Wasm, JS/text, PE, firmware, and |
|
| Explicit fixture dependency path and repeatable in-memory sink reachability; excluded from native evidence gate |
|
Responses are capped at 64 KiB. get_strings intentionally requires reveal_sensitive: true to show potentially sensitive string categories; handle that output locally.
Platform-Normalized Mitigation Scoring
check_security reports null when any required check is unknown. Where checks succeed, RELRO is ELF-only and excluded from the Mach-O denominator.
Mitigation | Weight | macOS ( | Linux ( |
PIE |
|
|
|
NX |
| Absence of | Stack header without executable flag |
Stack Canary |
|
|
|
RELRO |
|
|
|
FORTIFY |
|
|
|
Stripped | No score weight |
|
|
Agent swarm roles
Eight specialist roles are available for adv-rea swarm; adv-rea analyze selects triage patterns rather than deploying all eight. A role's output is a review hypothesis, not proof.
Role ID | Specialist Name | Offensive Focus Areas |
| Memory Corruption Hunter | Stack/heap buffer overflows, use-after-free, double-free, type confusion, integer wraparound |
| Logic Flaw Analyst | Authentication bypass, race conditions, TOCTOU, state machine abuse |
| Cryptographic Weakness Finder | Weak ciphers ( |
| Input Injection Specialist | OS command injection, uncontrolled format strings, SQL injection, unsafe deserialization |
| Mitigation Bypass Expert | ASLR info leaks, DEP/NX bypass via ROP/JOP, CFG/CET evasion, stack canary leaks |
| Privilege Escalation Hunter | Kernel/driver IOCTL flaws, setuid abuse, DLL/dylib hijacking, service misconfigurations |
| Protocol Abuse Analyst | Protocol confusion, request smuggling, state desynchronization, parser differentials |
| Supply Chain Analyzer | Vulnerable dependencies, build tampering, signature verification bypass, update hijacking |
Vulnerability Patterns (CWE Coverage)
Area | Pattern IDs | What an indicator means |
Memory |
| A possible code path to inspect; no reachability or memory violation has been established |
Logic |
| Names and hypotheses to verify against control flow |
Injection |
| Sink presence alone does not establish attacker control |
Crypto |
| Review flags only; extracted secrets are withheld from prompts |
The --critical-only CLI flag filters the pattern's triage priority, not a verified finding's severity.
Showcases
The visual panels are illustrative, not generated results. No addresses, chain scores, or exploit stages in the artwork correspond to a validated fixture.
Native ELF import triage (available)
Run analyze_binary and find_dangerous_patterns to identify printf/strcpy imports for review, then trace_calls to locate decoded calls. Verify the controlled data flow and trigger separately; even an observed call does not prove a bug.
Electron IPC boundary mapping (planned)
inspect_carrier lists bounded ASAR file entries. IPC brokers, renderer messages, and sandbox boundaries still require dedicated parsing and observed evidence.
Firmware header preview
inspect_carrier reports ELF magic markers and limited plausible header fields in a raw image. Even a plausible header does not prove an embedded executable or extract firmware; analyze independently extracted native files separately.
Exploit chain templates
Six chain definitions exist for future evidence-backed work. Only four have draft scaffold templates; PRIV_ESC_WINDOWS and AUTH_BYPASS are explicitly unsupported. Local call-site and constrained gadget evidence are available, but no implemented producer establishes end-to-end native input flow or an observed native trigger. Synthetic fixture replay does not satisfy that requirement. The generator returns a blocked result when evidence or required facts are missing; it does not export a runnable exploit.
Template | Stage Progression | Target Objective |
|
| Arbitrary code execution on Linux (ASLR + NX bypass) |
|
| Arbitrary code execution on Windows (ASLR + DEP + CFG bypass) |
|
| Local privilege escalation to |
|
| Local privilege escalation to |
|
| Multi-process sandbox escape via IPC broker |
|
| Pre-auth administrative session takeover |
import { AdversarialREA } from 'adversarial-rea';
const rea = new AdversarialREA({
maxAgents: 8,
aggressiveMode: true,
parallelAnalysis: true,
timeout: 300000
});
const analysis = await rea.analyzeTarget('./target.elf', {
type: 'elf',
buildChains: true
});
console.log('Candidate triage score:', analysis.attackSurface.candidate_score);
console.log('Review candidates:', analysis.candidates.length);
console.log('Verified vulnerabilities:', analysis.vulnerabilities.length);FAQ
Any client or agent runtime that supports local MCP servers over stdio JSON-RPC 2.0. Point the client at node /absolute/path/to/adversarial-rea/src/mcp/main.js in mcp.json.
No. The MCP server (src/mcp/main.js) executes local binary inspection tools (objdump, nm, strings, otool, file) directly on disk and requires zero API keys or network access. API credentials are only used when running standalone multi-agent LLM swarms via the adv-rea CLI or AdversarialREA SDK class.
No. Core binary extraction needs compatible host utilities (objdump, nm, strings, file, and otool on macOS). The analyzer detects rizin and radare2 but does not use them for deep decompilation.
The binary stays local. CLI reasoning sends bounded metadata (format, sizes, import names, mitigation signals, and string category counts) to the configured endpoint; no extracted string values are included by default. A user can explicitly request raw sensitive strings through the local MCP get_strings tool with reveal_sensitive: true.
Run the unit and live-binary integration suites with:
npm test # deterministic unit tests (zero network calls)
npm run test:integration # Live binary & stdio MCP JSON-RPC integration tests
npm run test:all # Full suiteDocumentation
MCP Server Usage Guide: registration, tool parameters, example prompts, and extraction-to-findings workflow.
Agent Skill Specification: offensive methodology, surface scoring formula, and JSON reporting schema.
MCP Server Manifest: machine-readable capability and tool declarations.
Star history
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Hunt zero-days by talking to binaries. 40+ tools. Hosted, OAuth + SSO, invite: hi@byteray.ai
Signed sandbox verdicts on any artifact, plus an agent marketplace. No key, no signup, no payment.
Generate SBOMs, scan vulnerabilities, and analyze dependencies from local projects or Git repos.
Zero-config MCP security scanner for AI-generated apps. 25K+ vulnerability patterns.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to locally analyze and reverse engineer binaries through a compact 12-tool MCP interface for triage, function discovery, disassembly/decompilation, cross-references, strings/imports, call graphs, memory reads, annotations, and binary diffs.1MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents and CLI users to statically inspect any binary offline — identifying file type, architecture, imports, packing, embedded content and signatures — and to diff two files to see exactly what changed. It works on ELF, PE and Mach-O executables, firmware dumps and calibration files without ever running them, reporting observations and inferences with file offsets as evidence.76 npm1MIT
- AlicenseNot gradedqualityAmaintenanceEnables agents to reverse engineer native binaries, JavaScript/Electron applications, .NET assemblies, web captures, EVM bytecode, and process behavior through a provider-neutral MCP interface. Every result is an evidence envelope stating what was observed, derived, unexamined, or unprovable, with all capabilities gated by a deterministic fail-closed policy engine.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI agents (and a matching CLI) to inspect native binaries, JavaScript/Electron apps, .NET assemblies, Go/Rust/WASM artifacts, EVM bytecode, SQLite databases, recorded crashes, and websites without source code, explaining how features work and returning the evidence and limitations behind each conclusion. Analysis runs locally, using optional Hopper, Ghidra, or IDA providers for native targets.404,838 npmMIT