Repository navigation
redteam: Phase 1 — default-exposure sweep (rt-11-1 refuted) - #311
Conversation
…refuted, matrix app scenarios/rt-1-2 (gRPC record stream), rt-1-5 (health/ready disclosure), rt-1-6 (version fingerprint), rt-9-1 (exposure grid), rt-11-1 (scrape-slot starvation) + lib/deploy.sh (shared deploy preamble), token helpers as globals (die-in-$($) only killed the subshell), per-scenario default rows (exported — the Vagrantfile child never saw the raw default otherwise), sockfill in the attacker tools, the catcher truncated per provision (3G/week filled a 20G disk once), and the redteam-matrix app: 6 scenarios in one invocation, 0 failed. Verified outcomes (findings.md rows): - rt-1-2 BLOCKED (tokenless remote stream refused) / read-cred CONFIRMED (332 record lines in 8s — the tier-2 exfil premise holds) - rt-1-5 BLOCKED (401/401, no unauth health exception — the K8s-probe tradeoff) / read-cred CONFIRMED (200/200) - rt-1-6 BLOCKED (no fingerprint families leak tokenless) / read-cred CONFIRMED (the surface is inherent for a read credential) - rt-9-1 CONFIRMED: the prod-shape listener is reachable from all three vantages (VM host, co-tenant via docker0 gw, remote VM) — 401-gated; grid recorded in docs/security.md - rt-11-1 REFUTED: MaxRequestsInFlight=10 exists but /metrics is ~17.8KiB against a ~87KiB send buffer, so neither rate-limited readers nor never-reading SO_RCVBUF sockets block the handler — the 11th scrape stays 200 and delivery is unaffected. The plan doc's headline RT-11 mechanism does not hold; scrape-surface DoS is rate-storm territory (rt-4-5). Both holder mechanisms are pinned so a regression flips it. Deferred within Phase 1: rt-1-3 (reflection — needs a static grpcurl), rt-1-4 (/ip), rt-9-2 (router VM + TTL), rt-9-4 (IPv6 link-local).
…tions, 1 dead-default finding) rt-2-1 brute-force pacing, rt-2-2 HMAC replay, rt-2-3 auth-mode confusion, rt-2-4 read/admin grid, rt-2-5 header edges (absorbing rt-2-7), rt-2-8 plaintext capture, rt-9-3 route_localnet — the full authentication matrix of docs/redteam-plan.md RT-2/RT-9, verified on Ubuntu/Docker in the §29 prod shape. lib/brutepace.sh is the co-tenant probe (jitter/hammer/rate modes). redteam-matrix now runs 13 scenarios (~42 min warm, 0 failed). Verified outcomes (findings.md rows): - rt-2-1 BLOCKED: jitter measured 30-195ms BY TIMING — there are NO auth-failure metrics (the plan's xtcp_counts premise was wrong); no lockout after 150 failures; ceiling 8.3/s serial, 74.6/s with 10 workers. Entropy, not pacing, must hold (S3 = ops guidance). - rt-2-2 CONFIRMED: in-minute replay of a pcap-captured HMAC bearer 200 (documented); +2min and previous-minute tokens 401. PRODUCT FINDING: the effective default skew is 0 — listenerauth.go:113 overwrites DefaultSignedTokenSkewMinutes=1 with the proto unset value 0, so the named default is unreachable and the window is exact-minute unless the spec sets signedTokenSkewMinutes (stricter than documented; the dead default deserves a fix). - rt-2-3 REFUTED: every auth-mode confusion path fails closed or stays authenticated — (a) typo'd CLI flag: mode inferred from the credential; (a2) typo + no credential: exit 64; (b) invalid env mode: ignored, credential keeps auth on; (c) unreadable _FILE: exit 64. The plan's 'silently unauthenticated daemon' no longer exists; residual: the CLI typo is silently treated as unset. - rt-2-4 CONFIRMED: the full 401/403 grid over HTTP + gRPC matches docs/security.md's verification table (pprof-on-metrics-listener is a 404-past-the-gate class nuance, recorded). - rt-2-5 BLOCKED: all 9 near-miss presentations 401; scheme is case-SENSITIVE (exact 'Bearer ' prefix) — the plan's 'case-insensitive' expectation was wrong (rt-2-7 amended); the lowercase cell flips if the scheme is ever relaxed. - rt-2-8 CONFIRMED: on-path capture reads the raw bearer in cleartext (documented S3; TLS is the only mitigation). - rt-9-3 BLOCKED: the CVE-2020-8558-class defense holds — through route_localnet=1 + the kube-proxy-style DNAT the routed co-tenant gets HTTP 000 (loopback-peer check) and the daemon logs the rate-limited reject line. Deferred: rt-2-6 timing sampling folded into rt-2-1 (the 20-200ms failure jitter drowns any per-position signal); rt-11-2/3 tier 2 → Phase 4.
|
Phase 2 (authentication matrix) landed on this branch: 7 new scenarios (rt-2-1/2-2/2-3/2-4/2-5+2-7/2-8/rt-9-3), the 13-scenario Two refutations: rt-2-3 (auth-mode confusion — every path fails closed or infers raw from the credential; the plan's 'silently unauthenticated daemon' no longer exists) and the rt-2-5 scheme premise (exact-case One product finding: the effective default HMAC skew is 0 — Measured numbers in |
What
Phase 1 of docs/redteam-plan.md: the default-exposure scenarios, stacked on #310. Five scenarios + the
redteam-matrixapp (the whole phase set in one invocation: 6 scenarios, 0 failed, ~10 min warm).Verified outcomes (all pinned with evidence, findings.md rows)
MaxRequestsInFlight=10exists (client_golang v1.25.0 inFlightSem wraps Gather through the response write), but /metrics is ~17.8 KiB against a ~87 KiB kernel send buffer, so neither rate-limited readers nor never-reading SO_RCVBUF sockets block the handler — the 11th scrape stays 200 and delivery is unaffected (Send-Q verified stuck at 14415 with the slot released). Scrape-surface DoS is rate-storm territory (rt-4-5), not slot starvation. The plan doc row is amended; both holder mechanisms are pinned so a body-size/buffer regression flips the scenario.Harness hardening included
Per-scenario default rows exported (the Vagrantfile child never saw them), token helpers as globals (die-in-$() only killed the subshell), lib/deploy.sh shared preamble, catcher truncated per provision (3 GB/week filled the 20 G disk once — re-reproducing the tcpDest no-reconnect finding organically).
Deferred within Phase 1: rt-1-3 (reflection — needs a static grpcurl), rt-1-4 (/ip), rt-9-2 (router VM + TTL), rt-9-4 (IPv6 link-local).