Skip to content

What is vulnboxd? ​

vulnboxd is a defence kit for attack-defense CTFs. It has two halves:

  • On the vulnbox, it takes care of your services: sets the box up in one go, deploys your patches at the end of each tick, filters the traffic that reaches the services, and rolls back what breaks.
  • On your team's own server, the hub shows the whole team what is happening: every connection to the box, who is stealing flags, what each attack made the service do, and the buttons to answer it.

The first half works on its own in minutes. The second is optional and adds analysis on top. vulnboxd is purely defensive: it never attacks or submits flags.

The parts of vulnboxd On the vulnbox, traffic from the game network reaches vulnboxd, which applies the rules and forwards it to the service containers on loopback. vulnboxd talks to the git remotes, the gameserver, Discord and Prometheus; vulnboxctl drives it by hand. Optionally, the capture broker, the host sensor and vulnboxd's own state feed vulnboxd-agent, which sends everything over TLS to the team's hub: ingest stores the raw capture in the segment store, assemble and link turn it into flows in ClickHouse, the alert worker raises alerts from them, and the api serves the web UI to the team. Rule pushes, hook proposals, shells and the volume and database browsers go back from the hub to the agent. Game networkcheckerattackerson the vulnboxvulnboxdproxy + rulesdiscovery, deploysgit, rollback, bisectalerts, metricsService containersyour compose files,unchanged, on loopbackruntime hooks(optional)vulnboxctlsetup, compose, topvulnboxd-pcapcapture brokervulnboxd-sensoreBPF, read-onlyvulnboxd-agentspool on disk · rule pushes · hook proposalscontainers, shells · volume and database browserOutsidegit remotes (GitHub, GitLab)gameserver: checker verdictsDiscord webhookPrometheusyour team's hub (optional)ingestsegmentstorelinkassembleClickHouseapi + web UIfor your teamalertwebhookswatchescapturehost eventsstate, rule hitsTLS 1.3 · pushes back
vulnboxd alone covers the top row. The capture broker, the sensor, the agent and the hub are optional and can be added later.

On the vulnbox ​

Setup in one go. At the start of a game, vulnboxctl setup-interactive gives every service a git repository and a private GitHub or GitLab repository with its own deploy key, writes the capture tools' configuration, and installs vulnboxd. It is safe to run again.

It knows the game. A game mode for FAUST CTF or the ECSC brings the flag format, the tick timing and the vulnbox address, and reads the checker's verdict on each service from the gameserver.

It deploys your patches. vulnboxd polls each service's repository, builds the new version while the old one keeps serving, and swaps the containers in the last seconds of the tick. While a container restarts, the proxy holds new connections instead of refusing them, so a slow deploy is a slow request, not a failed check. See Deploys.

It filters the traffic. Every public port moves behind vulnboxd's proxy, which applies the rules in the service's vulnboxd-rules.yml: block, rewrite, stall, route or log TCP, UDP, HTTP (with h2c, gRPC and WebSockets), FTP and DNS, matched as the data streams by. Rules are edited through git and reload within a second; a bypass header lets your own exploits through. See Rules.

Where vulnboxd sits Traffic from the game network reaches the public port, which vulnboxd now holds. It applies the incoming rules, forwards to the container on a loopback port, and applies the outgoing rules to the answer. Game networkcheckerattackersvulnboxd:8080public portrulesin: blockrewrite, routeout: blockrewrite, redactContainer127.0.0.1:20000unchanged compose+ generated override
The public port moves into vulnboxd; the container keeps running as before, on loopback.

It undoes what breaks. A version that does not come up, or after which the checker says down, is rolled back with a pushed commit. When many commits landed since the last good version, a deploy bisect finds the bad one and reverts only that.

It tells you. Alerts go to a Discord webhook when a port stops answering, the checker says down, a deploy fails or something is rolled back. vulnboxctl top and Prometheus metrics show which rules fire.

It can capture. The capture broker serves the box's packets live over PCAP-over-IP, to the hub or to tools like Tulip.

In the hub ​

The hub is a web UI for the whole team, fed by an agent on the vulnbox:

  • Flows: every connection reassembled and decoded (HTTP, HTTP/2, WebSockets, gRPC and Connect, the common database protocols), searchable and filterable, with deliberate obfuscation flagged.
  • Attacks: flags leaving the box to anyone but the checker, as they happen.
  • Host monitoring: with the host sensor, what each request made the service do (the shell it started, the file it read, the query it sent), linked exactly, never by timing.
  • Alerts: the hub learns each service's normal behaviour from the checker and tells you when a request makes it do something else.
  • Answers: rules drafted from an attack, previewed against the last 20 ticks and pushed to the box; exploit scripts from captured flows; shells and logs and a volume and database browser without SSH.
  • Runtime hooks: for services where one process serves many requests, the hub proposes a small hook per container, which a player approves (Hook proposals).

The programs ​

ProgramWhereWhat it doesNeeded?
vulnboxdvulnboxthe daemon: proxy and rules, deploys, rollback, bisect, alerts, metricsyes
vulnboxctlvulnboxsetup, compose, top, rollback, bisect, upgradeyes
vulnboxd-pcapvulnboxthe capture brokerfor the hub or capture tools
vulnboxd-agentvulnboxconnects the box to the hubfor the hub
vulnboxd-sensorvulnboxwatches the services' processes with eBPF, read-onlyfor host monitoring
vulnboxd-hubyour clusterthe hub: ingest, assembly, linking, alerts, web UIfor the hub
runtime hooksin the servicestell the sensor which request did whatoptional

Each optional part runs on its own: when one is off or down, everything else carries on as before.

What it does not do ​

Worth knowing before you put it on a box ten minutes before a game:

  • No attacking. No exploits, no flag submission. The hub's script generator writes a script from flows you captured, but running it is up to you.
  • No host hardening. It does not firewall the box, manage users or patch packages. It filters the ports your services publish, and nothing else.
  • No changes without you. The hub proposes hooks and drafts rules; a player approves every push. Only vulnboxd's own rollbacks act by themselves (and bisects, if you turn that on).
  • GitHub- or GitLab-shaped setup. init creates repositories on GitHub or a GitLab. Any other remote works, but you point origin at it yourself.
  • One box. vulnboxd manages the services on the machine it runs on.
  • x86_64 releases. Built for glibc on x86_64; anything else is a cargo build --release away.

Next steps ​