antirea.defense_mcp
Integrates NVIDIA Auto Ontology for semantic scope analysis, helping identify secret or boundary functions and recommend safe virtualization scope for protection.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
English · 简体中文 · 繁體中文 · 日本語 · 한국어 · Türkçe · Русский · Tiếng Việt · ไทย · Deutsch · Español · Français · Українська · Polski · Português (Brasil) · العربية · فارسی · Bahasa Indonesia · Italiano · Ελληνικά · മലയാളം
ANTI-REA
One MCP for protecting binaries, applications, and core logic against REA.
Have a core feature you need to protect? Keep it from being analyzed or cloned, down to the binary level.
Reverse-engineering tools like REA let an agent inspect a binary when you ask "Understand how this feature works in that app and build a copy for my project."
Agentic attack? Meet agentic defense — defense that grows stronger over time. The ultimate goal of ANTI-REA is to block everything that REA can analyze. Ask your agent in plain language — "Protect the core logic in my program so REA can't analyze or clone it" — and the agent uses ANTI-REA's semantic scope analyzer (powered by NVIDIA Auto Ontology) to isolate secret/boundary functions without trapping inner hot loops, compiles them through the Pure-Rust polymorphic VM (antirea-rust-v19, Format v19), verifies bit-exact behavioral equivalence, and measures interactive and batch execution speed.
What Gets Protected in Your Software?
Core Algorithms & Business Logic: Prevents proprietary calculations, data processing formulas, and core intellectual property from being decompiled, reverse-engineered, or cloned.
Secret Data & Embedded Keys: Protects sensitive API credentials, encryption keys, tokens, and proprietary constants from being extracted in plaintext from
.rdataor post-prologue memory dumps.License & Authorization Checks: Shields premium feature gates, expiration timers, and product activation checks against cracker bypasses, binary tampering, or forced branch flipping.
Anti-Tampering & Memory Dump Defense: Defeats static
.rdataextraction, post-prologue RAM/stack snapshots, differential trace correlation, and isolated Unicorn CPU handler probing while remaining strictlyW^Xcompliant (noRWX/VirtualProtectpages).Internal Call Graphs & Execution Flow: Fuses cross-channel wrappers and inlines leaf helpers (
0internal clustercalls) behind polymorphic non-16 cluster topologies (12..20clusters + medium-tier.pdatabridges) so analysts cannot map structural call blueprints.Automated AI Cloning & REA Defense: Directly neutralizes autonomous AI reverse-engineering agents (REA + Ghidra + Unicorn dynamic probing) even when our full open-source compiler (
rust/crates/antirea-passes) is public (Kerckhoffs's Principle).
Related MCP server: REA
Supported Programming Languages
ANTI-REA unifies core logic virtualization across 11 native, managed, and dynamic languages through its Pure-Rust polymorphic VM compiler (antirea-rust-v19 via antirea-cli compile-multilang and antirea.rust_multilang):
Language | Environment / Runtime | Protection Mechanism ( | Deployment Form |
C | Clang / MSVC / LLVM | LLVM IR → Auto Ontology Scope → Pure-Rust Polymorphic VM ( | Standalone Native Binary ( |
C++ | Clang++ / MSVC / LLVM | LLVM IR → Auto Ontology Scope → Pure-Rust Polymorphic VM ( | Standalone Native Binary ( |
Rust |
| Rust LLVM IR → Auto Ontology Scope → Pure-Rust Polymorphic VM ( | C-ABI & Standalone Protected Native Binary |
Swift | Swift 5.x+ (LLVM Native) | Swift Frontend IR → Auto Ontology Scope → Pure-Rust Polymorphic VM ( | Native App Core & Protected Executable |
Go | Go 1.20+ (Typed Native) | Pure-Go Numeric AST Lowering → Pure-Rust Polymorphic VM ( | Package Core Separation & Native Binary Link |
C# (.NET) | .NET 8 / 9 (CLR / IL) | C# / CIL Core Lowering → Pure-Rust Polymorphic VM ( | Managed App + Protected Native Core (P/Invoke / EXE) |
Java | OpenJDK 17+ / JVM | Java Bytecode / Core Lowering → Pure-Rust Polymorphic VM ( | Java Application + JNI / Protected Native Core |
Kotlin | Kotlin 1.9+ / JVM | Kotlin / JVM Core Lowering → Pure-Rust Polymorphic VM ( | Kotlin App / JVM Service + Protected Native Core |
Python | Python 3.10 ~ 3.13 | Python AST Core Lowering → Pure-Rust Polymorphic VM ( | Protected Native Binary / PYD Extension & Module Bundle |
JavaScript | Node.js / Electron / Runtime | JS Core AST Lowering → Pure-Rust Polymorphic VM ( | Protected Native Core & Application Bundle |
TypeScript | TypeScript 5.x+ | Typed TS AST Lowering → Pure-Rust Polymorphic VM ( | Protected Native Core & Transpiled Bundle |
For detailed architectural contracts and language integration specifications, seeMulti-Language Development.
ANTI-REA Evolution Roadmap
Phase 1 · Focus on Static Binary Protection [COMPLETED]: Protects compiled native binaries against static decompilation, Ghidra analysis, and direct formula recovery via control-flow virtualization and layered binary hardening.
Phase 2 · Deep Static Hardening [COMPLETED]: Extends static resilience by camouflaging handler boundaries, scrambling symbol relations, and concealing dispatcher internals.
Phase 3 · Scaling Automated Attack Testers [COMPLETED]: Continuously scales up autonomous attack agent instances, pitting new defense iterations against live automated testers every day to evolve defenses automatically.
Phase 4 · Dynamic Protection Hardening, Semantic Auto Ontology & Pure-Rust Engine
V19Evolution [ACTIVE]Phase 5 · ? [Classified]
Phase 6 · ? [Classified]
Phase 7 · ? [The Frontier]
Quick start
1. Set up your agent
No need to manually install prerequisites, run terminal commands, or edit config files. Just ask your agent (Claude Code, Cursor, Codex, Gemini CLI, etc.) and it will check and install any missing prerequisites (Rust 1.75+ x86_64-pc-windows-msvc, LLVM/Clang, MSVC Build Tools, Python 3.11+), build the Pure-Rust defense engine, and connect both the Defense MCP (antirea.defense_mcp) and Read-Only Semantic Ontology MCP (antirea.ontology_mcp) servers automatically:
Check and install any missing prerequisites (Rust toolchain, LLVM/Clang, MSVC linker, and Python 3.11+), install ANTI-REA in a local Python virtual environment (.venv), build the release Rust defense engine (cargo build --release --manifest-path rust/Cargo.toml), and connect antirea.defense_mcp and antirea.ontology_mcp to your MCP configuration so you can use them right away.2. Ask your agent
Once connected, ask your agent in natural language:
Protect the core calculation logic and surrounding clues in my project so REA cannot analyze or clone them, keep inner hot loops fast using Auto Ontology scope analysis, and tell me if the original behavior is 100% intact and what speed it runs at.Or if you already have a built executable and a commercial protector profile:
Create a VMProtect protection plan for app.exe, show it to me first, and run it once I approve.Your agent automatically queries the read-only semantic layer (recommend_scope, check_readiness in antirea.ontology_mcp) and calls antirea.defense_mcp tools to inspect available engines (protection_doctor), generate a fingerprinted source or binary plan (protection_source_plan / protection_plan), build/protect after approval (protection_source_build / protection_protect), and verify output equivalence and speed (protection_source_validate / protection_benchmark).
3. Use the terminal
Build the Pure-Rust defense engine (antirea-cli), select budget-safe virtualization boundaries with Auto Ontology, and compile hardened antirea-rust-v19 targets:
# 1. Build the Pure-Rust defense engine workspace
cargo build --release --manifest-path rust/Cargo.toml
# 2. Recommend optimal protection scope on any LLVM IR module (excludes inner hot-loop traps)
.\.venv\Scripts\python.exe -m antirea.ontology_mcp --ir <module.ll> recommend-scope --max-slowdown 15
# 3. Compile selected LLVM IR function(s) into a hardened Pure-Rust polymorphic VM staticlib (antirea-rust-v19)
.\rust\target\release\antirea-cli.exe compile-multilang --workspace . --input-ir <module.ll> --dispatchers <fn1,fn2> --output-dir <out_dir> --seed 90720261105
# 4. Full end-to-end candidate build + 4-gate verification against baseline and previous executables
.\rust\target\release\antirea-cli.exe build --workspace . --input-build <ir_dir> --baseline <baseline.exe> --previous <prev.exe> --output-dir <out_dir> --seed 90720261105Inspect providers, check semantic ontology readiness, sync upstream NVIDIA/auto-ontology releases, or run the 28-task deterministic A/B semantic evaluation directly from the terminal:
.\.venv\Scripts\python.exe -m antirea.defense_mcp --config .runs/protectors.local.json providers
.\.venv\Scripts\python.exe -m antirea.defense_mcp --config .runs/protectors.local.json doctor
.\.venv\Scripts\python.exe -m antirea.ontology_mcp readiness
.\.venv\Scripts\python.exe -m antirea.auto_ontology_sync sync --check-remote
.\.venv\Scripts\python.exe -m antirea.ontology_evalSemantic Scope & RSI Lineage (NVIDIA Auto Ontology)
Applying VM virtualization blindly to an entire library virtualizes inner data-loop helpers (such as XXH64_round, counter_low, luaV_shiftl, or sqlite3VarintLen — small functions that have no loop backedge themselves yet execute millions of times inside caller loops), causing 174x–41,743x latency spikes (UNUSABLE).
ANTI-REA integrates NVIDIA Auto Ontology (v1.2.0) and auto-ontology-eval (antirea.ontology, antirea.ontology_mcp, antirea.auto_ontology_sync, antirea.ontology_eval) to compile LLVM IR call/loop graphs, 11-language lowering routes, real OSS benchmarks, and structured RSI foothold-to-mitigation lineage into a certified read-only SQLite + AutoOntologyModelDocument semantic layer:
Zero-Config Transitive Hot-Loop Detection: Statically identifies natural-loop backedges, 3-hop transitive loop-invoked leaf helpers (
called_from_loop, including compiler-synthesized JVM/Python/JS/TS lowered helpers), andantirea-irVM lowerability without manual policy files.Algebraic Symmetric-Boundary Hardening (
ONTO-SYM-V3): Detects aligned bit-slice symmetricXOR/ADDinput combinations (has_symmetric_input_mix) in boundary functions and automatically pairs them with non-commutative caller-callee modular ring pre-mixing to prevent differential arity collapse.Strictly Read-Only SQLite MCP & Safe Upstream Sync:
antirea.ontology_mcpenforces a SQLiteset_authorizer(SELECT/READ/FUNCTIONonly, blocking allINSERT/UPDATE/DELETE/DDL/PRAGMAmutations) across 10 read-only MCP tools, whileantirea.auto_ontology_syncfast-forwards upstreamNVIDIA/auto-ontologyupdates (core.hooksPath=NUL) with automatic rollback if breaking schema or grader changes occur.Verified
auto-ontology-evalA/B Accuracy (+60.7%p): Across 28 deterministic tasks spanning 7 tables (simple,moderate,challenging), the Auto Ontology semantic layer achieves28 / 28(100.0%) exact execution match vs.11 / 28(39.3%) for raw schema-only queries, with0regressions.
Real-World Open-Source C Protection Speedup (Naive VM vs. Auto Ontology + antirea-rust-v19)
Even when inner data-processing loops remain native -O2 for throughput, virtualizing Auto Ontology's selected key-derivation and boundary finalization functions keeps standalone external attacker recovery at 0% while accelerating real workloads by 32.4x to 4,345.7x:
Open-Source Target | Real-World Workload | Naive Hot-Loop VM | Auto Ontology + | Speedup vs. Naive | External Attacker Recovery |
| 128 KB |
|
|
|
|
| 256 KB |
|
|
|
|
| 2,500-round 64-bit ARX VM execution + GC |
|
|
|
|
| 256 KB keyed Merkle-tree chunk stream |
|
|
|
|
| 2,000-row B-Tree |
|
|
|
|
Multi-Language, Real OSS & Commercial Enterprise Verification (antirea-rust-v19)
Every supported language route, complex multi-function flagship core, real open-source library, and multi-subsystem enterprise binary protected by antirea-rust-v19 (Format v19) is validated across our Multi-PC parallel external attacker fleet (REA MCP + Ghidra headless decompilation + Unicorn CPU emulation + differential probing):
# | Language / Target | Frontend → | Polymorphic Cluster Topology | Functional Equivalence | Verified Latency | External REA Recovery | Usability Status |
1 | C | Clang |
|
|
|
|
|
2 | C++ | Clang++ |
|
|
|
|
|
3 | Rust |
|
|
|
|
|
|
4 | Swift |
|
|
|
|
|
|
5 | Go | Go AST Lowering → Clang LLVM IR → ANTI-REA IR → |
|
|
|
|
|
6 | C# (.NET) | C# Core Lowering → Clang LLVM IR → ANTI-REA IR → |
|
|
|
|
|
7 | Java | Java Core Lowering → Clang LLVM IR → ANTI-REA IR → |
|
|
|
|
|
8 | Kotlin | Kotlin Core Lowering → Clang LLVM IR → ANTI-REA IR → |
|
|
|
|
|
9 | Python | Python AST Lowering → Clang LLVM IR → ANTI-REA IR → |
|
|
|
|
|
10 | JavaScript | JS AST Lowering → Clang LLVM IR → ANTI-REA IR → |
|
|
|
|
|
11 | TypeScript | TS Typed AST Lowering → Clang LLVM IR → ANTI-REA IR → |
|
|
|
|
|
◆ | 323-Node Multi-Channel Flagship Core | Whole-Program |
|
|
|
|
|
★ | Commercial Enterprise Suite | 4 Subsystems ( |
|
|
|
|
|
How It Works & How It Gets Stronger Daily
On Your Machine
Semantic Scope Beyond a Single Function: Hiding one function leaves callers, constants, or symmetric parameter combines exposed—while hiding inner loops destroys performance. ANTI-REA traces LLVM IR call/data graphs and Auto Ontology loop attributes to select surrounding boundary clues while keeping tight loops native.
Plan Before Execution: Input hashes and commands are locked into an immutable fingerprinted plan first so an agent never overwrites binaries unexpectedly.
Bit-Exact Equivalence & Usability Speed Gates: Every build verifies
100%output equivalence across thousands of randomized and boundary test vectors, enforces zero seed-byte leakage in the compiled PE, and measures interactive/batch execution speed (usability-telemetry.json) to guaranteeUSABLEresponsiveness.
Our Continuous Multi-PC Live Attack-Defense RSI Loop
We run a closed-loop evolutionary cycle between our Defense Environment and an isolated Multi-PC Parallel External Attack Fleet (REA + Ghidra + Unicorn + Dynamic Differential Probing):
Build & 4-Gate Validation (Pure-Rust Defense Engine): Synthesize new Pure-Rust VM/obfuscation passes (
rust/crates/antirea-passes) and enforce 100% behavioral equivalence, PE constant/seed hygiene, polymorphic cross-seed distinctness, and usability latency gates (antirea-validate).Multi-PC Blind External Attack & Telemetry: Publish only the protected EXE and public I/O contract (never source code, IR, or private tests) to isolated attacker machines. Each attacker records live usability telemetry (
usability-telemetry.json) and attempts logic recovery using REA MCP, Ghidra headless decompilation, Unicorn CPU emulation, and differential memory/stack probing, logging observed footholds inreversing-chain.json.Ontology-Indexed Counter-Exploitation (
V13→V19.0): Defender-curated structural footholds (F0–F14) and mitigations (V15–V19,ONTO-SYM-V3) are indexed in the Auto Ontology SQLite lineage catalog so open attack surfaces are systematically eliminated and re-audited across subsequent external attack rounds.
Kerckhoffs's Principle: Why Open-Source Defense Remains Resilient Against AI Deobfuscators
Because ANTI-REA is open-source, an attacker (or an autonomous AI agent) can read our entire compiler transformation source (rust/crates/antirea-passes/src/lib.rs). By Kerckhoffs's Principle, antirea-rust-v19 (Format v19) relies solely on the per-build cryptographic --seed and mathematically irreversible synthesis:
RFC 8439 20-Round
ChaCha20Csprng& 512-Bit Sponge Whitening (V12-M1/V13-M1, Zero Seed Inversion): Replaces reversible PRNGs (SplitMix64, LCG, Xorshift) with an RFC 8439 20-round ChaCha20 stream generator (ChaCha20Csprng) + non-invertible 512-bit ARX sponge whitening, paired with an automated post-link PE scan verifying0leaked seed bytes. Extracting every constant in.text/.rdatacannot invert the PRNG state or derive sibling keys.Polymorphic
VmCtxLayout, Variable Non-16 Cluster Topology, &.pdataSpectrum Smoothing (V12-M2/V16-M3/V17-M2..M4): Every build Fisher-Yates shuffles#[repr(C)]VmCtxfields, randomizes arena sizes (1,088..1,280qwords) and.rdataconstant pools (288..512qwords), synthesizes a build-unique cluster count (12..20leaf cluster handlers rather than a fixed16) routed through a vault-encryptedANTIREA_CLUSTER_LUT, and emits8–45 KBmedium-tier callable.pdatabridge procedures to eliminate bimodal function-size gaps.On-Demand Ephemeral S-Box Vault (
W^X), Galois LFSR Prologue, & Position-Coupledroute_slot_mask(V14-M1/V18-M2/V19-M1): Substitution tables (VM_SBOX_ENC) are never stored in plaintext in.rdataor kept unpacked in RAM; leaf handlers decrypt permutations transiently on the stack and wipe them viacore::ptr::write_volatile(..., 0)before returning. Prologue initialization steps through primitive-polynomial $\text{GF}(2^9)/\text{GF}(2^8)$ Galois LFSRs, andVmCtx.route_lut[0..255]applies a nonlinear per-indexroute_slot_mask(idx)(V19-M1) to defeat cross-input differential byte-mask correlation.4-Way Pure Leaf Inlining (
0Internal Calls), Per-Build ChaCha20 SSE2 Bijections, & Adaptive Cluster Locality (V14-M2/V18-M3/V19-M2): All leaf helpers and multi-export channels (f1..f4) are#[inline(always)]-fused into pure leaf cluster handlers (0internalcallinstructions), adaptive run-length cluster locality cuts 323-node flagship batch latency by3.69x, and every build synthesizes ChaCha20-derived 4-lane bijective SSE2pshufdimmediates and distinct64-bitshift pairs (V19-M2,0fixed legacy0xb1/0x4e/0x39/0xd2signatures).96-Word 3-Share Mixed-Modulus ($\text{GF}(2) \times \mathbb{Z}_{2^{64}}$) Header Splitting, Full-64-Bit
hdr_routeBlinding, & Volatile Frame Scrubbing (V14-M3/V18-M1/V19-M3): Logical header keys are split across 3 shares(s0 ^ s1.rotate_left(r1)).wrapping_sub(s2.rotate_right(r2))with99.5%(414 / 416qwords) pre-cluster input diffusion, caller stack argument spill slots and keyedcompile-multilangdecoy ABI registers are volatile-scrubbed (V18-M1), andVmCtx.hdr_routeis dynamically blinded across all 64 bits via $\text{GF}(2)$-homomorphic shift triples (V19-M3).
Multi-Generation External Attack & RSI Verification (V13 → V14.2 → V16–V18 → V19.0)
Tested across isolated 5-PC parallel external attacker evaluations equipped with REA MCP, Ghidra headless decompilation, Unicorn CPU emulation, instruction/API hooking, and differential memory/stack probing (including an 8-cycle, 40-evaluation continuous RSI campaign totaling ~30.6 attacker-hours and 5,087 observed reversing tool invocations across 207,920 verified I/O pairs):
Evaluation Metric | V13 (Dynamic Attack Baseline) | V14.2 (Leaf Inlining + S-Box Vault) | V16.0 – V18.0 (6-Cycle RSI + Auto Ontology) | V19.0 ( |
Standalone Logic Recovery ( |
|
|
|
|
Plaintext S-Box / Uniform Vault Byte-Mask Leak |
|
|
|
|
VM Cluster Topology & Internal | Fixed | Fixed |
|
|
SIMD / Header Route Fingerprint Surface | Static Templates | Static SSE2 | Per-Site Odd Rotations + Frame Arg Scrub | Per-Build ChaCha20 SSE2 Bijections ( |
Real OSS Speedup & Attacker-Side |
|
|
|
|
The more protection failures you report through Issues, the stronger ANTI-REA becomes.
Supported Engines
While the built-in open-source Pure-Rust engine (ANTI-REA Engine, rust/ workspace: antirea-ir, antirea-passes, antirea-validate, antirea-cli, currently antirea-rust-v19 / Format v19) grows stronger continuously across all 11 supported languages, real open-source C libraries, and multi-module native binaries, if you want to combine commercial binary protectors, you can connect Themida, VMProtect, or Code Virtualizer to ANTI-REA and tell your agent in natural language what execution speed and defense level you want.
Use VMProtect (or Themida / Code Virtualizer) to keep execution speed above 80% of the original while defending the core logic as strongly as possible.Engine | Connection | Current Status |
ANTI-REA Engine | In-house Pure-Rust native protection workspace ( | Active Pure-Rust |
Themida | Defense MCP/CLI ( | Windows native x86/x64 PE adapter implemented (requires local installation) |
VMProtect | Defense MCP/CLI ( | Windows native x86/x64 PE adapter implemented (requires local installation) |
Code Virtualizer | Defense MCP/CLI ( | Windows native x86/x64 PE adapter implemented (Legacy / v4 supported, requires local installation) |
Development & Testing
Run the Pure-Rust workspace unit tests, fast core & ontology verification gates, or the full Python unit/boundary test suite from the repository root:
# Pure-Rust VM compiler, IR lowering, and validator unit tests
cargo test --manifest-path rust/Cargo.toml
# Fast verification gates (version sync, Auto Ontology semantic layer, Defense MCP, scope & multilang)
python -m unittest discover -s tests -p "test_version_sync.py" -v
python -m unittest discover -s tests -p "test_auto_ontology.py" -v
python -m unittest discover -s tests -p "test_defense_mcp.py" -v
python -m unittest discover -s tests -p "test_scope.py" -v
# Full multi-language & integration test discovery
python -m unittest discover -s tests -vContributions for commercial protector verification, new Rust VM obfuscation passes, Auto Ontology semantic attributes, general project build integration, and macOS/Linux support are welcome. Distributed under the MIT License (connected third-party protection engines follow their own respective licenses).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Threat modeling, code/cloud/pipeline scanning, shadow-AI discovery, compliance checks and fixes.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Threat modeling, code, API & cloud security, shadow-AI & compliance governance.
Discover software problems, analyze evidence, and create implementation-ready Build plans.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables agents to inspect and reverse engineer native binaries, JavaScript/Electron applications, .NET assemblies, websites, and runtime behavior, returning evidence-backed findings that can be explained, implemented, or tested.351,882 npm4MIT
- AlicenseNot gradedqualityDmaintenanceEnables coding agents to inspect and reverse engineer applications, decompile binary code, trace feature behavior, and collect reproducible evidence for recreating functionality in another stack.351,882 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables agents to audit artifacts for reverse-engineering exposure, inject adversarial protection into binaries, Electron apps, JavaScript bundles, WebAssembly, Python bytecode, databases, AI models, and mobile packages, and verify that automated reconstruction fails.15,336 npm5,441MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to scan Electron, JavaScript, Unity, Godot, .NET, and other builds for reverse-engineering exposures, explain findings, and generate apply-ready fix plans so agents can remediate high-risk issues before shipping. It supports read-only, offline analysis with secret masking and surface detection.29 npmMIT