cd /news/ai-safety/caprun-single-binary-rust-security-s… · home › topics › ai-safety › article
[ARTICLE · art-180627] src=github.com ↗ pub= topic=ai-safety verified=true sentiment=· neutral

Caprun – Single-binary Rust security stack and 3 consumer forks

Caprun released a self-hosted, single-binary Rust security stack that combines eBPF/XDP wire-speed packet capture, Vulkan WGSL GPU compute, WireGuard and Tor routing, and local AI/STDP anomaly detection behind a 12-tab Web OpsDeck on port 8095. The suite adds JA4+ and steganography fingerprinting, a TLS keylog inspector reading SSLKEYLOGFILE, and local LLM SOC triage that sends high-anomaly flow summaries to llama-server on port 8080 or Ollama on port 11434 for automated threat verdicts and XDP drop actions. Caprun also ships three consumer forks, including an AgentGate process firewall that lists local AI and agent processes for one-click control.

key takeaway

Caprun routes high-anomaly flow summaries and STDP spikes to a local llama-server on port 8080 or Ollama on port 11434 for automated threat verdicts that can trigger XDP source-IP drops.

read10 min views16 publishedDec 2, 2026
Caprun – Single-binary Rust security stack and 3 consumer forks
Image: Michielbdejong (auto-discovered)

caprun is a self-hosted Rust network telemetry, active defense, privacy routing, and on-demand micro-app suite built around an 12-tab Web OpsDeck (:8095). It combines eBPF/XDP wire-speed capture and Vulkan WGSL GPU compute with WireGuard, a Tor Onion Router + Hardened Browser, local AI/STDP detectors, Sentinel Shield, and AppForge (zero-byte ephemeral micro-apps).

  • eBPF / XDP Native Hook (wlo1): Line-rate packet inspection and kernel-level dropping before traffic reaches the Linux stack.

  • Arm XDP Drop & XDP Enforce: Toggle between passive logging and active enforcement to drop flagged source IPs automatically when threat scores cross threshold.

  • Prism Live Flow Engine & Wire Sniffer: Real-time flow tracking with byte/packet counters, SNI hostnames, protocol breakdowns, and passive wire sniffing.

  • TLS Keylog Inspector (SSLKEYLOGFILE): Reads NSS TLS session keys to inspect local TLS flows without MITM root certificates.

  • JA4+ & Stego Fingerprinting (src/ja4.rs, src/ja4_stego.rs): Computes JA4 client/server fingerprints to identify tools and beacons, paired with GPU LSB steganography payload checks.

  • Real-Time Host-to-Host Mapping: Renders active LAN and external endpoints as an interactive force-directed connection graph from live XDP/Prism flows.

  • Traffic Cluster & Beacon Visibility: Surfaces chatty IoT devices, sudden fan-out scans, unexpected outbound connections, and peer-to-peer edges at a glance.

  • Flow Drill-Down: Inspect node metadata, protocols, ports, and flow volume directly from the graph to isolate anomalies fast.

  • Flood-Proof History:**Infinite Scroll toggle buffers up to10,000 deduplicated events** in RAM, older batches of 100 rows on scroll so 10-second traffic floods never push hits off-screen.

  • Refind & Freeze Controls: Substring search across IPs, ports, domains, and tags, plusFreeze / Resume to lock the viewport while capture continues.

  • Intel Iris Xe Vulkan Dispatch (wgsl/): Submits parallel WGSL compute shaders to the local GPU for keyspace sweeps, payload analysis, LSB steganography scans, and audio FFT processing.

  • Local Tor SOCKS5 Proxy (127.0.0.1:9150): Tor daemon control, live exit relay directory, circuit rotation (SIGNAL NEWNYM ), and local.onion hidden service hosting.

  • OnionRadar Leak Monitor: Watches live traffic for DNS leaks, non-proxied UDP/STUN leaks, and probes; includesAuto-Rotate (SIGNAL NEWNYM , max once per 30s) on high-severity alerts (>= 55 ).

  • 1-Click Hardened Browser Launcher: Spawns an isolated Chromium or Firefox profile locked tosocks5h://127.0.0.1:9150 with WebRTC non-proxied UDP and QUIC disabled for leak-hardened.onion and anonymous browsing.

  • WireGuard Tunnel Manager: Import.conf profiles, generate mobile QR codes, toggle tunnels, and monitor peer handshakes and transfer stats.

  • Host Kill Switch: Blocks non-tunnel outbound traffic via firewall rules if the WireGuard tunnel drops.

  • Compact Draggable VPN/Tor Pill: Floating pill capped at240px with a⋮⋮ drag grip (saved inlocalStorage ) so it never blocks toolbar controls.

  • Mirage Decoy Listener: Arms local decoy ports to catch unauthorized LAN scans and fingerprint probing hosts.

  • Cortex STDP Anomaly Detector: Spiking-neural-style temporal anomaly scoring over packet cadence, inter-arrival timing, and flow entropy.

  • Local LLM SOC Triage: Sends high-anomaly flow summaries and STDP spikes to localllama-server (:8080 ) or Ollama (:11434 ) for automated threat verdicts and XDP actions.

  • PhishLens: Evaluates suspicious URLs and message text for credential-harvesting patterns via heuristics and local LLM triage.

  • VocalPrism (Voice-Clone Detector): Analyzes mic clips or uploaded audio via GPU FFT spectral analysis to flag synthetic/cloned voice harmonics.

  • AgentGate Process Firewall: Lists local AI/agent processes with 1-click suspend (SIGSTOP ) or resume (SIGCONT ).

  • LAN ACR Mirage & UDP DNS Sinkhole: Scans for Smart TV/IoT Automatic Content Recognition beacons and runs a local UDP DNS sinkhole to block trackers LAN-wide.

Docked beside Tab 10 in the tab bar, AppForge materializes single-purpose micro-apps in RAM and wipes them back to 0 bytes on eject:

  • Predictive Intent Bar & Instant Seed Cartridges (< 50ms): Auto-detects intent or pasted emails/phones/JSON to launchEphemeral Email (curl smtps:// + MIME attachments ormailto: ),Dialer & SMS (tel: /sms: + optionaladb ),LAN File Drop (16 MB RAM-only),LAN Voice Call (WebRTC P2PiceServers: [] , zero cloud), andJSON Workbench .
  • Automated LlmSupervisor: Probes llama-server (:8080 ), falls back to Ollama (:11434 ), or auto-discoversllama-server + a local.gguf (>= 50 MB ) and streams responses via SSE (stream: true ,enable_thinking: false , 300s ceiling, zero-idle socket pooling, 1-shot auto-retry) to synthesize compact offline HTML5/Canvas/JS micro-apps inside a sandboxed<iframe> with an explicitpostMessage bridge whitelist.
  • Pin / Export / Eject: Pin cartridges to~/.config/caprun/floppy/ , export standalone.html , or eject to wipe RAM.

Docked beside 11. AppForge, SiliconSuite bundles four zero-cloud, native-Rust utilities:

  • CleanRoom (Metadata & PII Scrubber + Interactive Redactor): Strips hidden JPEG (APP1 –APP15 /COM ), PNG (tEXt /iTXt /eXIf /tIME ), and PDF (/Author ,/Producer , XMP) metadata in RAM with before/after SHA-256 hashes, scans text/files for emails, SSNs, phones, and Luhn credit cards, and includes a mouse/touch<canvas> redactor to permanently black-out or mosaic-pixelate faces and text before down.

  • NetTruth (ISP Bufferbloat, Throttling & DNS Auditor): Grades unloaded vs. loaded TCP latency (A+ –F ), measures throughput, checks for ISP DNS NXDOMAIN hijacking, and compares bare-ISP vs. WireGuard VPN runs to expose content throttling.

  • PixelSieve (Offline Exact & Near-Duplicate Reclaimer): Walks local directories at native Rust speed using SHA-256 exact hashing and perceptual image clustering to reclaim disk space with safe move-to-Trash cleanup.

  • VaultAudit (Password Stress-Tester & Local Secret Scanner): Estimates GPU-rig crack times offline (with optional zero-knowledge 5-char SHA-1 HIBP k-anonymity lookup) and sweeps local folders for exposed AWS keys, GitHub tokens, PEM private keys, and.env secrets.

  • Single-Shot LAN Login Gate (0.0.0.0:8095): Cookie-backed HttpOnly; SameSite=Lax auth (256-bit token, 12h TTL, 400 ms backoff) protecting all 12 tabs and/api/* . Defaults:admin /toma (override viaCAPRUN_USER /CAPRUN_PASS ).

  • Pre-Click Hover Previews (#caprunTip): Hover any tab, toggle, or action button across all 12 tabs for a brief description before clicking.

  • Embedded PTY Terminal: Interactive local shell inside OpsDeck.

cd ~/caprun
cargo build --release
sudo setcap cap_bpf,cap_net_admin,cap_net_raw,cap_perfmon,cap_sys_resource,cap_net_bind_service=eip ./target/release/caprun
touch /tmp/sslkeys.log
SSLKEYLOGFILE=/tmp/sslkeys.log nohup ./target/release/caprun opsdeck --iface wlo1 > /tmp/caprun_opsdeck.log 2>&1 &
  • Local:http://localhost:8095 |** LAN / Phone:**http://<YOUR_LAN_IP>:8095
  • Env Overrides:CAPRUN_USER ,CAPRUN_PASS ,CAPRUN_MODEL ,CAPRUN_LLAMA_BIN ,SSLKEYLOGFILE
Subsystem Endpoints
Auth GET /login ,POST /api/auth/login ,POST /api/auth/logout
AppForge (Core) GET /api/forge/status ,POST /api/forge/materialize ,POST /api/forge/llm/ensure ,POST /api/forge/pin ,POST /api/forge/load ,POST /api/forge/delete
AppForge (Bridges) POST /api/forge/smtp_config ,POST /api/forge/email ,POST /api/forge/adb ,POST /api/forge/drop/* ,POST /api/forge/rtc/signal ,POST /api/forge/rtc/poll
Telemetry & Intel GET /api/tls/status ,GET /api/prism/status ,POST /api/intel/flow
VPN & Mirage GET /api/vpn/status ,GET /api/mirage/status
Onion & Radar GET /api/onion/status ,GET /api/onion/service/status ,GET /api/onion/radar
Sentinel Shield GET /api/sentinel/agents ,POST /api/sentinel/acr ,GET /api/sentinel/dns/status ,POST /api/sentinel/dns/clear
SiliconSuite (Tab 12) POST /api/suite/cleanroom/scrub ,POST /api/suite/cleanroom/pii ,POST /api/suite/nettruth/run ,GET /api/suite/nettruth/history ,POST /api/suite/pixelsieve/scan ,POST /api/suite/pixelsieve/trash ,POST /api/suite/vault/password ,POST /api/suite/vault/secrets

Generic zero-install WebAssembly Linux pages (unkernel demos and similar browser-VM projects popping up across the web) are isolated toys: they rely on external mirrors, route traffic blindly through public Wisp relays, lack host visibility, and sit disconnected from any real security stack.

caprun rethinks the entire model. Inside the same single-binary Rust OpsDeck (~40 MB), SandboxOS turns a sub-second (~882 ms) WebAssembly Linux 7.x desktop into a host-accelerated, Tor-capable, AI-assisted detonation OS wired directly into caprun's eBPF/XDP, Spiderweb, Onion Router, and local Vulkan AI stack.

Capability Generic Wasm Linux / Vanilla unkernel caprun SandboxOS + Hybrid Browser
Network Transport Blind public Wisp relay or fully offline Native Rust Wisp v1 Turbo Proxy (/wisp/) with 64 KB TCP buffers, 256-packet flow window, and zero external daemons
Anonymity & Tor None (relies on host IP or external VPN) Rethought Tor Relay Integration (Wisp: TOR) : dials every guest TCP stream through socks5h://127.0.0.1:9150 (:9050 fallback) with remote DNS resolution and hard UDP blocking (TOR-BLOCK ) — instant browser Whonix without VirtualBox
Live Telemetry & Kill Switch Zero visibility into guest sockets Spiderweb Telemetry Tap : live stream inspector with mid-session switching betweenLIVE ,TOR ,SINKHOLE (logs & drops every connection without touching the host network), andAIR-GAP
Host Silicon & Local AI Trapped in Wasm RAM/CPU limits Silicon Bridge (caprun.local / 10.255.255.1) : routes:8080 straight to host Vulkanllama-server and:80 /:8095 tocaprun APIs — even while external traffic is sinkholed or Tor-routed
Malware / Script Forensics Manual log hunting 1-Click AI Forensic Verdict : feeds captured Wisp socket flows straight to localllama-server (:8080 ) for an offline risk, C2, and exfil report, then nukes the Wasm guest in<1s
Web Recon & .onion Browsing Spawns a local Chrome/Firefox binary (exposes host fingerprint) Docked Hybrid Zero-JS Browser (src/browser.rs) : pure Rust viewer over Tor:9150 inside OpsDeck that strips<script> , trackers, WebRTC, cookies, and UTM params, withAI Page Triage and1-Click Escalate → SandboxOS underWisp: TOR for heavy-JS targets
Performance & Scaling Fixed low defaults, software rendering Unlocks 4–8 vCPUs / 2 GB RAM , nativeCOOP /COEP + HTTPRange streaming, and WebGPU/Vulkan host passthrough (vk-host )
  • src/sandbox.rs — SandboxOS Engine - GET /sandbox/ ,GET /sandbox/* ,GET /assets/* — Serves the static Wasm Linux bundle withCOOP: same-origin ,COEP: require-corp ,Accept-Ranges: bytes , and zero-forkCAPRUN // SANDBOXOS HUD injection.
    • GET /wisp/ — Native Rust Wisp v1 WebSocket-to-TCP/UDP multiplexer (LIVE ,TOR ,SINKHOLE ,AIR-GAP , pluscaprun.local /10.255.255.1 Silicon Bridge).
    • GET /api/sandbox/status ,GET /api/sandbox/telemetry ,POST /api/sandbox/mode ,POST /api/sandbox/telemetry/clear ,POST /api/sandbox/analyze — Live Spiderweb Tap controls and offline Vulkan LLM forensic verdicts.
  • src/browser.rs — Hybrid Hardened Browser - GET /api/browser/view?route=tor&url=... — Zero-JS Rust transport oversocks5h://127.0.0.1:9150 with HTML/CSS URL rewriting, inline event stripping, tracker domain blocking, and strict CSP (script-src 'none' ).
    • GET /api/browser/meta ,POST /api/browser/triage — Live stripped-script/tracker counters and offline AI Page Triage viallama-server (:8080 ), docked directly into OpsDeck's center pane behindLaunch Hardened Browser .

Beyond its 13-tab OpsDeck, eBPF/XDP packet engine, Tab 13 SandboxOS, and docked Hybrid Zero-JS Browser, caprun compiles a full 6-pillar enterprise defense stack directly into the same portable Rust binary—zero external databases, brokers, or VM hypervisors required.

Pillar Module Enterprise Capability Key Endpoints / CLI
1. Zero-Trust HTTPS + Local CA src/tls_ca.rs Dual-stack native rustls HTTPS (:8443 ) alongside HTTP (:8095 ) with an auto-generated ECDSA P-256 Root CA and dynamic LAN-IP SAN leaf certs—unlockingwss:// Wisp and zero-flagSharedArrayBuffer on LAN devices GET /api/https/status ,GET /api/https/ca.crt
2. Persistent Vault & PCAP Index src/store.rs Bundled SQLite WAL telemetry vault ( ~/.local/share/caprun/vault/telemetry.db ) withSHA-256 hash-chained chain-of-custody records, rolling 500 MB PCAP archive indexing, and 1-click signed forensic case bundles GET /api/vault/stats ,/search ,/verify ,/pcaps ,/export ,POST /api/vault/record
3. JA4 + Beaconing + YARA Engine src/detect.rs Spec-compliant FoxIO JA4 TLS ClientHello fingerprinting on encrypted streams, periodicC2 Beaconing (CV% jitter) detection, and a pure-RustYARA-syntax scanner (10 built-in rules + live.yar hot-reload) wired into Wisp and the Hybrid Browser GET /api/detect/summary ,POST /api/detect/scan ,/rules ,/clear
4. RBAC & Scoped API Tokens src/rbac.rs Three-tier role enforcement ( ADMIN ,ANALYST ,AUDITOR ), SHA-256 hashed scoped tokens, non-disruptiveAUDIT vs.ENFORCE modes,chmod 600 bootstrap admin key, and Vault-attributed access decisions GET /api/rbac/whoami ,/status ,POST /api/rbac/mode ,/tokens ,/revoke
5. Autonomous SOAR & STIX 2.1 src/soar.rs Declarative playbooks ( SINKHOLE_SANDBOX ,AIRGAP_SANDBOX ,BLOCK_IOC ,WEBHOOK ,LOG_INCIDENT ) plus 1-clickAbuse.ch Feodo ,URLhaus , andSTIX 2.1 JSON threat intel sync enforced live across Wisp, Hybrid Browser, and Fleet GET /api/soar/summary ,POST /api/soar/sync ,/ioc/add ,/playbook/toggle ,/playbook/add ,/webhook ,/test
6. Distributed Fleet Mode src/fleet.rs Same binary runs headless as caprun agent on remote Linux hosts, streaming/proc vitals and established TCP flows over HTTPS/HTTP with RBAC auth, Master SOAR IOC enforcement, and remotePING /SNAPSHOT /SCAN_FILE (Master YARA) task dispatch caprun agent --master <URL> [--token <TOK>] [--insecure] ,GET /api/fleet/summary ,POST /api/fleet/heartbeat ,/ingest ,/task ,/result ,/remove
./caprun agent --master https://<OPSDECK_LAN_IP>:8443 --insecure   --token "$(cat ~/.local/share/caprun/rbac/bootstrap-admin.token)"   --name $(hostname)
── more in #ai-safety 4 stories · sorted by recency
── more on @caprun 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/caprun-single-binary…] indexed:0 read:10min 2026-12-02 · —