Alerts and baselines
The hub learns what each of your services normally does and tells you when a request makes one do something else: a shell started, a file written into the webroot and then run, the flag store read, a connection out to an address that is not the game's, a crash. Each is an alert in the hub, on the live stream of every open tab, and, if you want, in your team's chat.
It is the hub's alert component (vulnboxd-hub alert, in the chart's core pod). It needs nothing on the vulnbox beyond what the hub already gets: HTTP and database traffic come from the capture, and what processes do comes from the host sensor and the linker. Without the sensor you still get the HTTP, database and rate alerts.
These are not vulnboxd's own alerts about deploys and checks on the box; those stay as they are, and both can post to the same chat.
The baseline
For every service, the hub keeps a list of what it has seen it do, eight kinds of item:
| Item | Known by | Example |
|---|---|---|
| Process | the program and the shape of its arguments | /usr/bin/zip -r /tmp/export_#.zip /data/notes |
| File written, file read | the shape of the path | /data/notes/note_#.txt |
| Outgoing | the container (or the vulnbox) and port; for anything outside, the address and port | container:notes-db-1:5432/tcp |
| Listener | protocol and port | tcp/9000 |
| Database statement | protocol and the statement's shape | postgres SELECT * FROM notes WHERE id = ? |
| HTTP request | method, path shape and the query's parameter names | GET /api/notes/#?page |
| Client fingerprint | the client fingerprint | a41f09c2be7d3e10 |
A shape replaces what changes from one request to the next: numbers become #, ids and random-looking names (UUIDs, long hex, words mixing letters and digits) become ?. So the checker's thousand note ids are one item, and /bin/sh -c id is another.
Items get into the baseline three ways:
- During the warm-up: for the first 30 minutes after the hub first sees a service, everything it does is learned, whoever asked. Set the length with
alerts.warmup_minutes; 0 learns only from accepted items. - When a container starts: what a container's start-up does (runc setting it up, the namespace reads) after a deploy or a restart is learned, never alerted, and does not count towards rate spikes.
- By a player: acknowledge an alert with "add to baseline", or accept an item on the service's baseline page.
After the warm-up, nothing else teaches the baseline. In particular a client fingerprint a teammate labelled checker does not: the fingerprint is only the method, HTTP version and header order of a flow's first request, which a python-requests exploit may already match and an attacker can copy on purpose. A flow that stored a flag is not enough either, since anyone can send a made-up flag. Requests that look like the checker raise the same alerts as anyone's, with the checker hint on them; if the checker really does something new after the warm-up, accept the item once and it stays quiet.
Everything else is kept too, as unusual, with when it was first seen and the flow and event that did it first: the service's baseline page lists both.
After you patch a service, or redeploy it with different behaviour, reset its baseline: the warm-up starts again from now, and what was learned before stays.
What raises an alert
| Alert | Severity | When |
|---|---|---|
| Reverse-shell pattern | critical | a process put a network socket on its stdin, stdout or stderr |
| Written to the webroot, then run | critical | a request wrote a file under a webroot, and a later request ran it: executed it, had an interpreter (php-fpm, python, …) open it, or asked for it by name |
| Crash | high | a crash signal (SIGSEGV, SIGBUS, SIGILL, SIGABRT, SIGFPE, SIGSYS), a core dump or the OOM killer: a memory-corruption exploit or a DoS. Not while a container is being stopped for a restart or a deploy (its processes ending on SIGTERM/SIGKILL around it, the container recreated), unless the kernel raised the fault itself |
| New listener | high | a port the service never listened on |
| Flag store read | high | a request read one of the service's flag stores (the checker's reads too, with the hint) |
| Flag read from the database | high | a database returned a flag to a request (the checker's too, with the hint) |
| Egress to a non-game address | high | a connection to an address outside the vulnbox, outside the game's networks and not the gameserver, that the baseline never made |
| Checker trouble after a change | high, warning on counts alone | right after a rules commit or a deploy, the gameserver's verdict for the service turned bad, or the flags stored per tick or the read-backs dropped sharply: see the checker canary |
| New process | warning, high for shells, interpreters and network tools | a program, or arguments of a shape, never seen |
| New outgoing destination | warning | a destination (a container, the vulnbox, another team) never seen |
| Rate spike | warning | a minute of requests, process starts, file writes, connections or database operations far above the minutes before (the checker's requests count too) |
| New file written, new file read | notice | a path never written or read, such as /etc/passwd or /proc/self/environ |
| New database statement | notice | a statement shape never seen: often an injection |
| New HTTP request shape | info | a method and path the warm-up never sent and no one accepted |
| New client fingerprint | info | an HTTP client the warm-up never saw and no one accepted (a checker label does not count) |
| Too many alerts | warning | more than 25 new alerts of one kind for one service at once; the rest are counted on this one |
| Sensor blinded | warning | for a stretch of time the sensor could not see everything: its ring buffer was full, a service was over its rate limit or had too many threads inside syscalls, or its hook scanner failed on a file or stopped |
| Alert worker behind | warning, high if rows were skipped | more than 50,000 HTTP exchanges, database operations, host events or proxy flows in one pass: the worker reads up to there and catches up in the next passes, so alerts come late. Reverse shells, crashes and flag-store reads are read in full regardless. A flood like this may be someone hiding an exploit |
| Capture gap | warning | the capture lost packets for a stretch of time: flows in it may be cut or missing |
| Decoder stopped | notice | a protocol decoder (HTTP, HTTP/2, a database protocol) gave up on a connection, and why: what followed on it was not decoded |
Blinding is an alert too. An attacker who can make the sensor or the capture miss a moment does it right before the exploit. The last three say when: each gives the time range (from, to on the alert's detail) and what was lost, so you look at that stretch instead of taking it for quiet. A blinded sensor or a capture gap belongs to no request; a stopped decoder names its connection (and the request above it, where links lead to one) and the decoder's reason (130 headers, an unknown method, a message larger than the decoder takes).
Every alert says who did it. The hub links what a service did to the request that caused it only where it can prove it (see how links work). An alert linked to a request lists that flow first, so you can open it, see its trace and the exact bytes. Something no link ties to a request — a process started by a backdoor, a cron job, a restart — is unlinked: alerted one step less severe (except egress, new listeners and reverse shells), and never as a flag read, since the service reads its flags for itself too.
The checker is never exempt. Whether a request looks like the checker (it stored a flag, or its fingerprint is labelled checker: the checker hint) never drops an alert. When every request behind an alert looks like the checker, the alert says so ("a request that looks like the checker", and a line under who on the alert); the API has it as detail.checker_hint. So the checker's own flag reads show up as alerts with the hint, and an exploit that sends a made-up flag to look like the checker is alerted on like anyone else. If the checker's reads are noise, mute that kind for the service.
One alert per thing. The same kind of alert about the same item (the same request shape, the same program, the same destination) within an hour is one alert that counts up, collects the flows and events (20 of each are listed), and becomes more severe if a worse occurrence comes. Change the window with alerts.dedupe_minutes.
Rate spikes compare each minute with the mean of the 30 minutes before: a minute at 5 times the mean, and at least 20, is a spike (spike_window_minutes, spike_factor, spike_min_count). They start once a service has been watched for that long.
The checker canary
A rule that stalls the checker, or a patch that breaks the service, costs SLA points every tick until someone notices. After every change to a service — a commit of its rules file (a rule push from the hub, or one made in Git) and every deploy of new code (a hook proposal push, or a commit) — the alert worker watches the five ticks that follow against the five before, for each service on its own:
- the gameserver's verdict, which vulnboxd reads in game modes and reports to the hub: up in the last tick before the change, down in a tick after it;
- the flags stored per tick that were read back later, by any flow: a made-up flag an exploit sends in is never read back, so it cannot inflate the ticks before a change and fake a drop after it;
- the read-backs: flag-outs from requests that look like the checker (the hint).
A tick whose count falls to half the average before, or below, is a sharp drop (counts that averaged less than 2 are not judged). The verdict turning bad is a high alert; the counts dropping alone a warning: "notes: checker trouble since push p_0e7a3c19d84b at tick 343". Nothing here depends on knowing which flows are the checker's: the verdict is the gameserver's own, and the counts are coarse hints (a rule that blocks an attacker's read-backs lowers the count as well), so the alert says what it saw and leaves the call to you.
The alert shows the change (the commit, its message and author, the hub push that made it), why it was raised, and each tick around it with its verdict, flags stored and read-backs. While the trouble lasts it counts up once a tick and shows the newest numbers.
Revert it from the alert. The button undoes the change through the mechanism that made it, under the same permission as doing that by hand:
| change | the button | permission |
|---|---|---|
| a rules commit | queues a rule push reverting that commit (as Revert in the rules history) | rules.push |
| a hook proposal push | reverts that push (as on the service's hooks page) | proposals.apply |
| other new code | starts a deploy bisect from the commit deployed before to the new one: vulnboxd puts the earlier version back first, then finds and reverts the commit that broke it | bisect.run |
It asks first, takes an optional note for the alert's history, and refuses a second revert from the same alert for 10 minutes. The revert is in the alert's history and the audit log, and the push or bisect it queued is followed where it always is (the Vulnbox screen, the hooks page).
Working with alerts


The hub's Alerts screen (a bell in the navigation, with the number of open alerts on it, red while any is high or critical) has the open alerts, newest first, with counts by severity; filter by state, severity, kind and service (the filters are in the address, so a link shows a teammate the same list), and tick several to acknowledge them at once. New high and critical alerts also pop up on every screen. Opening one shows what happened and why it is an alert, its details as seen, the request behind it and its other flows (each with a link to its trace), its host events (through the service's activity around it), the baseline item it is about, and its history (raised, recurred, sent to a webhook, acknowledged). The API is GET /api/alerts (see the hub's API.md). For each one:
- Acknowledge it when someone has looked, with a note ("patched the debug endpoint"). It leaves the open list; if the same thing happens again within the window it is counted on it, not raised again. Reopen it if needed.
- Add to baseline when it is normal after all (a feature the checker rarely uses, a cron job): the item is accepted, and it raises no alert again. In the hub this is a box under Acknowledge on a
new_*alert. Each service's Baseline page (from the alert, or the Alerts screen's Baselines tab) lists every item with its first and last time, first flow and how often requests that looked like the checker did it; Accept takes an unusual item in, and Start warm-up again learns everything anew for the warm-up time after a patch. - Mute a kind for a service, or a kind everywhere, or everything of one service, optionally until a time — "the checker randomises paths on
notes", "every team's tool has its own fingerprint". Muted alerts are still stored (show them with the filter), but are not sent anywhere, give no tags and do not show in the badge. The Alerts screen's Mute rules tab lists them; Mute… on an alert prefills its service and kind.
Flows an alert names get the built-in tags alert, and alert-high for high and critical ones, and the flow filter has an alert condition (by kind and severity; alert:reverse_shell;min=high in the URL), which tag rules can use too.
Sending alerts to your chat
Add webhooks (at most 8) under Settings › Alerts in the hub (or the alerts section of PUT /api/settings):
| Format | Body | For |
|---|---|---|
discord | {"content": "<text>"}, as vulnboxd's own alerts | Discord, and anything that takes Discord's format |
slack | {"text": "<text>"} | Slack, Mattermost, Rocket.Chat incoming webhooks |
generic | {"source": "vulnboxd-hub", "alert": {…}}, the whole alert as the API has it | your own bot or pager |
The text reads like **notes** critical: Reverse-shell pattern: sh — sh (501) put a tcp socket to 10.61.4.2:4444 onto its standard input/output for a request that is not the checker's, with links to the alert and its first flow when you set the hub's address (link_base). Each webhook takes alerts of at least its min_severity (warning by default), optionally of some services or kinds only. At most 20 messages a minute go to each webhook (webhook_max_per_minute), the most severe alerts first; a quarter of them (5 of 20) are kept for high and critical alerts, so a burst of warnings never crowds out a reverse shell. The rest are summed up in one message ("12 more alerts were not sent") once there is room. A receiver that answers 429 is waited out as it asks, a few times. Test sends a test message right away and shows the answer.
An alert's title and explanation can quote captured text (a process name, a path, a request line), which an attacker chooses. In discord and slack messages it cannot ping, link or reformat: Discord messages carry "allowed_mentions": {"parse": []} and Slack messages "link_names": false with link unfurling off; markup characters are escaped (\*, \[ for Discord; <, >, & for Slack, so <!channel> stays text); https:// in captured text is written https[:]//, so nothing captured becomes a link; and newlines and invisible characters show as \n, \u{202e}. The only links in a message are the hub's own, from link_base and ids the hub made. generic sends the alert as JSON, unchanged: escaping it is the receiver's job.
A webhook URL is a secret: anyone who has it can post to the channel. So it is shown as it is only to players with the alerts.admin permission; everyone else sees its scheme and host followed by /…. Saving the settings without touching a hidden URL keeps it.
The hub posts only to public addresses. A URL whose host is, or resolves to, a loopback, private, carrier-grade NAT, link-local, multicast or unspecified address is refused when it is saved, and a test to it fails. The hub resolves the name itself, connects to the address it checked, and follows no redirects, so a webhook cannot be pointed at the hub's own services or ClickHouse. If your team's own receiver runs on an internal address, allow its address or range at deploy time: alert.webhookAllow in the Helm chart (for example ["10.43.12.0/24"]), or HUB_WEBHOOK_ALLOW=10.43.12.0/24 (comma separated) on both vulnboxd-hub alert and vulnboxd-hub api.
The other settings in the same section: enabled (switches the alert worker off without stopping it), the warm-up and dedupe windows, the spike thresholds, game_networks (the game's CIDRs, such as 10.60.0.0/16: egress anywhere else is an egress alert; empty means every address outside the vulnbox but the gameserver), and webroots (where web servers run files from; by default /var/www/**, /usr/share/nginx/html/**, and **/public/**, **/static/**, **/uploads/**, **/htdocs/**, **/webroot/** anywhere).
How late, and what it costs
The alert worker reads what the assembler and the linker have finished, a minute of event time per pass, 30 seconds behind the linker (HUB_ALERT_DELAY) so links written late are in. An alert usually comes 30 to 60 seconds after what caused it; hub_alert_lag_seconds says how late it is now (see metrics). Data that arrives much later than the time it happened (an agent that was cut off for a while and sends its spool) is not looked at again once the worker has passed that time.
It keeps every item and recent alert in memory, and writes what changes to ClickHouse: the baseline, the alerts and their history, kept like flows. A window with more than 50 000 rows of one kind is read in part (hub_alert_truncated_total).
Known gaps
- Only exact links attribute host activity to requests. Where the kernel cannot prove the link and no runtime hook is installed (a php-fpm worker's database connection, an event-loop service), the activity is unlinked: it still raises the alerts above, less severe, but never flag-read alerts.
- A service restarting after its warm-up may raise
new_processalerts for its startup programs (unlinked, so at notice); a reset of its baseline, or accepting them, quiets that. Listeners the checker's traffic reaches through vulnboxd's proxy are learned from that traffic, so a restart does not raisenew_listenerfor them. - Mute rules apply to alerts raised or recurring after the rule was made.
- Rates count events, not bytes, and only the five kinds listed.