Skip to main content

DetCordon

Path: products/detcordon · Lifecycle: active prototype · Rust workspace

DetCordon is a containment-first malware observation environment — a deliberately isolated detonation sandbox for web malware (PHP webshells, HTTP-delivered exploits, scanner-driven RCE payloads). It observes hostile web traffic in a disposable sandbox, captures sample bodies, ships them one-way to a separate sink host, and stores them age-encrypted for offline analysis.

It does not block malware inline — attackers must "succeed" to be observed.


Architecture

DetCordon is split across two physically separate hosts with a strict one-way data flow:

Data flow

  1. Attacker sends HTTP request to the waf tap (ModSecurity + OWASP CRS, DetectionOnly mode)
  2. waf forwards the request to the victim — never blocks
  3. Victim writes sample files to tmpfs (its only writable storage)
  4. waf-extractor detects new files, ships them over TCP to the sink (write-only)
  5. waf emits UDP JSON events with ModSec hits, headers, body
  6. waf-sink receives events (UDP) and samples (TCP), age-encrypts samples, stores by sha256
  7. waf-sink-guard monitors every write via fanotify, validates against sha256 allowlist
  8. Analyst retrieves samples via scp, decrypts offline with age private key

Crates

CrateRuns OnPurpose
wafSandbox VMHTTP reverse-proxy tap, DetectionOnly ModSec + CRS, UDP telemetry
waf-extractorSandbox VMWatches victim tmpfs, ships samples over TCP (write-only)
waf-sinkSink hostUDP event receiver + TCP sample receiver, age-encrypts, sha256 storage
waf-sink-guardSink hostfanotify write auditor + sha256 allowlist, alerts on unknown writes
waf-vm-supervisorSandbox hostFirecracker lifecycle manager with boot policy (cold/rootfs-reset/native-snapshot)
waf-deployOperatorratatui TUI + headless CLI that generates deployment artifacts
waf-brokerSink hostMulti-sensor heartbeat collector and status endpoint
waf-ebpfSandbox VMAya-based, cgroup-scoped telemetry sidecar (active development)

Deployment artifacts (waf-deploy)

  • sandbox/docker-compose.yml (waf + victim + extractor)
  • sandbox/apparmor/*.profile (3 profiles)
  • sandbox/scripts/install-host-hardening.sh
  • sandbox/ebpf/trace.bt (bpftrace)
  • sink/systemd/waf-sink.service, waf-sink-guard.service
  • sink/allowlist.txt

Security model: 10 non-negotiable rules

#RuleRationale
1Victim bind-mounts nothing from hostSample bytes never touch the VM's real filesystem
2Victim network internal: true, default-drop egressSandbox can't be used as a launchpad
3WAF in DetectionOnlyMalware must succeed to be observed
4Samples leave write-only (TCP), events leave UDPNo inbound channel for C2
5Sink stores samples/<sha256>, mode 0400, no extensionPrevents accidental execution
6Sink-guard always-on with up-to-date allowlistUnknown write on sink = incident
7eBPF host-pid is opt-in; default cgroup-scopedBounds sidecar blast radius
8Time-boxed (default 30 min)Limits blast radius
9Sample bytes never over UDPUDP loss acceptable only for events
10Sink host ≠ sandbox host (different machine)Kernel isolation

Why no kernel module

The project deliberately avoids out-of-tree kernel modules. Everything is in-kernel behind safer interfaces:

GoalMechanism
Observe syscallseBPF tracepoints / fentry
Observe file writeseBPF vfs_write / fanotify
Observe exec'd processeseBPF sched_process_exec
Observe outbound socketseBPF tcp_connect
Block syscallsBPF LSM (kernel ≥5.7) or seccomp
Capability strippingcap_drop: [ALL], seccomp default
File constraintsAppArmor
Network containmentnetns + nftables default-drop
Strong isolationgVisor / Kata / Firecracker (runtime swap)

Build and run

# Build workspace
cargo build --release

# Run all tests
cargo test --workspace

# Generate deployment artifacts (TUI)
cargo run -p waf-deploy

# Headless artifact generation
cargo run -p waf-deploy -- --backend firecracker --dry-run

# Run the HTTP tap
SINK_ADDR=<ip>:5514 UPSTREAM=http://... cargo run -p waf

# Run the sink
cargo run -p waf-sink -- --recipient age1...

# Run the guard (needs root)
sudo cargo run -p waf-sink-guard -- --watch /var/lib/waf-sink

# Run the VM supervisor
cargo run -p waf-vm-supervisor -- --plan

Prerequisites: libmodsecurity3, libmodsecurity-dev, pkg-config, Rust 2021 edition.


Roadmap

StreamStatus
Docker backend (compose + AppArmor + bpftrace)Implemented
waf-extractor sample shipperImplemented
waf-sink-guard (fanotify + allowlist)Implemented
waf-deploy ratatui TUIImplemented
Firecracker backend (VM lifecycle + snapshot/reset)Implemented; base-image polish remains
Honeypot mode and sensor brokerImplemented
Aya eBPF (Rust bpftrace replacement)In progress
gVisor runtime optionPlanned

Commercial position

Strongest standalone non-Articulate product candidate in /data/src.

Estimated total business value: $0.80M–$2.50M (medium confidence).

Feature GroupShareValue
Sandbox tap + detection telemetry35%$0.28M–$0.88M
Sample extraction + sink + integrity guard40%$0.32M–$1.00M
Deploy TUI + containment automation25%$0.20M–$0.63M

Best capitalization: produce one pilot-ready story — "stand up a contained web-malware detonation lane in a day."


Further reading

  • DetCordon prospectus — buyer-facing positioning and packaging snapshot

  • AGENTS.md — full architecture, environment variables, coordination protocol

  • doc/architecture.md — topology diagrams, dataflow, crate maps

  • doc/firecracker-plan.md — Firecracker backend implementation plan

  • doc/presentation.html — impress.js slide deck

  • ragbaz.component.json — RAGBAZ component manifest with capabilities, config knobs, security model