Repository navigation
redteam: Phases 1+2 — exposure sweep + authentication matrix (follow-up to #310) - #313
Merged
Merged
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.
redteam: Phase 1 — default-exposure sweep (rt-11-1 refuted)
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.
Why this PR
#311(the Phase 1+2 stack) merged intoredteam/phase0-harness24 seconds after#310took that branch's tip into main — so the Phase 1+2 commits landed only on the branch, not in main. This PR brings them in (diff vs main = exactly the two commits).Phase 1 — default-exposure sweep (5 scenarios + the redteam-matrix app)
MaxRequestsInFlight=10exists, but /metrics is ~17.8 KiB against a ~87 KiB send buffer, so neither rate-limited readers nor never-reading SO_RCVBUF sockets block the handler — the 11th scrape stays 200. Scrape-surface DoS is rate-storm territory (rt-4-5). Both mechanisms pinned so a regression flips it.Phase 2 — authentication matrix (7 scenarios)
listenerauth.go:113overwritesDefaultSignedTokenSkewMinutes = 1with the proto unset value 0 (a dead default; stricter than documented, deserves a fail-loud fix)redteam-matrix: 13 scenarios, 0 failed, ~42 min warm. All evidence invagrant/redteam/findings.md(7 Phase-1 rows + 7 Phase-2 rows, premise amendments marked).