How We Boot Air-Gapped AI Pentesting Cyber Ranges in ~1s with RootlessKit, gVisor (--network=none), and Unix Domain Sockets
Instead of Docker bridges or slow KVM images, AnvilRange launches a SHA-256 pinned static Go target inside systemd-run --user (192 MB RAM, 0 swap, 96 TasksMax) + RootlessKit + unshare --net + gVisor runsc --platform=systrap --network=none --host-uds=create. All HTTP traffic flows over a single bind-mounted Unix domain socket (/pod/http.sock) with zero outbound NICs, zero /bin/sh, and ~1-second cold starts.
| Dimension | Docker Compose / Bridge | Full KVM / Proxmox VM | AnvilRange (RootlessKit + gVisor) |
|---|---|---|---|
| Cold Start Latency | 5–20s (images + bridge setup) | 45–180s (OS boot + cloud-init) | ~1s (static Go binary + RO rootfs) |
| Kernel Attack Surface | Shared host Linux kernel | Dedicated guest kernel | gVisor Sentry user-space syscall interception |
| Zero-Egress Guarantee | Fragile iptables / bridge rules | Manual virtual firewall rules | unshare --net + --network=none (0 NICs) |
| Memory Footprint | 256 MB – 2 GB+ | 2 GB – 32 GB (e.g. AD GOAD) | Hard 192 MB RAM cap (MemorySwapMax=0) |
| Anti-Memorization | Static CTF paths memorized by LLMs | Static topology, costly resets | Per-pod randomized routes, fields & internal hosts |
1. Why Bridged Docker Labs and Static CTFs Break Under Autonomous AI Agents
Two things break immediately when you connect autonomous agents (Claude Code, Codex, CyberStrikeAI, PentAGI) to traditional cyber ranges. First is blast radius: bridged Docker containers share the host Linux kernel and often leave RFC1918 host ports (22/445) or outbound internet reachable if an agent hallucinates or hits an indirect prompt injection. Second is evaluation validity: static CTF benchmarks suffer heavily from training-set memorization—hardcoded replay scripts pass fixed routes like /api/admin/audit or ?id=1003 without genuinely reasoning over the target.
We designed AnvilRange around one constraint: every single sandbox pod must boot in ~1 second, have zero external network interfaces at the kernel level, cap memory at 192 MB, and mutate routes and parameters dynamically per pod.
2. The 5-Layer Production Launch Pipeline (Zero Docker Daemon, Zero NICs)
AnvilRange workers run under a dedicated unprivileged Linux account (anvil-lab) with zero Docker daemon involvement. For each pod, the worker writes a read-only OCI config with an empty capability set, noNewPrivileges=true, no /bin/sh, and a single bind-mounted socket directory (/pod with nosuid,nodev,noexec). systemd-run --user places the entire RootlessKit + gVisor Sentry + Gofer tree inside strict cgroup v2 limits before exec.
Because both unshare --net and runsc --network=none are enforced, the pod has no external NICs and no DNS. Control-plane probes travel exclusively over a per-pod Unix domain socket (/pod/http.sock via --host-uds=create). Before returning readiness, the worker verifies both the cryptographic X-Lab-Observation header and live systemd cgroup limits.
systemd-run --user --collect \
--unit=anvil-webpod-<id>.service \
--property=MemoryMax=201326592 \
--property=MemorySwapMax=0 \
--property=CPUQuota=50% \
--property=TasksMax=96 \
--property=RuntimeMaxSec=30min \
--property=KillMode=control-group \
/usr/bin/rootlesskit --state-dir=<dir>/kit \
/usr/bin/unshare --net \
/usr/bin/runsc --root=<dir>/runtime \
--ignore-cgroups=true \
--platform=systrap \
--network=none \
--host-uds=create \
run --bundle <dir> <id>3. Standard vs. Mutated Anti-Cheat: Exposing Memorized Replay vs. Live Reasoning
Across 8 CWE and OWASP Agentic scenarios in /benchmark (interactive-sandbox.v1), every challenge runs in both Standard and Mutated modes. In Mutated mode, each ephemeral pod randomizes route prefixes (/api/v2/*-<tag>/...), query/JSON field names, target invoice IDs, and internal SSRF hosts (vault-<tag>.internal), while hardening JWT auth to reject alg=none and require kid=../../dev/null HS256 signing.
The split is dramatic and reproducible with one open-source command: Naive-Static-Replay scores 8/8 (100%) on Standard but collapses to 0/8 (0%) on Mutated; Heuristic-Scanner-Baseline drops to 4/8 (50%); only genuine manifest-driven reasoning agents clear Mutated mode—and every verified run now gets a public /runs/<id> cryptographic proof page and embeddable SVG README badge.
- MIT open-source MCP bridge & benchmark runner: github.com/dll-create/anvilrange-mcp
- Listed on Official MCP Registry: io.github.dll-create/anvilrange-mcp (Streamable HTTP: https://anvilrange.com/mcp)
- Benchmark any CLI agent or LLM in 1 command with benchmarks/agent-cli-adapter.mjs and embed live SVG badges.
Zero local Docker setup. Includes guided 5-step probes, live WAF/Gateway/Firewall/Canary toggles, and Zero-FP verification.