Red Specter MIDAS
Autonomous AI Agent Cryptocurrency Disruption Engine — 10 subsystems targeting AI agents in DeFi and on-chain environments.
Overview
MIDAS targets AI agents operating in cryptocurrency and DeFi environments. It exploits the intersection of autonomous agent decision-making and on-chain execution — draining wallets, front-running transactions, poisoning agent memory with false price data, and mapping dark net AI trading infrastructure.
Where conventional security tools stop at the application layer, MIDAS goes on-chain. It simulates real ECDSA nonce reuse attacks to recover private keys from transaction signatures, executes Uniswap v3 sandwich simulations against live EVM testnets, and traces wallet clustering across real blockchain data. 550 tests. 10 subsystems. Real EVM validated.
MIDAS is Tool 51 of the Red Specter NIGHTFALL offensive framework. It integrates with WARLORD for autonomous campaign orchestration and uses Ed25519 dual-gate UNLEASHED for operator-controlled activation of destructive subsystems. Passive reconnaissance and attribution subsystems (SCAN, TRACE, DARKNET) run without override. Everything that moves money requires it.
The 10 Subsystems
| # | Subsystem | Command | What It Does |
|---|---|---|---|
| 01 | SCAN | midas scan | Discover AI agent wallet addresses and DeFi positions — passive |
| 02 | DRAIN | midas drain | Test unauthorised asset transfer vectors against agent wallets |
| 03 | INTERCEPT | midas intercept | RPC endpoint manipulation and transaction interception |
| 04 | GRIEF | midas grief | Gas griefing and transaction spam attack simulation |
| 05 | SANDWICH | midas sandwich | Front-run/back-run MEV sandwich attack simulation |
| 06 | TRACE | midas trace | On-chain transaction attribution and wallet clustering — passive |
| 07 | MEMPOISON | midas mempoison | Inject false price and market data into agent memory stores |
| 08 | PLUGIN | midas plugin | Malicious DeFi plugin and tool injection for AI agents |
| 09 | DARKNET | midas darknet | Map dark net AI trading infrastructure — passive |
| 10 | REPORT | midas report | Ed25519-signed output in JSON or Markdown format |
Subsystem Details
Passive reconnaissance against AI agent endpoints and on-chain addresses. Discovers wallet addresses associated with AI trading agents, maps DeFi positions (liquidity pools, lending positions, token holdings), identifies Web3 RPC endpoints, and profiles agent behaviour through public API interaction patterns.
- Wallet Discovery — Identifies agent-controlled addresses via API response analysis and on-chain heuristics
- Position Mapping — Enumerates Uniswap, Aave, Compound, and Curve positions
- RPC Endpoint Detection — Fingerprints Web3 provider usage (Infura, Alchemy, self-hosted)
- Agent Behaviour Profiling — Timing analysis, transaction frequency, gas price strategy
SCAN is passive — no --override required. All data sourced from public APIs and on-chain reads.
Tests unauthorised asset transfer vectors against AI agent wallets. Simulates ECDSA nonce reuse key recovery, tests approval hijacking via ERC-20 allowance exploitation, probes delegatecall vulnerabilities in agent proxy contracts, and validates access control on agent hot wallets.
- ECDSA Nonce Reuse Recovery — Recovers private keys from repeated nonce usage in transaction signatures using real mathematical attack (not simulation)
- Approval Hijacking — Tests ERC-20/ERC-721 allowance exploitation paths
- Proxy Vulnerability — Probes delegatecall and storage collision vectors in upgradeable agent contracts
- Access Control Gaps — Tests for missing ownership checks on agent wallet management functions
Requires --override. Mainnet execution requires --confirm-destroy.
Targets the RPC layer between AI agents and blockchain nodes. Positions a malicious RPC endpoint that returns manipulated blockchain state data, intercepts and replays signed transactions, and tests agent responses to false confirmation data.
- RPC Spoofing — Serves manipulated eth_call, eth_getBalance, and eth_getLogs responses
- Transaction Replay — Captures and replays signed transactions in altered context
- State Manipulation — Presents false block numbers, nonces, and gas price data
- Confirmation Fraud — Returns false transaction receipts to trigger premature agent actions
Requires --override.
Gas griefing and transaction spam attack simulation. Tests how AI agents respond to hostile on-chain conditions — mempool flooding, front-run exclusion, and deliberate transaction failure loops designed to exhaust agent gas reserves.
- Mempool Flooding — Submits high-volume transactions to crowd out agent transactions
- Gas Price Manipulation — Forces agent into gas auction spiral
- Front-Run Blocking — Uses pending transaction monitoring to continuously pre-empt agent actions
- Nonce Squatting — Occupies agent nonce slots to stall transaction pipeline
Requires --override.
MEV (Maximal Extractable Value) sandwich attack simulation. Detects AI agent swap transactions in the mempool and simulates front-run/back-run pairs that extract value at the agent's expense. Live validated against Uniswap v3 on EVM testnet.
- Transaction Detection — Monitors mempool for agent swap signatures (Uniswap, SushiSwap, Curve)
- Front-Run Simulation — Calculates optimal front-run transaction to move pool price before agent swap
- Back-Run Simulation — Reverses pool position post-agent-swap to extract profit
- Slippage Exploitation — Identifies agent transactions with loose slippage tolerance (common in AI agent configurations)
- Cross-Chain Bridge MEV — Tests MEV opportunities at bridge entry/exit points
Requires --override. Live validated: Uniswap v3 sandwich simulation on EVM testnet.
On-chain transaction attribution and wallet clustering. Builds a graph of wallet relationships using common-input-ownership heuristics, peel chain detection, and exchange deposit address clustering. Maps the full on-chain footprint of AI trading agent infrastructure.
- Common-Input-Ownership — Groups addresses that co-sign transactions as likely same controller
- Peel Chain Detection — Identifies mixing attempts and traces through them
- Exchange Cluster Mapping — Identifies exchange deposit addresses in agent transaction history
- Infrastructure Correlation — Links on-chain activity to API endpoints and agent identifiers
TRACE is passive — no --override required. All data sourced from public blockchain.
Injects false price and market data into AI agent memory stores and RAG pipelines. Causes agents to make trading decisions based on fabricated price feeds, false liquidity data, and poisoned historical market data.
- Price Oracle Poisoning — Injects false Chainlink, Band Protocol, and Pyth price data into agent memory
- RAG Poisoning — Embeds adversarial market analysis documents that skew agent strategy
- Liquidity Fabrication — Feeds false pool depth data to cause slippage miscalculation
- Historical Data Corruption — Poisons training context with manipulated backtesting data
- Sentiment Injection — Inserts fabricated news/social data to manipulate agent sentiment models
Requires --override.
Malicious DeFi plugin and tool injection for AI agents. Tests whether AI agents will invoke adversarially crafted DeFi tools that drain funds, exfiltrate private keys, or route transactions to attacker-controlled contracts.
- Tool Manifest Spoofing — Presents malicious tool definitions as legitimate DeFi integrations
- Contract Address Substitution — Replaces legitimate protocol addresses with attacker contracts
- Permission Escalation — Requests excessive token approvals via crafted tool calls
- Exfiltration via Tool — Embeds key exfiltration in seemingly benign tool responses
Requires --override.
Maps dark net AI trading infrastructure. Identifies Tor-routed AI trading endpoints, dark market DeFi aggregators, and covert AI agent coordination networks operating outside visible blockchain infrastructure.
- Tor Exit Node Detection — Identifies on-chain transactions originating from known Tor exits
- Dark Pool Mapping — Enumerates private/dark liquidity pools used by covert AI agents
- Coordination Network Discovery — Maps multi-agent coordination channels using on-chain message passing
- Infrastructure Attribution — Links dark net endpoints to on-chain agent identities
DARKNET is passive — no --override required.
Generates Ed25519-signed output from any MIDAS subsystem run. Aggregates findings across multiple subsystems, deduplicates overlapping findings, maps to MITRE ATLAS, and produces a signed report in Markdown or JSON format.
- Ed25519 Signing — Cryptographic signature on all output, tamper-evident
- MITRE ATLAS Mapping — All findings mapped to applicable ATLAS tactics and techniques
- Aggregation — Combines output from multiple MIDAS subsystem runs
- Formats — JSON (machine-ingestible, WARLORD-compatible) and Markdown (human-readable)
Report Schema
Every finding includes:
- finding_id — unique identifier
- subsystem — which MIDAS subsystem generated the finding
- severity — CRITICAL / HIGH / MEDIUM / LOW / INFO
- atlas_technique — MITRE ATLAS technique mapping
- target — address, URL, or contract tested
- evidence — transaction hash, API response, or on-chain proof
- description — what was found and how
- remediation — recommended fix
- signature — Ed25519 signature
CLI Reference
All MIDAS functionality is accessed through the midas CLI.
Global Flags
Quick Start
Start with passive reconnaissance, then escalate to active subsystems with UNLEASHED.
Step 1 — Discover AI Agent Infrastructure
Step 2 — Attribute On-Chain Activity
Step 3 — Map Dark Net Infrastructure
Step 4 — Active Attack Simulation (UNLEASHED)
Step 5 — Generate Signed Report
MIDAS UNLEASHED
MIDAS implements Ed25519 dual-gate access control across all active subsystems.
Passive (no gate required): SCAN — TRACE — DARKNET
These subsystems perform read-only reconnaissance from public data sources. No authorisation gate required.
Active (requires --override): DRAIN — INTERCEPT — GRIEF — SANDWICH — MEMPOISON — PLUGIN
These subsystems interact with live systems. Requires a valid Ed25519 private key. Testnet only unless --confirm-destroy is also supplied.
Mainnet (requires --override --confirm-destroy): DRAIN
DRAIN on mainnet moves real assets. This flag confirms operator intent. Founder's key only.
The UNLEASHED gate uses the same Ed25519 key infrastructure as all 59 NIGHTFALL tools. Key generation: red-specter keys generate.
Target Systems
- Ethereum / EVM-compatible chains — Ethereum mainnet, Polygon, Arbitrum, Base, Optimism, BSC
- DeFi protocols — Uniswap v2/v3, Aave v2/v3, Compound v2/v3, Curve, Balancer, 1inch
- AI trading agent APIs — REST/WebSocket agent endpoints making on-chain decisions
- Web3 RPC endpoints — Infura, Alchemy, QuickNode, self-hosted nodes, private RPCs
- Agent memory and RAG stores — Vector databases, Redis, PostgreSQL stores holding agent price context
- Cross-chain bridges — Bridge contracts with AI agent automation (Stargate, Across, Synapse)
- Dark net trading infrastructure — Tor-routed agent endpoints, dark pool aggregators
Live Validation
MIDAS was live validated against real systems. The following attacks were executed and confirmed, not simulated.
Key Features
WARLORD Integration
MIDAS is registered in the WARLORD campaign registry. WARLORD orchestrates MIDAS as part of autonomous multi-tool attack campaigns targeting AI-enabled financial infrastructure.
WARLORD handles target scheduling, result aggregation across tools, and campaign-level reporting. MIDAS JSON output is natively consumed by WARLORD's campaign report aggregator.
Requirements & Installation
Requirements
- Python 3.11+
- web3.py — Ethereum interaction layer
- eth-account — ECDSA key operations and transaction signing
- httpx — async HTTP client for agent API interaction
- typer — CLI framework
- rich — terminal formatting and progress display
- pydantic — data validation
- cryptography — Ed25519 signing for REPORT output
- numpy — numerical computation for ECDSA nonce attack maths
Installation
Quick Verification
Disclaimer
Red Specter MIDAS is designed for authorised security testing, research, and educational purposes only.
You must have explicit written permission from the system owner before running any MIDAS subsystem against
a target. Use against cryptocurrency infrastructure, DeFi protocols, or blockchain networks without
authorisation may violate the Computer Misuse Act 1990 (UK), the Computer Fraud and Abuse Act (US),
financial regulations in your jurisdiction, and applicable blockchain protocol terms of service.
The authors accept no liability for misuse. Never run MIDAS with --confirm-destroy against
any system you do not own or have explicit written permission to test.