Cybernetic Security Fleet: Autonomous EVM Audit & Exploit Synthesis Rig
Inspiration
Every week, another DeFi protocol loses millions because a subtle, multi-block economic logic bug slipped past static analysis tools and rushed human reviewers. Looking at the exploits in late August 2026 alone—over $18M drained across the Allbridge CCTP phantom attestation relay, Term Finance's relative-quorum governance capture, and Moonwell's illiquid collateral oracle spike—the pattern is clear: static linters and generic LLM prompts completely miss cross-contract state transitions and economic boundary conditions.
As an independent security researcher and developer, I ran into the same frustrating loop with existing tools: traditional linters like Slither and Semgrep flood you with false positives, while general-purpose LLM prompts hallucinate vulnerabilities that don't compile or exist in the EVM state machine. Worse, when a tool does flag something plausible—like an ERC-4626 vault inflation attack, a bridge message without an underlying balance delta, or a governance proposal hijack—you still have to spend hours writing a custom Foundry test harness just to see if it is reproducible.
I set out to fix this broken loop. I wanted to build an autonomous agentic rig that doesn't just guess where bugs might be, but mathematically challenges a protocol's core invariants, captures counterexample execution traces, and automatically synthesizes a verified, runnable Foundry exploit test (.t.sol) with zero human intervention.
What it does
The Cybernetic Security Fleet is an autonomous 133-module security agent that takes raw smart contract repositories and drives them through an end-to-end audit, exploit-synthesis, and continuous monitoring pipeline:
- Autonomous Contest Ingestion (Bounty Sentinel): Runs unattended in the background, polling RSS and contest feeds across Immunefi, Code4rena, and Sherlock four times a day. When a new contest goes live, it automatically clones the repository into
targets/, indexes dependencies, and queues it for auditing. - AST Reconnaissance & Triage (Modules 02–50): Parses Solidity Abstract Syntax Trees to map inheritance hierarchies, state-variable storage layouts, entry points, and high-risk architectural patterns across hundreds of contracts in seconds.
- Strict Bytecode Invariant Fuzzing (Modules 73–133): Dynamically binds live contract bytecode to stateful invariant harnesses, systematically testing state transitions across deep multi-block execution paths. This covers everything from ERC-4626 share inflation and AMM reserve integrity to CCTP balance-delta provenance (Module 97) and absolute economic governance quorums (Module 80).
- Autonomous Exploit Synthesis (Module 96): When an invariant breaks, the agent captures the execution call trace and automatically transpiles it into a standalone, runnable Foundry exploit test (
exploits/ExploitPoC_*.t.sol). - Differential Patch Verification & Executive Reporting (Module 11 & Report Generator): Formats comprehensive disclosure reports (
reports/) powered by Gemini and runs side-by-side differential fuzzing between the baseline contract and candidate fixes to mathematically verify that the vulnerability is neutralized without breaking valid user workflows.
How I built it
I architected the Fleet to combine high-level Google AI reasoning with low-level deterministic execution engines:
- Cognitive Agent & Disclosure Engine: Integrated the Google Gemini API (via Google AI Studio) alongside Google's Gemma to triage complex AST structural graphs, direct module routing, and synthesize enterprise-grade security disclosure documentation.
- Deterministic Execution Sandbox: Orchestrated local EVM toolchains including Foundry (
forge-std,StdInvariant), Solc 0.8.24, and Halmos SMT formal provers to mathematically verify invariant breaks and eliminate hallucinated findings. - Bytecode Binding Gate: Engineered the
TargetBindingBridgeto ensure tests execute strictly against verified deployed bytecode in the.fleet_sandbox/. - Telemetry & Real-Time Alerting: Built a live JSON event-streaming pipeline (
audit_telemetry.json) with an automated webhook dispatcher. New contests announce to dedicated feed channels (#immunefi,#code4rena,#sherlock), clean audit completions log to#findings, and verified critical invariant breaches dispatch straight to#bug-foundwith the exact failing trace and generated PoC. - Test-Driven Reliability: Backed the entire 133-module orchestration rig with 295 unit and integration tests passing 100% green in Pytest with multi-core parallel execution (
pytest-xdist).
Challenges I ran into
- Eliminating Phantom Passes: Early on, generic benchmark harnesses would falsely pass on external targets because target addresses were not dynamically bound. I engineered
TargetBindingBridgeto strictly gate invariant fuzzing, skipping unmapped modules cleanly asSKIPPED_NOT_BOUNDso green passes reflect verified security. - Context Bloat & Session Continuity: Multi-day auditing sweeps across 700+ contracts quickly choke model context windows. I resolved this via Module 67 (
session_handoff.json), enabling agents to self-summarize tactical state into compact<1 KBJSON cards so new sessions resume instantly without context loss. - Test Isolation & Production Discord Telemetry: During development, running the test suite triggered live Discord webhooks because unit tests simulated invariant failures (like the dummy
HubPooltest breach). I isolated and mocked all webhook calls in the test fixtures so#bug-foundalerts are reserved strictly for genuine, live contest breaches. - Non-Blocking Autonomous Execution: Subprocess calls and interactive test harnesses would occasionally pause waiting for terminal
stdin. I patched execution wrappers acrossaudit_master.pyandworkspace_runner.pywith non-blocking streams (stdin=subprocess.DEVNULL), achieving a 1-click execution that completes in ~8 seconds. - Filtering Noise with an Adversarial Gauntlet: To prevent false positives from reaching disclosure packages, I introduced Module 60—forcing a sequential debate where a simulated "Protocol Defender" challenges proposed findings against block-stamping, oracle medianization, and access modifiers before marking any finding verified.
Accomplishments that I'm proud of
- End-to-End Autonomous Pipeline: Built a complete loop that monitors contest feeds, onboards repositories, executes stateful fuzzing, synthesizes Foundry
.t.solPoCs, and posts executive disclosures to Discord without requiring manual intervention. - Autonomous Exploit Transpilation: Module 96 takes raw counterexample execution traces from invariant failures and transpiles them directly into runnable Foundry tests.
- Real-World Zero-Day Threat Modeling: Validated my invariant test suites against root-cause attack vectors responsible for over $18M in late August 2026 exploits:
- CCTP Phantom Attestations: Proving that bridge signatures without verified destination balance deltas ($\Delta \text{Balance} \ge \text{amount}$) fail invariant checks.
- Governance Vote-Buying: Enforcing that voting quorums require absolute TVL-backed participation floors so relative supermajorities cannot hijack low-float vaults.
- Thin-Market Oracle Spikes: Constraining borrow capacities against physical on-chain market depth rather than spot price feeds alone.
- Differential Patch Proving: Engineered Module 11 to prove mathematically via differential fuzzing that a candidate security patch neutralizes the vulnerability while maintaining 100% functional parity for honest transactions.
- Rig Reliability: Hardened the internal orchestrator to 295 / 295 passing tests in Pytest.
What I learned
- Deterministic Fuzzers Keep AI Honest: LLMs excel at spotting architectural patterns and structural red flags, but cannot accurately simulate multi-block EVM state transitions in isolation. The winning formula is pairing Google Gemini for semantic reasoning with deterministic fuzzers and SMT solvers for execution proof.
- Attestation Is Not Solvency: Modeling cross-chain protocols taught me that a cryptographic message attestation is meaningless unless verified against physical state change—asset release must strictly require a proven balance increase on the execution frame.
- Proving the Fix Matters as Much as Finding the Bug: Uncovering an invariant break is only half the battle. Differential testing showed me that hasty patches often introduce unintended side effects; mathematically proving that a fix works without breaking honest user flows is critical.
- Specialized Routing Beats Monoliths: Distributing tasks across 133 modular, specialized agents is vastly faster, more reliable, and easier to debug than forcing a single monolithic prompt to handle the entire audit pipeline.
What's next for Cybernetic Security Fleet
- Stigmergic Heat-Mapping (Swarm Routing): Evolving the dispatcher so sub-second AST sifters assign dynamic "Exploitability Heat Scores" to contracts, allowing invariant fuzzers and SMT provers to autonomously swarm the hottest 5% attack surfaces first on massive 700+ contract codebases.
- Live Mainnet RPC & Mempool Forking: Expanding Module 61 from local sandboxes to real-time archive node forks, testing protocol invariants against live on-chain liquidity, mempool race conditions, and pending transactions.
- Cross-Chain Bridge & Rollup Fuzzing: Extending execution harnesses to test cross-chain messaging layers and multi-rollup relayer logic across EVM Layer-2 networks.
- Automated Upstream Remediation PRs: Generating verified patch pull requests directly to audited contest repositories once differential verification passes. ## Pilot Access & Protocol Onboarding
- Cybernetic Security Fleet is currently onboarding select DeFi protocols, smart contract teams, and Web3 audit firms for our closed beta security harness. https://forms.gle/6GmzpnCnNEFx5ws59
Built With
- agentic
- ast-parser
- discord-api
- evm
- foundry
- google-ai-studio
- google-cloud
- halmos-smt
- pytest
- python
- smt-solver
- solidity

Log in or sign up for Devpost to join the conversation.