DetCordon
A deliberately isolated detonation sandbox that watches hostile web malware, captures evidence, and stores it encrypted — without ever blocking, without ever allowing C2 back in, and without ever trusting the attacker.
The Problem
Web malware changes faster than signatures can ship. PHP webshells, scanner-driven RCE payloads, and zero-day exploit kits all have one thing in common: by the time you have a detection rule, the sample set has already moved.According to the 2025 Verizon DBIR, web application exploits remain the #1 vector for breaches, with 75% of attackers using commodity tools that mutate daily.
Today's options are either inline blocking (WAFs that must be right every time) or static analysis (sandboxes designed for PE files, not HTTP). Neither works well for server-side web malware that only activates in the context of a specific application stack.
DetCordon takes a third approach: containment-first observation. Let the malware execute in a purpose-built, disposable environment where every syscall, file write, and network connection is recorded. Preserve the samples. Ship them to a separate, hardened sink. Then decide what to block.
The Architecture
Two hosts. One direction of travel. Zero bytes flowing back.
| Layer | Component | Role |
|---|---|---|
| Sandbox VM | waf | Detection-only ModSecurity tap; forwards traffic upstream, emits UDP JSON events |
| Sandbox VM | waf-extractor | Watches victim tmpfs, ships sample bodies over TCP (write-only) |
| Sandbox VM | eBPF sidecar | cgroup-scoped execve, vfs_write, tcp_connect observation |
| Sink host | waf-sink | UDP event receiver + TCP sample receiver; age-encrypts; sha256-path storage |
| Sink host | waf-sink-guard | fanotify + sha256 allowlist; alerts on unknown writes |
| Operator | waf-deploy | ratatui TUI + CLI that generates all deployment artifacts |
Ten Containment Rules
These are non-negotiable. Every deployment, every backend (Docker or Firecracker), every mode (analysis or honeypot) enforces all ten:
- 01 No host bind-mounts — Victim writes to tmpfs only. Reset means destroy and recreate, not rm -rf. This prevents sample bytes from ever touching the sandbox host's real filesystem. If the attacker compromises the victim, they still can't pivot to the host.
- 02 Internal + default-drop egress — Victim has no outbound access except to the sink's two ports. No DNS, no package repos, no exfiltration. The default-drop egress rule is generated as an nftables set in the deployment artifacts, not left to operator judgment.
- 03 WAF in DetectionOnly — Malware must succeed to be observed. The ModSecurity tap never blocks, never rate-limits, never modifies the request. DetectionOnly means we capture what the attacker intended, not what survived a block rule. This is critical for zero-day observation.
- 04 Write-only samples, UDP events — The sandbox VM has no inbound channel. No reverse shell can establish C2 because nothing listens. Samples go out over TCP (reliable). Events go out over UDP (lossy but fast). Nothing comes in. Ever.
- 05 sha256-path, mode 0400, no extension — Stored as
samples/<sha256>with no file extension and read-only for owner. Nothing to double-click. The absence of a file extension means even a misconfigured browser or file manager won't accidentally execute the sample. - 06 Sink-guard always-on — Every close-write on the sink is fanotify-monitored and hashed against an allowlist. Unknown write = incident alert. The guard runs as a separate process with its own systemd unit. It cannot be stopped without alerting.
- 07 eBPF host-pid is opt-in — Default cgroup-scoped bounds the eBPF sidecar's blast radius. Host-level pid visibility requires explicit operator override. A misconfigured eBPF program with host-pid scope can observe all host processes. Cgroup-scoping prevents this by default.
- 08 Time-boxed (30 min default) — Hard kill after 30 minutes. Configurable per deployment, but never disabled. If something goes wrong — a fork bomb, a slow exploit, an operator who forgot to tear down — the system self-destructs within the time limit.
- 09 No sample bytes over UDP — Sample bodies are never sent over the loss-tolerant channel. UDP is for metadata only. Sample integrity is critical for forensic admissibility. TCP with sha256 verification on the sink side guarantees we have what the attacker dropped.
- 10 Sink host ≠ sandbox host — Different physical or virtual machine. Kernel isolation between what's being attacked and what stores the evidence. If the attacker compromises the sandbox VM (which is the expected outcome), the sink host — with its evidence and decryption key — must remain unreachable from that VMs network position.
Target Market
DetCordon addresses three distinct buyer personas with overlapping needs:
| Persona | Primary Need | Buying Signal |
|---|---|---|
| Security Research Lab | Capture novel web malware for analysis, signature development, and threat intel | "We need a repeatable way to observe what attackers drop without risking our production network" |
| Blue Team / SOC | Validate WAF rules and detection logic against real attacker payloads in a safe environment | "Our WAF blocks 95% of requests but we don't know what we're missing in the 5%" |
| Managed Security Provider | Offer contained observation as a service for client web applications | "We need an appliance that lets us offer malware analysis without building a sandbox team" |
The addressable market is the intersection of web security and malware analysis — a niche that today's PE-file-focused sandboxes and signature-based WAFs both underserve.
Business Model
| Tier | Includes | Target Price |
|---|---|---|
| Appliance (self-hosted) | DetCordon software + deployment artifacts + 1 year updates | $12,000–$25,000 / year |
| Managed Lab | Hosted sink + quarterly sample analysis reports + analyst access | $25,000–$60,000 / year |
| Enterprise | Multi-tenant sandbox cluster + custom rule integration + SLA | $60,000–$150,000 / year |
Competitive Position
DetCordon's differentiation is narrow and deep: it is the only open-architecture malware observation platform purpose-built for web-server-side payloads rather than user-downloaded PE files.
| Dimension | DetCordon | Cuckoo / Capev2 | VxStream / Joe Sandbox | ModSecurity (standalone) |
|---|---|---|---|---|
| Target payload type | Web malware (PHP, ASP, JSP) | PE files, documents | PE files, documents, URLs | HTTP traffic only |
| Detection mode | DetectionOnly (never blocks) | N/A (analysis only) | N/A (analysis only) | Blocking or DetectionOnly |
| Evidence retention | Age-encrypted, immutable | Plaintext, mutable | Vendor managed | None |
| Sink isolation | Separate host, one-way, fanotify-guarded | Same host | Vendor managed | N/A |
| Deployment model | Generation TUI → appliances | Manual setup | SaaS / appliance | Package install |
| Pricing | $12K–$150K / year | Free (OSS) | $5K–$50K / year | Free (OSS) |
While Cuckoo/CAPE has a larger malware-analysis community, neither supports server-side web payloads natively. A PHP webshell in Cuckoo runs under Windows detonation — the wrong environment entirely.
DetCordon's moat is not in detection logic (ModSecurity + OWASP CRS are standard) but in the containment topology: two-host, one-way, age-encrypted, fanotify-guarded. No other open product combines all five properties.
Backends
Two sandbox backends, one operator workflow:
| Backend | Isolation Level | Best For | Status |
|---|---|---|---|
| Docker | AppArmor + seccomp + tmpfs + internal net | Quick analysis, CI/CD integration, laptop demos | ✅ Production-ready |
| Firecracker | Micro-VM + jailer + nftables + snapshot/reset | High-confidence isolation, repeatable analysis, hardware-level containment | ✅ Complete |
The Firecracker backend supports three boot modes: cold-boot (fresh kernel + rootfs each time), rootfs-reset (recreate writable layer from a clean snapshot), and native-snapshot (restore memory + disk from a known state for sub-second boot). Boot policy is configurable through the TUI or CLI.
Roadmap
| Milestone | Status |
|---|---|
| Docker backend (compose + AppArmor + bpftrace) | ✅ Complete |
| waf-extractor sample shipper | ✅ Complete |
| waf-sink-guard (fanotify + allowlist) | ✅ Complete |
| waf-deploy ratatui TUI | ✅ Complete |
| Firecracker backend (VM lifecycle + snapshot/reset) | ✅ Complete |
| Honeypot mode (brokered public ingress) | ⬜ Not started |
| aya eBPF (Rust-native bpftrace replacement) | ⬜ Planned |
| gVisor runtime option | ⬜ Planned |
Build & Deploy
# Build all crates
cargo build --release --workspace
# Run tests
cargo test --workspace
# Generate deployment artifacts (TUI)
cargo run -p waf-deploy
# Headless generation (Firecracker, dry-run)
cargo run -p waf-deploy -- \
--backend firecracker \
--mode analysis \
--dry-run
# Run the sink with age encryption
cargo run -p waf-sink -- \
--udp 0.0.0.0:5514 \
--tcp 0.0.0.0:5515 \
--out /var/lib/waf-sink \
--recipient age1...
Prerequisites: Rust edition 2021, libmodsecurity3, pkg-config.
Why Not a Kernel Module?
Every capability the sandbox needs is already in-kernel behind safer interfaces. An out-of-tree kernel module would add ring-0 attack surface — the opposite of what a containment project should do.
| Capability | Mechanism |
|---|---|
| Observe syscalls | eBPF tracepoints / fentry |
| Observe file writes | eBPF vfs_write / fanotify |
| Observe executed processes | eBPF sched_process_exec |
| Block specific syscalls | BPF LSM (kernel ≥5.7) or seccomp |
| Capability stripping | cap_drop: [ALL] + seccomp default-deny |
| Network containment | netns + nftables default-drop |
Further Reading
- Architecture doc —
products/detcordon/doc/architecture.md(mermaid topology + dataflow + sequence diagrams) - AGENTS.md — full developer documentation, environment variables, wire formats, coordination protocol
- Firecracker plan —
doc/firecracker-plan.md: VM lifecycle, snapshot/reset, boot policy - Slide deck —
doc/presentation.html: impress.js narrated walkthrough (12 slides) - RAGBAZ Atlas — doc.ragbaz.cc/docs/products/detcordon