Adversarial REA
Analyzes Android APK targets, extracting native JNI library symbols, hardcoded secrets and URLs, intent/IPC injection sinks, and supply-chain risks through the offensive swarm roles.
Analyzes Electron ASAR archives to map renderer-to-main IPC boundaries, preload bridge sinks, command injection and protocol abuse vectors, and sandbox escape chains.
Analyzes iOS IPA targets, including Mach-O binary headers, entitlement and keychain string artifacts, crypto weaknesses, and ASLR bypass analysis.
Analyzes Linux ELF binaries and shared objects, extracting symbols, PLT/GOT imports, GNU_STACK and GNU_RELRO mitigation posture, disassembly, and exploit chain candidates.
Analyzes macOS Mach-O targets, including header flags such as MH_PIE, fortified symbols, section layout, strings, and normalized mitigation scoring.
Analyzes WebAssembly modules for linear memory bounds issues, imported host bindings, integer overflow, and logic flaw primitives.
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 REAinspect ./app.elf, find dangerous imports, and rank exploit chains"
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: Offensive Binary Exploitation Harness
One MCP server and multi-agent swarm engine for attack surface mapping, vulnerability hunting, and exploit chain synthesis.
Drop a binary in. Extract ground-truth telemetry. Weaponize findings into multi-stage chains.
MCP Guide · Tool Catalog · Showcases
Quick start · How Adversarial REA works · What you can analyze · Swarm roles · Showcases · Exploit chains · FAQ · Documentation
npx adv-rea analyze ./target.elf --agents 8
GetAdversarial REA from Cultistsid/adversarial-rea.
All binary telemetry extraction (objdump, nm, strings, otool, file) runs locally on your machine against real on-disk binaries—never fabricated or hallucinated.
Need to tear apart a native binary, driver, mobile package, or firmware image without source code? Connect your MCP client to Adversarial REA or launch adv-rea straight from your terminal. It inspects the binary on disk, extracts real symbols, sections, classified strings, and exploit mitigations, and deploys an 8-role parallel swarm to hunt vulnerabilities and assemble multi-stage exploit chains.
Adversarial REA bridges deterministic binary inspection (objdump, nm, strings, otool, file) with multi-agent offensive workflows across ELF, Mach-O, PE, Android APK, iOS IPA, Electron ASAR, WebAssembly, and raw firmware targets. Every reported finding includes its CWE classification, trigger conditions, mitigation posture, and exploitation feasibility score.
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.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 8 binary inspection tools register over stdio JSON-RPC 2.0 and require zero external API keys.
Ask your agent
Run analyze_binary and find_dangerous_patterns on ./target.elf, disassemble any
function that references strcpy or system, and rank the most feasible RCE chain.Replace ./target.elf with any local ELF, Mach-O, PE, or firmware binary you want to tear down.
Use the terminal
Run the full 3-phase offensive pipeline (Recon → Hunt → Chain) directly from your shell:
# Full analysis pipeline — 8 parallel agents, PE target
npx adv-rea analyze ./target.exe --agents 8 --type pe --output results.json
# Deploy a targeted agent swarm with custom mission and offensive roles
npx adv-rea swarm ./target.elf \
--mission "Find heap corruption and ASLR leak primitives" \
--roles mem-corrupt,mitigation-bypass
# Vulnerability hunt — surface critical CWE patterns only
npx adv-rea hunt ./target.apk --critical-only
# Attack surface enumeration only (vectors, trust boundaries, primitives)
npx adv-rea surface ./libtarget.so --type elf-sharedTo install the adv-rea command globally for regular terminal use:
npm install --global .
adv-rea --helpRelated MCP server: RE-MCP Server
How Adversarial REA works
Your MCP client or CLI invocation calls Adversarial REA to extract ground-truth binary structure first, then layers parallel offensive reasoning over those extracted facts. Every claim is anchored to real symbol offsets, section flags, string literals, and mitigation headers.
Deterministic Telemetry (
BinaryAnalyzer) — Executesobjdump,nm,strings,otool, andfileto collect imports, exports, function symbols, section permissions, categorized strings, and platform-normalized mitigation scores.Attack Surface Enumeration (
AttackSurfaceEnumerator) — Deploys parallel tasks to map entry vectors (network listeners, file parsers, IPC handlers), trust boundaries (user↔kernel,renderer↔broker,pre-auth↔post-auth), and exploitation primitives.Parallel Swarm Hunting (
AgentSwarm+VulnHunter) — Matches 19 CWE patterns against extracted imports/strings and dispatches up to 8 concurrent specialist roles viap-limit.Exploit Chain Synthesis (
ExploitChainBuilder) — Matches discovered vulnerabilities against 6 multi-stage exploitation templates, scores stage coverage, and generates PoC skeletons.
What you can analyze
Adversarial REA auto-detects target formats by extension or accepts an explicit --type override:
Target | What Adversarial REA returns | Underlying primitives & default swarm roles |
Linux ELF ( | Dynamic/static symbols, PLT/GOT imports, |
|
macOS Mach-O ( | Mach-O header flags ( |
|
Windows PE ( | Import/export tables, dangerous Win32/CRT sinks ( |
|
Kernel Drivers ( | IOCTL dispatch surface, kernel/user trust boundaries, token-stealing & cred-overwrite chains | Roles: |
Android Packages ( | Native JNI library symbols, hardcoded secrets/URLs, intent/IPC injection sinks, supply-chain risks | Roles: |
iOS Packages ( | Mach-O binary headers, entitlement/keychain string artifacts, crypto weakness & ASLR bypass analysis | Roles: |
Electron Archives ( | Renderer-to-main IPC boundaries, preload bridge sinks, command injection & protocol abuse vectors | Roles: |
WebAssembly ( | Linear memory bounds, imported host bindings, integer overflow & logic flaw primitives | Roles: |
Embedded Firmware ( | Extracted credentials, PEM/private keys, | Roles: |
MCP Tool Catalog
Every tool exposed by src/mcp/main.js runs locally with zero network dependencies:
Tool | What it extracts | Key arguments |
| Full one-shot profile: file metadata, symbol counts, security mitigations, classified strings, and dangerous imports |
|
| Symbol table entries filtered by class ( |
|
| ASCII strings classified into 9 security categories ( |
|
| Platform-aware PIE, NX, Stack Canary, RELRO, FORTIFY, and symbol-stripping detection with 0–100 score |
|
| Full binary or single-function disassembly via |
|
| Binary sections with hex/byte sizes, file offsets, and executable vs. data split |
|
| Architecture, entry point, and format headers ( |
|
| Exact-matched dangerous imports, hardcoded secret strings, SQL fragments, and missing mitigations tagged by CWE |
|
Platform-Normalized Mitigation Scoring
check_security normalizes security scores to 100 per binary format. Because RELRO is an ELF-specific concept, it is excluded from the Mach-O denominator—so a fully hardened macOS binary scores 100/100 rather than being capped at 85.
Mitigation | Weight | macOS ( | Linux ( |
PIE |
|
|
|
NX |
| Absence of |
|
Stack Canary |
|
|
|
RELRO |
|
|
|
FORTIFY |
|
|
|
Stripped |
| Total symbol count | Total symbol count |
Agent swarm roles
Eight specialist roles execute in parallel during adv-rea analyze and adv-rea swarm:
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)
Severity | CWE | Pattern Class | Monitored Sinks & Indicators |
Critical |
| Buffer Copy Without Checking Size |
|
Critical |
| Heap-Based Buffer Overflow |
|
Critical |
| Use After Free | Post- |
Critical |
| Double Free | Duplicate deallocation in cleanup handlers |
Critical |
| Type Confusion | Unsafe casts, union discriminator mismatches, vtable corruption |
Critical |
| OS Command Injection |
|
High |
| Uncontrolled Format String |
|
High |
| Integer Overflow or Wraparound | Unchecked multiplication/addition before buffer allocation |
High |
| Improper Authentication |
|
High |
| Hardcoded Credentials |
|
High |
| Hardcoded Cryptographic Key | Embedded PEM blocks, static AES/HMAC/private key buffers |
High |
| Broken Crypto Algorithm |
|
High |
| Reversible One-Way Hash |
|
Medium |
| Path Traversal |
|
Medium |
| SQL Injection |
|
Medium |
| Weak PRNG |
|
Medium |
| Incorrect Permission Assignment |
|
Medium |
| Allocation Without Limits | Unbounded |
Medium |
| Missing Exploit Mitigations | Non-PIE executable or missing stack canary |
Showcases
1. Linux ELF: Format string leak to 5-stage ROP chain
Inspect an unstripped ELF service binary with analyze_binary, flag an uncontrolled printf (CWE-134) alongside a stack strcpy (CWE-120), and automatically assemble the CODE_EXEC_LINUX template (info_leak → memory_corruption → control_flow_hijack → rop_chain → shellcode_exec).
2. Desktop / Electron: IPC broker boundary breakout
Enumerate renderer-to-broker trust boundaries with adv-rea surface, deploy the input-inject and protocol-abuse swarm roles to audit message deserialization handlers, and score SANDBOX_ESCAPE chains.
3. Embedded Firmware: Hardcoded crypto & command injection triage
Extract crypto_material and credential_related strings from a raw .bin image via get_strings, cross-reference popen/system symbol imports with get_symbols, and isolate unauthenticated root command execution sinks.
Exploit chain templates
ExploitChainBuilder matches discovered vulnerabilities and primitives against 6 built-in exploitation templates and ranks feasible chains by stage completeness:
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('Attack Surface Score:', analysis.attackSurface.score);
console.log('Vulnerabilities:', analysis.vulnerabilities.length);
console.log('Top Exploit Chain:', analysis.exploitChains[0]);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 works out of the box using standard system utilities (objdump, nm, strings, file, and otool on macOS). BinaryAnalyzer automatically detects optional tools (rizin, radare2, ghidra_headless, readelf) when present on your PATH.
Never. Binary extraction runs strictly locally via child process execution (objdump, nm, strings, otool). When using the multi-agent swarm CLI, only compact extracted metadata summaries (symbol names, mitigation booleans, and top classified strings) are passed to your configured model endpoint.
Run the unit and live-binary integration suites with:
npm test # 61 deterministic unit tests (zero network calls)
npm run test:integration # Live binary & stdio MCP JSON-RPC integration tests
npm run test:all # Full 71-test verification 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
Self-hosted MCP server: 26 deterministic dev, security, and EVM tools.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Scan any MCP server for tool-poisoning/prompt-injection/exfiltration (OWASP LLM01/08) + Base data
Free MCP server of security & dev API tools -- supply-chain, CVE, DNS, WHOIS, OFAC, Cosmos SDK.
Related MCP Servers
- AlicenseAqualityCmaintenanceA multi-backend MCP server that exposes binary analysis capabilities from IDA Pro and Ghidra, allowing LLMs to directly drive reverse-engineering tools via natural language.11176Apache 2.0
- FlicenseNot gradedqualityDmaintenanceA local, privacy-first MCP server that orchestrates Ghidra, Binary Ninja, x64dbg, and system tools to provide AI assistants with powerful binary analysis capabilities.-
- AlicenseAqualityAmaintenanceMCP server integrating Rizin reverse engineering, RzGhidra decompiler, and capa for binary analysis, enabling LLMs to open binaries, identify capabilities, extract function addresses, and decompile to C pseudocode.104MIT
- 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