Skip to content

Configuration ​

vulnboxd reads /etc/vulnboxd/config.yml, or the file given with -c. The file is optional: without it, every setting has its default. Unknown keys are errors, so a typo is reported rather than ignored.

Durations are written like 500ms, 10s, 2m or 1h 30m. Sizes here are plain byte counts, except pcap.buffer_mb, which is megabytes, and the sizes in agent, which also take K, M, G and T (powers of 1024). Sizes in a rules file take K, M and G — see larger_than.

Complete example ​

These are the defaults, with every key spelled out:

yaml
services_dir: /srv
exclude: []
rules_file: vulnboxd-rules.yml
state_dir: /var/lib/vulnboxd
listen: "::"
backend_port_base: 20000
poll_interval: 10s
git:
  remote: origin
  branch: main
metrics: 127.0.0.1:9330
bypass: {}
webhook_url: ""

game:
  mode: GENERIC
  team: null
  gameserver: ""
  poll: 15s
  services: {}

flag: null

tick:
  start: 1970-01-01T00:00:00Z
  interval: 60s
  window: 5s

deploy:
  stop_timeout: 1s
  grace: 15s
  health_timeout: 30s
  build_timeout: 15m
  up_timeout: 2m

rollback:
  enabled: true
  consecutive: 2
  when: now
  bisect:
    auto: false
    min_commits: 2
    max_commits: 64
    max_steps: 8
    max_time: 30m
    max_culprits: 3
    verdict: auto
    confirm: true
  services: {}

monitor:
  interval: 10s
  failures: 3

inventory:
  enabled: true
  interval: 30s

docker:
  api: true
  socket: ""
  timeout: 10s
  events: true

request_log: true

pcap:
  enabled: false
  listen: 127.0.0.1:4242
  interface: any
  interfaces: []
  ports: null
  filter: ""
  command: ""
  buffer_mb: 64
  metrics: 127.0.0.1:9332

agent:
  enabled: false
  hub: ""
  mode: connect
  listen: "[::]:7443"
  cert: /etc/vulnboxd/agent.crt
  key: /etc/vulnboxd/agent.key
  hub_cert: /etc/vulnboxd/hub.crt
  dir: /var/lib/vulnboxd/spool
  max_size: null
  min_free: null
  memory: 64M
  rule_push: true
  rule_push_deny: []
  rule_push_bypass: true
  rule_push_rate: null
  sensor: true
  sensor_socket: null
  file_pull: true
  file_pull_max: 16M
  service_files: true
  file_push: true
  file_push_allow: ["**"]
  file_push_deny: []
  file_push_rate: null
  containers: true
  container_restart: true
  shell: true
  shell_sessions: 8
  shell_idle: 900
  browser_files: true
  browser_db: true
  browser_db_writes: true
  browser_sessions: 8
  browser_running: 4
  browser_timeout: 10
  browser_max_timeout: 60
  browser_idle: 600
  browser_sqlite_max: 256M
  browser_adminer: true
  browser_adminer_image: docker.io/library/adminer:6.1.2@sha256:49a7d30e71de97fb18933ffe7d46cc2b343c49fd7a63a7791c8be2548eb65115
  browser_adminer_idle: 600
  metrics: 127.0.0.1:9331

sensor:
  enabled: false
  socket: null
  interval: 1s
  ring_buffer: 8M
  rate_limit: 5000
  max_rollup_keys: 65536
  queue: 65536
  disable: []
  jit: []
  usdt_providers: [vbxtrace]
  dns: true
  tls: true
  tls_payload_bytes: 0
  tls_rate_limit: 1000
  cgroups: []
  object: null
  metrics: 127.0.0.1:9333

upgrade:
  from: gitlab
  repo: nirvati-ug/ctf-garden/vulnboxd
  gitlab_url: ""
  token: ""
  drain: 30s

timeouts:
  idle: 2m
  http_request: 30s
  stall: 1m

limits:
  buffered_body: 8388608
  buffered_total: 268435456
  buffered_connection: 33554432
  stalled: 256
  connections: 4096
  udp_sessions: 4096

init:
  github_owner: ""
  github_token: ""
  gitlab_owner: ""
  gitlab_token: ""
  gitlab_url: ""
  repo_prefix: service-
  ssh_dir: /root/.ssh/vulnboxd
  max_file_size: 524288000
  vulnbox_ip: ""
  capture_dir: .
  webhook_url: ""

Services ​

services_dir ​

  • Default: /srv

The directory holding one directory per service, each with a compose file. Can be overridden on the command line with --services-dir.

exclude ​

  • Default: []

Names of service directories to leave alone entirely.

rules_file ​

  • Default: vulnboxd-rules.yml

The name of the rules file inside each service directory.

state_dir ​

  • Default: /var/lib/vulnboxd

Where vulnboxd keeps its state: the generated compose overrides (<state_dir>/<service>/compose.override.yml, layered after the service's own compose files and override), the backend port assignments, each service's rollback history (<service>/history.json), where each service's deploy is at for the agent (<service>/deploy.json: building, waiting for the window, deploying, or failed and why), the rule hits the agent sends to the hub (rule-hits.jsonl), the container inventory (inventory.json) and the request log (requests.jsonl) it sends too, the lock that makes one daemon the manager (manager.lock), the upgrade request (upgrade-pending) while one is waiting, and the secret that encrypted flags are keyed with.

Network ​

listen ​

  • Default: "::"

The address the proxies listen on. :: is every address; on Linux it accepts ipv4 connections too. Set 0.0.0.0 for ipv4 only, or a specific address to listen on one interface.

backend_port_base ​

  • Default: 20000

Intercepted containers are republished on loopback ports counting up from here. Assignments are remembered in state_dir, so a service keeps its ports across restarts.

Keep this below the kernel's ephemeral range, cat /proc/sys/net/ipv4/ip_local_port_range, usually from 32768. A port inside it can be handed to an outgoing connection as its source port, and docker then cannot publish the container there at all: the deploy fails with "address already in use", which SO_REUSEADDR does not help with. vulnboxd asks the kernel to keep any backend port that does fall inside the range out of it, through ip_local_reserved_ports, and drops a connection that is holding one when a deploy needs it. Staying below the range needs neither.

A box already running keeps the assignments it has, so changing this does not move a service that is up. Deleting backends.json from state_dir reassigns every port from the new base, at the cost of one redeploy of each service in the next window.

metrics ​

  • Default: 127.0.0.1:9330

Where Prometheus metrics are served, and what vulnboxctl top reads. null turns them off.

DANGER

Keep this on localhost. The numbers say which rules are firing, which is exactly what an attacker would like to know.

bypass ​

  • Default: {}

Headers with exact values, as {header: value}, that let an http request skip every rule of every service. The headers are removed before the request reaches the service, and values need at least 12 characters. A service's rules file can set its own bypass as well; a request that matches either one is let through. See testing your own exploits.

yaml
bypass:
  x-team-bypass: Qm8vT3kX9rWz4LpA

webhook_url ​

  • Default: empty

A Discord-compatible webhook that alerts are posted to: ports that stop answering, checker verdicts, failed builds and deploys, rollbacks, broken rules files. Empty sends none.

The game ​

game ​

  • Default: mode: GENERIC

The game being played. A game mode fills in the flag format, the timing and the vulnbox address, and with team set, reads the checker's verdicts from the gameserver.

keydefault
modeGENERICGENERIC, FAUST_2026 or ECSC_2026
teamyour team's number on the gameserver
gameserverthe mode'swhere the gameserver is
poll15show often the verdicts are read
services{}service directory to scoreboard name, where they are not alike

flag ​

  • Default: the game mode's, or none

The game's flag format, which rules write as {flag}. Written as the game states it; anchors and slashes are dropped, since flags are found inside traffic:

yaml
flag: 'FAUST_[A-Za-z0-9/+]{32}'

vulnboxd works out what encryption needs from it: the part between the fixed text at either end is what gets encrypted, with the characters of its class as the alphabet. To say so yourself, give a capture group around the part to encrypt, an alphabet, and the marker an encrypted flag is stored behind:

yaml
flag:
  pattern: 'flag_([0-9a-f]{32})'
  alphabet: 0123456789abcdef
  stored_prefix: ENCRYPTED_FLAG_
keydefault
patternthe game's flag format, as the game states it
alphabetthe characters of the varying partwhich characters encryption may use
stored_prefixENCRYPTED_FLAG_what a stored flag is written behind, so it cannot be handed in as a flag. A shorter one keeps what the service holds closer to the length it expects

Timing ​

poll_interval ​

  • Default: 10s

How often each service's git repository is fetched for new commits.

git ​

  • Default: {remote: origin, branch: main}

Which remote and branch git sync follows. git.remote is the remote's name. Its address is vulnboxd's own record (written by vulnboxctl init, or at the first sync of a repository) and is changed with vulnboxctl git-remote. git.branch is the branch that is pulled, deployed and pushed. A checkout on another branch is not synced, and an alert says so. Both are taken from here rather than from a repository's own .git/config, which a container that can write the service's directory could change. See what vulnboxd does not take from the repository.

tick.start ​

  • Default: 1970-01-01T00:00:00Z, or the game mode's

The start of any tick, as an RFC 3339 timestamp. All ticks are aligned to it, so set it to when the game began. See lining up with the game.

Left at the 1970 default (and with no game mode that sets it), vulnboxd tells the hub nothing about ticks: flows then have no tick, the hub's tick ranges and timeline stay empty, and the "suspected checker" classification, which counts per tick, does not work. Set it for a game with the hub.

tick.interval ​

  • Default: 60s, or the game mode's

How long a tick lasts.

tick.window ​

  • Default: 5s

The end of each tick in which vulnboxd restarts services and end_of_tick applies. Must be shorter than the tick. This is vulnboxd's own window; if your game defines one, as the ECSC does, set it to match.

Deploys ​

deploy.stop_timeout ​

  • Default: 1s

How long a container being replaced gets to shut down before it is killed. Most services run their app as pid 1, where SIGTERM is ignored, so waiting longer usually only wastes the window. See services that stop slowly.

deploy.grace ​

  • Default: 15s

How long the proxy keeps retrying a service that is not listening, so a deploy that runs over its window shows up as a slow request rather than a failed one.

deploy.health_timeout ​

  • Default: 30s

How long a deployed service gets to have its containers running and every tcp port answering. A new version that never answers in that time is rolled back. One that answered and then went down gets a second look as long, and is alerted, not rolled back.

deploy.build_timeout ​

  • Default: 15m

How long building a new version (docker compose build and pull together) may take. Past it the build is killed with everything it started and counts as a failed build: the running version stays.

deploy.up_timeout ​

  • Default: 2m, plus deploy.stop_timeout

How long docker compose up may take in a deploy. Past it the command is killed with everything it started and the deploy counts as failed, so the usual checks and the rollback run. Other compose commands are limited to 10 minutes, docker compose ps to 60 s.

Rollback ​

rollback ​

  • Default: enabled: true, consecutive: 2, when: now

When vulnboxd undoes a change by itself, with a pushed commit, because the service stopped working after it. See Rollback for what each setting does and when to change it.

yaml
rollback:
  enabled: true
  consecutive: 2           # Down verdicts in a row; 1 lets an attacker's one-tick crash revert your newest change
  when: now
  services:
    notes: { consecutive: 3 }
    legacy: { enabled: false }

rollback.bisect ​

  • Default: auto: false, min_commits: 2, max_commits: 64, max_steps: 8, max_time: 30m, max_culprits: 3, verdict: auto, confirm: true

Looking for the commit that broke a service among several and reverting only that one, instead of rolling all of them back. See Bisecting for how it works and what it costs.

settingdefault
autofalsestart a bisect by itself after a rollback that undid at least min_commits commits. vulnboxctl bisect and the hub start one by hand either way
min_commits2at least 2: with one commit, the rollback already is the answer
max_commits64the most commits a bisect looks at (at most 256); a longer range stays rolled back as a whole
max_steps8test deploys, and checks of the result, before it gives up and puts back the newest version it saw working (1 to 32)
max_time30mhow long one bisect may take in all, the same way
max_culprits3bad commits it looks for: after reverting one, the rest is checked again (1 to 10)
verdictautowhat judges a version: health (vulnboxd's health check), checker (the health check, then the checker's verdict for a tick it was live for), or auto — the checker when the checker started it and there is a game, the health check otherwise
confirmtruecheck a version that looked bad a second time before believing it

rollback.services.<name>.bisect turns auto on or off for one service.

yaml
rollback:
  bisect:
    auto: true
    max_steps: 6
  services:
    legacy: { bisect: false }

Monitoring ​

monitor.interval ​

  • Default: 10s

How often every tcp port of every service is checked for answering. See port checks.

monitor.failures ​

  • Default: 3

Checks in a row a port has to miss before it counts as down and is alerted.

inventory ​

  • Default: on, refreshed every 30s

<state_dir>/inventory.json: what runs where, for the agent to send to the hub and for the host sensor to filter on. For every service's containers: the compose service, image, main process, cgroup (path and id), each network with its addresses and the host bridge it is on (name and interface index), published and declared ports, mounts with whether they are writable, and the container's root filesystem on the host. For every proxied port: which container serves it and how docker carries the loopback hop into it (docker-proxy or dnat). And the host interfaces the capture can see — loopback, the public interface, every service bridge — by interface index, which is how a packet from a capture of several interfaces is told apart.

It is refreshed after every deploy, every interval, and when Docker reports a container starting, dying or changing health (docker.events), from the containers docker compose ps would list, their docker inspect (both through the Docker API, with a timeout) and /proc; the file is rewritten (atomically, with the daemon's pid, like deploy.json) only when something in it changed. vulnboxctl inventory prints it.

yaml
inventory:
  enabled: true
  interval: 30s

docker ​

  • Default: api: true, socket empty, timeout: 10s, events: true

How vulnboxd talks to Docker for the plain Docker calls: a service's containers with their state and health (what docker compose ps lists, found by the compose project's labels), docker inspect of containers and networks for the inventory, the daemon's version for vulnboxctl install, and the event stream. These go to the Engine API over the socket, which is faster than running the CLI and has timeouts per request. docker compose itself — build, pull, up, down, config — always runs as the CLI, through the compose guard.

When the API cannot answer (it is off, the socket is missing, a request fails or times out), vulnboxd runs the CLI exactly as before, says so in its log now and then, and counts it in vulnboxd_docker_api_fallbacks_total; nothing else changes.

settingdefault
apitruefalse runs the docker CLI for everything, as before
socketemptythe daemon's unix socket. Empty takes DOCKER_HOST when it is a unix:// address, and /var/run/docker.sock otherwise. A DOCKER_HOST that is not a unix socket, or a DOCKER_CONTEXT, leaves everything to the CLI, so both always talk to the same daemon
timeout10sthe longest one request may take, its answer read; at least 1s
eventstruerefresh the inventory when a container starts, dies, restarts or changes health, besides every inventory.interval
yaml
docker:
  api: true
  timeout: 10s

request_log ​

  • Default: true

<state_dir>/requests.jsonl: one line per proxied HTTP request, and one per TCP connection or UDP session, saying which connection to the service carried it. The proxy keeps its connections to the services in a pool, so a request's backend connection may have carried other clients' requests before; this log is the exact link between the client's connection (its address and the request's place on it) and the backend connection (the proxy's source port towards the service, and the request's place on that one). Each line also has the method and path (cut to 512 bytes), the status, the bytes each way, and the rules that reported on it. Where docker forwards the backend port by DNAT rather than its userland proxy, the line also says how the container's bridge sees the connection (nat), from conntrack. See internal traffic.

Written like the rule-hit log: by a thread of its own from a bounded queue, so a flood is dropped and counted (vulnboxd_request_log_dropped_total) rather than slowing the proxy; moved aside to requests.jsonl.1 at 64 MiB, so it never takes more than twice that.

Capture ​

pcap ​

  • Default: off

The capture broker: captures every packet the box sees and serves it over PCAP-over-IP, so tools like tulip and shovel read it live. It runs as its own service, vulnboxd-pcap.

yaml
pcap:
  enabled: true
  listen: 127.0.0.1:4242   # readers connect here; keep it off the public internet
  interface: any           # which interface to capture
  interfaces: []           # several interfaces as one stream, e.g. [eth0, lo, bridges]
  ports: 9000,9100-9200    # only these ports; empty captures every one
  filter: not (src host 10.60.13.2 and tcp src port 22) and not (dst host 10.60.13.2 and tcp dst port 22)
  command: ""              # the whole capture command, when the above is not enough
  buffer_mb: 64            # how far behind one reader may fall before it is disconnected
keydefault
pcap.enabledfalserun it at all. vulnboxctl install writes the unit when this is set
pcap.listen127.0.0.1:4242where readers connect. Bound to anything but loopback (every address, or a game address every team can reach), the broker warns when it starts
pcap.interfaceanywhich interface to capture, when interfaces is empty
pcap.interfaces[]capture several interfaces as one LINUX_SLL2 stream that says which interface each packet was seen on: interface names, lo (only the backend ports) and bridges (every service's docker bridge, followed as they come and go). See internal traffic. Cannot hold any, or be combined with command
pcap.portsthe game mode'ssingle ports and ranges in any mix: 9000, 9000-9999, 9000,9100-9200,8000. Empty captures every port. IPv4 fragments and IPv6 packets with extension headers are captured whatever their ports, since the filter cannot see ports past them
pcap.filtera pcap filter for what to leave out. Name the box's own side (not (dst host <box> and tcp dst port 22) and its src twin), never not port 22, which also drops attackers' traffic from source port 22; see leave out by direction
pcap.commandthe whole capture command, which must write classic pcap to its output
pcap.buffer_mb64how far behind one reader may fall before it is disconnected
pcap.metrics127.0.0.1:9332where the broker serves its own metrics and debug pages; null turns them off. --metrics overrides it

What you set for ports wins over the game mode's. With interfaces, ports narrows only the interfaces named outright (the public one): loopback is narrowed to the backend ports instead, and bridges are captured on every port, so the hops between containers are kept whatever port they use. The broker's own listen address is always excluded from the capture, whatever is set here; a command of your own replaces all of it and has to keep its own traffic out itself. See what ends up in the capture.

Traffic analysis ​

agent ​

  • Default: off

vulnboxd-agent: sends the capture and what vulnboxd is doing to your team's hub, and applies the rule pushes it sends. It runs as its own service, vulnboxd-agent, and reads the capture from the broker, so pcap has to be on as well.

yaml
agent:
  enabled: true
  hub: hub-ingest.example.org:7443   # the hub's ingest address
  max_size: 4G                       # the most the spool keeps on disk
  rule_push_deny: [route, mirror]    # rule keys the hub may not add or change
  rule_push_bypass: false            # the hub may not change bypass headers
keydefault
agent.enabledfalserun it at all. vulnboxctl install writes the unit when this is set
agent.hubthe hub's ingest address, host:port. Needed in connect mode
agent.modeconnectconnect dials the hub; listen waits for the hub to dial in
agent.listen[::]:7443where the hub connects, in listen mode
agent.cert/etc/vulnboxd/agent.crtthe agent's certificate, from vulnboxd-agent keygen
agent.key/etc/vulnboxd/agent.keyits key
agent.hub_cert/etc/vulnboxd/hub.crtthe hub's certificate, the only one the agent talks to
agent.dir/var/lib/vulnboxd/spoolthe spool's own directory
agent.max_sizethe smaller of 1 GiB and 5% of the filesystemthe most the spool keeps on disk; 0 keeps it in memory only
agent.min_freethe larger of 2 GiB and 10% of the filesystemwhat the spool always leaves free on the filesystem
agent.memory64Mthe most the spool keeps in memory when the disk is not used
agent.rule_pushtrueaccept rule pushes from the hub at all
agent.rule_push_deny[]rule keys the hub may not add or change
agent.rule_push_bypasstrueaccept changes to a rules file's bypass headers
agent.rule_push_rateno limitthe most pushes accepted in a minute
agent.sensortruetake host events from vulnboxd-sensor
agent.sensor_socket<state_dir>/sensor.sockwhere the agent listens for the sensor
agent.file_pulltruepull files out of the services' containers when the hub asks
agent.file_pull_max16Mthe most read of one pulled file, at most 16M
agent.service_filestruesend the hub snapshots of the services' checkouts for hook proposals
agent.file_pushtrueaccept file pushes from the hub: commits to the services' checkouts
agent.file_push_allow["**"]the paths a file push may change, as globs relative to the service directory
agent.file_push_deny[]paths a file push may not change even if file_push_allow matches them
agent.file_push_rateno limitthe most file pushes accepted in a minute
agent.containerstrueshow the hub the containers live, their logs and docker inspect
agent.container_restarttruelet the hub restart a service's container
agent.shelltruelet the hub open interactive shells in the services' containers
agent.shell_sessions8shells open at once, 1 to 64
agent.shell_idle900seconds without input before a shell is ended, 10 to 86400
agent.browser_filestruelet the hub list and read the containers' files (volume browser)
agent.browser_dbtruelet the hub open sessions to the services' databases (database browser, Adminer)
agent.browser_db_writestruelet a player ask for a database session that may write
agent.browser_sessions8database sessions open at once, 1 to 64
agent.browser_running4browsing requests worked on at once, 1 to 32; more are answered "busy"
agent.browser_timeout10a query's time limit unless the player sets one, in seconds
agent.browser_max_timeout60the longest a player may set, in seconds, at most 600
agent.browser_idle600seconds before an unused database session is closed
agent.browser_sqlite_max256Mthe largest SQLite file copied out of a container to be opened
agent.browser_adminertruelet the hub start the Adminer fallback
agent.browser_adminer_imageAdminer 6.1.2, by digestthe Adminer image, pinned by digest
agent.browser_adminer_idle600seconds without a request before Adminer is stopped
agent.metrics127.0.0.1:9331where the agent serves its own metrics and debug pages; null turns them off. --metrics overrides it

The settings are checked when the config is read, so a mistake is reported at once rather than when the agent starts.

agent.hub ​

  • Default: empty

Where the agent connects: the address of the hub's ingest Service, with its port, such as hub-ingest.example.org:7443 (the chart's port). Required with enabled: true in connect mode. The host name is not checked against the certificate, only the certificate itself, so the hub can move without new keys.

agent.mode ​

  • Default: connect

connect dials hub, retrying with a growing pause up to 30 seconds. listen listens on listen and waits for the hub's ingest to dial in, for a hub the vulnbox cannot reach; see when the hub cannot be reached. Either way there is one connection at a time, and the agent speaks first.

agent.cert, agent.key, agent.hub_cert ​

  • Default: /etc/vulnboxd/agent.crt, /etc/vulnboxd/agent.key, /etc/vulnboxd/hub.crt

PEM files. vulnboxd-agent keygen /etc/vulnboxd writes the first two where these defaults expect them; the hub's certificate comes from vulnboxd-hub keygen. Both sides pin each other's certificate over TLS 1.3, with no certificate authority. See exchange the keys.

agent.dir ​

  • Default: /var/lib/vulnboxd/spool

Where capture waits until the hub has it, along with how far the rule-hit log has been sent. The agent cleans up after itself in it, so it must be an absolute path to a directory of its own: not state_dir or services_dir, and not one that contains them.

agent.max_size, agent.min_free ​

  • Default: the smaller of 1 GiB and 5% of the filesystem; the larger of 2 GiB and 10% of it

Before every write the spool works out what it may use: the smaller of max_size and what it holds plus what is free, less min_free. Over that, the oldest segments are dropped first, and capture the hub never got is reported to it as a gap. max_size: 0 keeps the spool in memory only. See the spool.

yaml
agent:
  max_size: 20G
  min_free: 5G

agent.memory ​

  • Default: 64M

How much the spool holds in memory when it cannot use the disk: no budget left, or a write that failed. The disk is tried again 30 seconds later. Must be more than 0.

agent.rule_push ​

  • Default: true

Accept rule pushes from the hub at all. false refuses every one, and the hub shows them as refused; everything else the agent does carries on.

agent.rule_push_deny ​

  • Default: []

Rule keys a push may not add or change, from those listed under rule keys: name, enabled, dir, match, not, action, replace, set_status, set_body, set_headers, remove_headers, keep_headers, route and mirror. Anything else is an error. [route, mirror] keeps a compromised hub from sending traffic, flags and all, somewhere else.

A rule that uses a denied key may stay exactly as it is, under the same port, or be deleted; any push that adds such a rule or changes one while it keeps the key, even only switching it off, is refused. Taking the denied key out of a rule is allowed.

agent.rule_push_bypass ​

  • Default: true

Accept pushes that change a rules file's bypass headers. A bypass header lets a request skip every rule, so false keeps a compromised hub from opening a way past them.

agent.rule_push_rate ​

  • Default: no limit

The most pushes accepted in any minute; more are refused. At least 1: set rule_push: false to refuse every push. It bounds how fast a hub gone wrong can churn the rules and the Git history. The hub has its own limit of 6 a minute per user on top.

agent.sensor ​

  • Default: true

Take host events — processes started, files opened, connections made, crashes — from vulnboxd-sensor and send them to the hub with the capture. They share the spool and its budget with the capture. false leaves the socket closed; a sensor that runs anyway keeps retrying and drops what it cannot send.

agent.sensor_socket ​

  • Default: <state_dir>/sensor.sock

The unix socket the agent listens on for the sensor, created with mode 0600. A stale socket left there by an earlier run is replaced; anything else at that path is left alone and the agent takes no host events. Only a process of the agent's own user may connect. Must be an absolute path.

agent.file_pull ​

  • Default: true

Let the hub pull a file out of a running container of one of your services — an uploaded webshell, a dropped binary, a database the exploit changed. The agent reads it as root, so it is careful: the container must be one vulnboxd runs for that service, the path must be absolute and plain (no .., nothing under /proc, /sys or /dev), every symbolic link is resolved inside the container's root filesystem, and only regular files are read. Every pull is logged. false refuses every pull, which keeps a compromised hub from reading the containers' files, flags included.

agent.file_pull_max ​

  • Default: 16M

The most read of one pulled file; a larger file arrives cut short and marked as such. At most 16M, which is also the hub's limit.

agent.service_files ​

  • Default: true

Answer the hub's requests for a snapshot of a service's checkout, which its hook proposals start from: the file listing, the contents of the files it asks for (the compose files and .env always, within the protocol's limits), docker compose config for the service's own compose files without vulnboxd's port override, the commit and the uncommitted paths. Paths on the box are made relative to the service directory first. Symbolic links are listed, never followed, and nothing outside the service directory is read. false refuses every snapshot.

agent.file_push ​

  • Default: true

Accept file pushes from the hub: commits to a service's checkout, such as a hook proposal someone approved, or the revert of one. Each commit is made as whoever approved it on the hub, with vulnboxd as the committer, and they are pushed together. Nothing changes unless all of it can be done: every file a commit touches must be as it was at the commit the hub worked from and not edited in the checkout (otherwise it is a conflict), the compose files must still be YAML and docker compose config must accept the result (otherwise the files are put back). The rules file never changes this way: rules go through a rule push. false refuses every file push, which keeps a compromised hub from changing the services' code.

agent.file_push_allow, agent.file_push_deny ​

  • Default: ["**"], []

The paths a file push may change, relative to the service directory: one an allow glob matches and no deny glob does. * and ? match within a name, ** as a whole component any number of directories, and a glob without a / matches the name at any depth, as in .gitignore. A revert is held to the same globs for every file it changes. Paths outside the service directory, under .git or through a symbolic link are refused whatever these say.

yaml
agent:
  file_push_allow: ["*compose*.y*ml", "**/Dockerfile", "hooks/**"]
  file_push_deny: [".env"]

agent.file_push_rate ​

  • Default: no limit

The most file pushes accepted in any minute; more are refused. Only pushes that changed something count. At least 1: set file_push: false to refuse every push.

agent.bisect ​

  • Default: true

Let the hub start and stop a service's deploy bisect, as vulnboxctl bisect does. The agent leaves the request in vulnboxd's state directory, for a service vulnboxd manages only. false refuses them, which keeps a compromised hub from deploying old versions of the services.

agent.containers ​

  • Default: true

Answer the hub's container requests: the live overview (Docker's state, health, restart count, image digests, and resource use from each container's cgroup), docker inspect, and log tails. The agent reaches Docker through its API, on the same socket and with the same timeouts as vulnboxd itself. false refuses them all.

agent.container_restart ​

  • Default: true

Let the hub restart one of your services' containers (docker restart). Every restart is logged by the agent and audit-logged by the hub. false refuses them.

agent.shell ​

  • Default: true

Let the hub open interactive shells in your services' running containers (docker exec -it, carried over the agent's connection; nothing listens on the vulnbox). Every shell is logged here and recorded on the hub. When the hub's connection ends, every shell is ended and everything it started is killed. false refuses every shell, which keeps a compromised hub from running commands in the containers.

agent.shell_sessions ​

  • Default: 8

The most shells open at once, across all of the hub's users; 1 to 64.

agent.shell_idle ​

  • Default: 900

Seconds a shell may go without input before the agent ends it and kills what it started; the hub may ask for less (HUB_SHELL_IDLE), never more. 10 to 86400.

agent.browser_files ​

  • Default: true

Let the hub list the services' containers' files and read ranges of them for the volume browser, through each container's own root and with the file pulls' path rules. Every request is logged here and audit-logged on the hub. false refuses them, which keeps a compromised hub from reading the containers' files, flags included (file pulls have their own switch, file_pull).

agent.browser_db ​

  • Default: true

Let the hub open sessions to the services' own databases for the database browser and start Adminer. The agent connects only to the services' containers, from the vulnbox. false refuses every session and Adminer.

agent.browser_db_writes ​

  • Default: true

Sessions are read-only unless the player asks for writes when opening one; false refuses those requests, so every session is read-only. SQLite files are always opened from a read-only copy.

agent.browser_sessions ​

  • Default: 8

The most database sessions open at once, across all of the hub's players (one per player); 1 to 64.

agent.browser_running ​

  • Default: 4

The load cap: the most browsing requests (listings, reads, queries) the agent works on at once. A request beyond it is answered "busy" at once rather than queued; 1 to 32.

agent.browser_timeout ​

  • Default: 10

A query's time limit in seconds when the player sets none, given to the database where it takes one and enforced by the agent, which cancels the query and closes the session. At least 1 and at most browser_max_timeout.

agent.browser_max_timeout ​

  • Default: 60

The longest time limit a player may set for a query, in seconds; at most 600.

agent.browser_idle ​

  • Default: 600

Seconds after which a database session nobody used is closed; 10 to 86400.

agent.browser_sqlite_max ​

  • Default: 256M

The largest SQLite file the agent copies out of a container to open it (it never opens the service's own file, whose lock the service needs).

agent.browser_adminer ​

  • Default: true

Let the hub start the Adminer fallback: a container on a service's network, reached only through the agent's connection, with no port published. Needs browser_db and the docker command.

agent.browser_adminer_image ​

  • Default: docker.io/library/adminer:6.1.2@sha256:49a7d30e71de97fb18933ffe7d46cc2b343c49fd7a63a7791c8be2548eb65115

The Adminer image, which must be pinned by digest. The default is the version the end-to-end test confirms working; change it only to one that test passes with.

agent.browser_adminer_idle ​

  • Default: 600

Seconds without a request after which Adminer is stopped and its container removed; 10 to 86400.

agent.metrics ​

  • Default: 127.0.0.1:9331

Where vulnboxd-agent serves its own metrics — the uplink, the spool, the capture, rule pushes, and its process, runtime and tasks — with the debug pages next to them. null turns them off; the --metrics flag overrides it. pcap.metrics does the same for vulnboxd-pcap, on 127.0.0.1:9332 by default: the three sit next to each other, vulnboxd's own metrics on 9330.

DANGER

Keep it on localhost, like vulnboxd's: they name the hub, the services and how far behind the capture is.

Host sensor ​

sensor ​

  • Default: off
yaml
sensor:
  enabled: true

vulnboxd-sensor, which records what the services' processes do from the kernel (eBPF) and hands it to the agent. Optional and read-only; its own service, which vulnboxctl install writes when this is on. Needs Linux 5.8 or newer with BTF.

sensor.socket ​

  • Default: <state_dir>/sensor.sock

The agent's socket the events go to; the same as agent.sensor_socket. When the agent is not there the sensor keeps trying, drops what it cannot send, and tells the agent how much once it is back.

sensor.interval ​

  • Default: 1s

How often repeated events are rolled up into one, and the read/write counters read. At least 100ms.

sensor.ring_buffer ​

  • Default: 8M

The kernel's ring buffer the programs write to, rounded up to a power of two, between 64K and 1G. When it is full, events are dropped and counted (vulnboxd_sensor_kernel_dropped_total), never waited for.

sensor.rate_limit ​

  • Default: 5000

The most events a second one cgroup (container) may send, process starts and exits aside, for each of three budgets: syscall records, connects, and hook probes. Past it they are counted (vulnboxd_sensor_rate_limited_total) and dropped in the kernel, and the number held back reaches the hub as a lost event of that service (op: rate_limited). 0 for no limit.

sensor.max_rollup_keys ​

  • Default: 65536

The most event shapes (a process and what it did to which object) the roll-up keeps track of. Past it the quietest are forgotten, and their next occurrence is sent in full again.

sensor.queue ​

  • Default: 65536

The most events waiting for the agent; past it they are dropped and counted.

sensor.disable ​

  • Default: none

Groups of events to leave off: files, io (the read/write counters, including sendfile and splice, and the write bursts that attribute a pooled connection's queries to requests), network, tamper, privilege, exec_memory, crashes, seccomp, usdt. Process starts and exits cannot be left off: everything else hangs off them.

sensor.jit ​

  • Default: node, nodejs, bun, deno, java, dotnet, pypy, pypy3, luajit, openresty, nginx, php-fpm, php, ruby, beam.smp and a few more

Executables, by file name (a version suffix like php8.2 matches php), that make anonymous memory executable as a matter of course. Executable-memory events from them, and from what they fork, are not recorded — when the file came with the container: its change time is before the container's cgroup was made. A binary a request wrote or overwrote under one of these names, or a memfd, is recorded like anything else. Setting it replaces the list.

sensor.usdt_providers ​

  • Default: [vbxtrace]

USDT providers whose probes the sensor attaches to in the services' processes; "*" for any (libc has probes of its own, which fire often).

sensor.dns ​

  • Default: true

Record the name asked for in DNS queries sent over UDP, from the first bytes of the datagram.

sensor.tls ​

  • Default: true

Record the services' TLS plaintext reads and writes (OpenSSL and its forks, GnuTLS, Go's crypto/tls), joined to their connections; see TLS plaintext. Metadata only unless sensor.tls_payload_bytes is set.

sensor.tls_payload_bytes ​

  • Default: 0

Plaintext bytes kept per TLS read or write, at most 1023; 0 keeps metadata only (direction, byte count, connection). The plaintext can contain credentials; it is shown as it is.

sensor.tls_rate_limit ​

  • Default: 1000

Most TLS events a second one process may send; past it they are dropped. 0 for no limit.

sensor.cgroups ​

  • Default: none

More cgroups to watch besides the services' containers, relative to /sys/fs/cgroup (system.slice/legacy.service) or absolute.

sensor.object ​

  • Default: built in

The eBPF object to load, for a build without one built in (crates/sensor-ebpf/build.sh). Without either, /usr/local/lib/vulnboxd/vulnboxd-sensor.bpf.o.

sensor.metrics ​

  • Default: 127.0.0.1:9333

Where vulnboxd-sensor serves its own metrics and debug pages. null turns them off; --metrics overrides it. Keep it on localhost.

Upgrades ​

upgrade ​

  • Default: from: gitlab, repo: nirvati-ug/ctf-garden/vulnboxd

Where vulnboxctl upgrade fetches releases from: a project on gitlab.com or a GitLab of your own, or a repository on GitHub. A private repository needs token, one that can read it; VULNBOXD_UPGRADE_TOKEN in the environment takes precedence. A config file holding a token is written readable by root only.

yaml
upgrade:
  from: gitlab
  repo: geramy/tools/vulnboxd
  gitlab_url: https://gitlab.example.com
  token: glpat-...
  drain: 30s

A release on GitLab is found by the files linked to it, which is how vulnboxd's own pipeline publishes them: vulnboxd-x86_64-unknown-linux-gnu.tar.gz and its .sha256.

keydefault
upgrade.fromgitlabgitlab or github
upgrade.reponirvati-ug/ctf-garden/vulnboxdthe project's path on the GitLab, subgroups and all, or owner/name on GitHub
upgrade.gitlab_urlgitlab.comthe GitLab releases are fetched from
upgrade.tokena token that can read it, for a private repository. It is only sent to that GitLab, never to wherever a release links to
upgrade.drain30show long the daemon being replaced stays alive to finish the connections it already had open, while the new one serves everything else. 0 replaces it in place instead, which closes them

A drain needs a unit the daemon can tell systemd about; see the unit has to allow it.

Timeouts and limits ​

timeouts.idle ​

  • Default: 2m

tcp, ftp, http and WebSocket connections with no traffic in either direction for this long are closed. An HTTP/2 connection is also closed after this long without a request in progress, whatever PINGs or window updates it sends; the proxy sends HTTP/2 keep-alive PINGs at this interval to find clients that went away while a request is held. A stall holds the timeout only while it lasts, and closes the connection when it runs out.

timeouts.http_request ​

  • Default: 30s

The time a client gets to send its request headers, also between requests on a keep-alive connection, and then again for the body. A request that runs out is answered with 408. It is also how long a client gets to take an answer held whole for the rules: past it the connection is closed, which gives the answer's memory back.

timeouts.stall ​

  • Default: 1m

How long a stall rule holds a connection before dropping it. Longer wastes more of an attacker's time; it does not raise the worst-case cost to vulnboxd, which limits.stalled bounds, but it does mean the tarpit fills sooner.

limits.buffered_body ​

  • Default: 8388608 (8 MiB)

The largest http body held in memory, for rules that need a whole body at once (body, set_body) and for mirroring. Larger messages are refused rather than passed through unchecked. Rules that can stream never buffer more than this. See HTTP bodies. It is also what one direction of a gRPC call may decompress in all, its messages together, and the largest WebSocket message held.

limits.buffered_total ​

  • Default: 268435456 (256 MiB)

The most memory all held http bodies and partial gRPC messages may take together, across every connection and port. Past it, a body no rule needs whole is passed on unread; a request a rule needs whole is answered 503 (a response, 502). Counted in vulnboxd_proxy_buffer_budget_exhausted_total.

limits.buffered_connection ​

  • Default: 33554432 (32 MiB)

The share of limits.buffered_total the bodies of one client connection may hold at once. An HTTP/2 connection holds one body per stream, so without it one client could take the whole budget and leave every other client's bodies unread. A body past the share is handled as one past buffered_total. The share is per connection, not per address: behind the game's NAT every team and the checker can come from the same address.

limits.stalled ​

  • Default: 256

How many connections one port holds open at a time for a stall rule. Past it a stall rule blocks instead, so a flood of matching connections cannot pile up on vulnboxd. Each held connection costs one socket and one task. vulnboxd_connections_stalled says how many are held.

limits.connections ​

  • Default: 4096

How many client connections one tcp port (tcp, http, ftp) carries at once. Each costs a task, two sockets and its buffers. Past it a new connection is closed as soon as it is accepted, counted in vulnboxd_connections_refused_total. A WebSocket takes a place of its own from its upgrade on (the http connection it came on ends there); past the limit the upgrade is answered 503.

limits.udp_sessions ​

  • Default: 4096

How many clients one udp port keeps a session for at once (an upstream socket, a relay task and a datagram buffer each). Past it, the session that has been quiet longest is let go of for the new client, counted in vulnboxd_connections_refused_total.

Setup ​

These are only used by vulnboxctl init and setup-interactive.

init.github_owner ​

  • Default: empty

The GitHub organisation or user the service repositories are created in. Empty skips everything GitHub-related. Only one of this and init.gitlab_owner may be set.

init.github_token ​

  • Default: empty

A token with repo access. The GITHUB_TOKEN environment variable takes precedence, and is the better place for it: the setup wizard never writes the token to the config file.

init.gitlab_owner ​

  • Default: empty

The GitLab group, subgroup (written team/services) or user the service repositories are created in, instead of GitHub. Empty skips everything GitLab-related.

init.gitlab_token ​

  • Default: empty

A token with the api scope, able to create projects in that group. The GITLAB_TOKEN environment variable takes precedence, and is the better place for it: the setup wizard never writes the token to the config file.

init.gitlab_url ​

  • Default: empty, for gitlab.com

A GitLab of your own, such as https://gitlab.example.com. vulnboxd only carries gitlab.com's host keys, so put your GitLab's in root's ~/.ssh/known_hosts first; see host keys.

init.repo_prefix ​

  • Default: service-

Put in front of each service's repository name, so a service directory called web becomes service-web. It may hold letters, digits, dots, underscores and dashes, and may be empty for a repository named after the service alone.

If the name it wants belongs to something else, vulnboxd uses the next free one: service-web-2, service-web-3, and so on, up to twenty. A repository vulnboxd made for that service before is used again rather than duplicated, which is how a second run stays idempotent. To put a service in a repository of your own naming, set its origin yourself: a service that already pushes somewhere keeps that repository whatever its name is.

init.ssh_dir ​

  • Default: /root/.ssh/vulnboxd

Where the per-service deploy keys are kept, one key pair per service, along with the known_hosts file holding GitHub's and gitlab.com's host keys.

init.max_file_size ​

  • Default: 524288000 (500 MiB)

Files this size or larger are added to .gitignore instead of being committed, since GitHub or GitLab would refuse the push.

init.vulnbox_ip ​

  • Default: the game mode's, or empty

This box's address, written into the capture tools' configuration and named in alerts. A game mode works it out from the team number, or asks the gameserver during setup. Empty writes 0.0.0.0.

init.capture_dir ​

  • Default: . (the current directory)

Where tulip.json (for Tulip) and shovel.yaml (for Shovel) are written, listing every published service port.

init.services_file ​

  • Default: empty, which writes none

Also write a plain list of every service listener to this file: its name, this box's address and the port, one entry each. For the tools that want to be told where the services are rather than work it out — exploit runners, flag submitters, a dashboard's own configuration.

yaml
init:
  services_file: /root/services.yml
yaml
# Written by vulnboxctl: one entry per service listener.
services:
  notes-notes:
    host: "10.60.13.2"
    port: 9100
  shop-web:
    host: "10.60.13.2"
    port: 9000

The names are the ones shovel.yaml uses — the service directory and the compose service, which are the same word when a service has one container. A compose service that publishes more than one port gets one entry per port, with the port on the end of the name, since two entries cannot share a key.

init.webhook_url ​

  • Default: empty, which uses the top-level webhook_url

If set, a JSON message {"content": "..."} is posted here when a setup run starts and when it finishes, with any failures. That is the format Discord webhooks expect.