Skip to content

redteam: Phases 1+2 — exposure sweep + authentication matrix (follow-up to #310) - #313

Merged
randomizedcoder merged 3 commits into
mainfrom
redteam/phase0-harness
Nov 23, 2026
Merged

randomizedcoder merged 3 commits into
mainfrom
redteam/phase0-harness

Conversation

@randomizedcoder

Copy link
Copy Markdown
Owner

Why this PR

#311 (the Phase 1+2 stack) merged into redteam/phase0-harness 24 seconds after #310 took 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)

  • rt-1-2 gRPC record stream — BLOCKED (tokenless refused) / read-cred CONFIRMED (332 record lines in 8 s)
  • rt-1-5 health/ready — BLOCKED 401/401 (no unauth exception — the K8s-probe tradeoff) / read-cred 200/200
  • rt-1-6 fingerprint — BLOCKED (nothing leaks tokenless) / read-cred CONFIRMED (inherent surface)
  • rt-9-1 exposure grid — CONFIRMED: the §29 prod shape is reachable from all three vantages, 401-gated; grid in docs/security.md
  • rt-11-1 scrape-slot starvation — REFUTED: MaxRequestsInFlight=10 exists, 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)

  • rt-2-1 brute-force pacing — BLOCKED: jitter 30–195 ms measured by timing (no auth-failure metrics exist — the plan's premise was wrong), no lockout after 150 failures, ceiling 8.3/s serial, 74.6/s parallel
  • rt-2-2 HMAC replay — CONFIRMED in-minute (documented); +2 min → 401. Product finding: the effective default skew is 0 — listenerauth.go:113 overwrites DefaultSignedTokenSkewMinutes = 1 with the proto unset value 0 (a dead default; stricter than documented, deserves a fail-loud fix)
  • rt-2-3 auth-mode confusion — REFUTED: every path fails closed (inferred raw) or exits 64; the plan's 'silently unauthenticated daemon' no longer exists
  • rt-2-4 read/admin grid — CONFIRMED: the full 401/403 grid over HTTP + gRPC matches docs/security.md's verification table
  • rt-2-5 header edges (absorbing rt-2-7) — BLOCKED: all 9 near-miss presentations 401; scheme is case-SENSITIVE (the plan expected insensitive)
  • rt-2-8 plaintext capture — CONFIRMED: bearer in cleartext (documented S3; TLS is the only mitigation)
  • rt-9-3 route_localnet — BLOCKED: the CVE-2020-8558-class defense holds through the kube-proxy-style DNAT

redteam-matrix: 13 scenarios, 0 failed, ~42 min warm. All evidence in vagrant/redteam/findings.md (7 Phase-1 rows + 7 Phase-2 rows, premise amendments marked).

randomizedcoder and others added 3 commits November 22, 2026 20:52
…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)
@randomizedcoder
randomizedcoder merged commit 831a430 into main Nov 23, 2026
1 check passed
@randomizedcoder
randomizedcoder deleted the redteam/phase0-harness branch November 23, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant