Repository navigation
redteam: Phase 5 part 2 — blast radius + cap matrix (rt-5-3/rt-5-4) + the blind-detection runbook - #382
Merged
Conversation
… (Phase 5 part 2) rt-5-3 (35/35, CONFIRMED): an 8-probe busybox battery (docker-cp'd into the shell-less scratch daemon image and docker-exec'd — the takeover shape) against four shapes — the deployed min recipe, the §29 compose shape, --privileged --pid host, and a plain co-tenant. Host link state is flappable and every mounted co-tenant netns enterable from all three daemon shapes (NET_ADMIN+SYS_ADMIN are the collector's own powers); docker-default AppArmor, not the cap set, bounds mount and host-process ptrace; --privileged removes that bound entirely. rt-5-4 (46/46, BLOCKED): six one-cap-dropped daemons measured per feature. NET_ADMIN/SYS_ADMIN drops refuse startup with the exact remediation message; SYS_PTRACE blinds the /proc-scan discovery (foundProc 5->0/scan) while the netns bind mounts keep coverage; NET_RAW/SYS_RESOURCE drops cost nothing in the tcp/iouring-less shape; inet_diag, ethtool, the RDMA backend, and the link monitor unaffected. nix: busybox (static musl) joins the attacker-tools tar — argv[0] must stay 'busybox'; file -L follows its applet symlinks in the static check. Both scenarios registered in the redteam-matrix list.
docs/security.md gains the "Capabilities and container blast radius" section: the capability x feature matrix (rt-5-4), the four-shape blast-radius table (rt-5-3), and the minimum-cap recipe (--cap-drop=ALL + NET_ADMIN/SYS_ADMIN/SYS_PTRACE/NET_RAW/SYS_RESOURCE) with the drop conditions per soft cap. The init_capabilities.go SYS_PTRACE warning text claims 'found stays at 1' — wrong in the docker shape, where the /run/netns + /run/docker/netns bind mounts keep coverage; the doc records the measured behavior. redteam-implementation.md: tasks 5.3/5.4 done, the Phase 5 part 2 DoD row, the cap-matrix checkbox ticked; Phase 4 hygiene — rt-11-4's arrival-lag (landed with Phase 4 part 3), the traps/victim-reporting invariant (38/40 + the two sink-assert exceptions, 15 trap / 25 trapless), and #342's measured evidence base. findings.md: the rt-5-3 and rt-5-4 rows with the harness lessons (the rt-5-1 SIGPIPE family's third shape: printf|grep -q; HELP-line matching; busybox argv[0]; the baseline-file flock).
…ble) The 20261203T115318 matrix: 41/42 PASS; rt-11-4 FAILED on a false 'premise WON' — victim_lag_s read the live catcher with tail|json.loads and the snapshot ended on a half-written record (JSONDecodeError: Unterminated string -> the 999 sentinel -> a real-looking lag). The catcher is appended concurrently (socat's cat >>), so only tail's LAST line can be torn: parse the complete prefix ([:-1] drops exactly that line) and retry once before the sentinel. rt-11-8 shares the helper verbatim — both fixed. Re-verified solo: rt-11-4 14/14 (20261203T162907-10b26a71e-4174803), rt-11-8 18/18 (20261203T163709-10b26a71e-133485). The matrix's other 40 rows (incl. the new rt-5-3 35/35 and rt-5-4 46/46 in-matrix) passed unchanged.
vagrant/redteam/RUNBOOK.md: the RT-11 answer's operational half — for every cut link in the reporting chain (discover, dump, enrich, batch, deliver, scrape, process) x four attacker tiers, the metric/log/ absence-alert that reveals it, with the measured evidence cited (V) or the row marked pending (P: rt-11-9..12). The first rule up front: the daemon cannot be its own watchdog — absence of metrics must itself alert (rt-11-6's scrape-through-docker-proxy blind, rt-11-9's docker.sock kill), so the catcher-side arrival check and an external liveness watchdog are the primary detectors. Eight concrete alert rules; the known gaps (#337, #370, #371, rt-11-12's open question). docs/security.md gains the companion section linking it (the 5.10 DoD names both files).
This was referenced Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
Phase 5 part 2 of the red-team program (docs/redteam-plan.md rt-5-3/rt-5-4) plus two follow-on deliverables, on top of the already-merged part 1 (#376):
rt-5-3 — privileged-container blast radius (35/35 PASS, CONFIRMED)
An 8-probe busybox battery (docker-cp'd into the shell-less scratch daemon image and docker-exec'd — the takeover shape) against four shapes: the minimum-cap recipe, the §29 compose shape (docker defaults + 3
cap_add),--privileged --pid host, and a plain co-tenant.The finding: a compromised daemon container is a host-trust domain in every cap shape — host link state is flappable and every mounted co-tenant netns enterable (NET_ADMIN+SYS_ADMIN are the collector's own powers; caps cannot minimize them away). What actually bounds mount and host-process ptrace on Ubuntu is the
docker-defaultAppArmor profile, not the cap set;--privilegedremoves that bound entirely (mount, PID-1 environ, insmod-to-the-kernel). The min recipe's real win over the compose shape: drops MKNOD/DAC_OVERRIDE-class caps. A plain co-tenant is denied every host-mutating probe.rt-5-4 — minimum-capability matrix (46/46 PASS, BLOCKED)
Six one-cap-dropped daemons (
--cap-drop=ALL+ per-row adds, otherwise the exact victim.sh host-mode shape) measured per feature:/run/netns+/run/docker/netnsbind mounts (found/start stays 5/scan) — theinit_capabilities.go"found stays at 1" claim is wrong in the docker shape, corrected in the docsDelivered as the
docs/security.md"Capabilities and container blast radius" section (cap × feature matrix, four-shape blast-radius table, minimum-cap recipe).The 42-row matrix's one wobble — torn-read fix (d230761)
rt-11-4 FAILED in the first full matrix on a false "premise WON":
victim_lag_stails the live catcher while socat appends it, and the snapshot ended on a half-written record (JSONDecodeError: Unterminated string→ the 999 sentinel read as a 999 s lag). Only tail's last line can be torn — the helper now parses the complete prefix ([:-1]) and retries once; rt-11-8 shares it verbatim. Re-verified solo: rt-11-4 14/14 (20261203T162907), rt-11-8 18/18 (20261203T163709).The blind-detection runbook (task 5.10's deliverable, 8053629)
vagrant/redteam/RUNBOOK.md: the RT-11 answer's operational half — 7 links × 4 tiers, each cell naming the metric/log/absence-alert that reveals the cut, evidence cited or the row marked pending (rt-11-9..12). First rule up front: the daemon cannot be its own watchdog (rt-11-6's scrape-through-docker-proxy blind, rt-11-9's docker.sock kill) — the catcher-side arrival check and an external liveness watchdog are the primary detectors. Eight concrete alert rules; the known gaps (#337, #370, #371).docs/security.mdgains the companion "Blind detection" section.Verification
20261203T093134-e811a90f2-3244581) and in-matrix (20261203T123232)20261203T102631-e811a90f2-3633767) and in-matrix (20261203T123442)nix run .#redteam-lintclean; busybox (static musl) joins the attacker-tools tar (argv[0] must staybusybox)Docs updated
docs/security.md: "Capabilities and container blast radius" + "Blind detection" sectionsdocs/redteam-implementation.md: tasks 5.3/5.4 done, Phase 5 part 2 DoD row, cap-matrix checkbox, Phase 4 DoD hygiene (rt-11-4 arrival-lag, the traps/victim-reporting invariant, rt-4-1: the attack's own sockets are reported — ~4K idle conns amplified record volume ~149x #342's evidence base)vagrant/redteam/findings.md: rt-5-3/rt-5-4 rows with the harness lessons