Skip to content

redteam: Phase 1 — default-exposure sweep (rt-11-1 refuted) - #311

Merged
randomizedcoder merged 2 commits into
redteam/phase0-harnessfrom
redteam/phase1-exposure
Nov 23, 2026
Merged

randomizedcoder merged 2 commits into
redteam/phase0-harnessfrom
redteam/phase1-exposure

Conversation

@randomizedcoder

Copy link
Copy Markdown
Owner

What

Phase 1 of docs/redteam-plan.md: the default-exposure scenarios, stacked on #310. Five scenarios + the redteam-matrix app (the whole phase set in one invocation: 6 scenarios, 0 failed, ~10 min warm).

Verified outcomes (all pinned with evidence, findings.md rows)

  • rt-1-2 gRPC record stream — BLOCKED (tokenless remote stream refused, Unauthenticated) / read-cred CONFIRMED (332 record lines in 8 s — the tier-2 exfil premise holds)
  • rt-1-5 health/ready — BLOCKED (401/401, no unauth health exception — the K8s-probe tradeoff is real) / read-cred CONFIRMED (200/200)
  • rt-1-6 fingerprint — BLOCKED (no fingerprint families leak tokenless) / read-cred CONFIRMED (the surface is inherent for a read credential)
  • rt-9-1 exposure grid — CONFIRMED: the §29 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 scrape-slot starvation — REFUTED: MaxRequestsInFlight=10 exists (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).

…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.
@randomizedcoder

Copy link
Copy Markdown
Owner Author

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 redteam-matrix (~42 min warm, 0 failed).

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 Bearer , not case-insensitive).

One product finding: the effective default HMAC 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, not weaker — but the dead default deserves a fail-loud fix.

Measured numbers in vagrant/redteam/findings.md: brute-force jitter 30–195 ms (no auth-failure metrics exist — the plan's metric premise was wrong), no lockout after 150 failures, 8.3/s serial / 74.6/s parallel ceiling; the 401/403 grid matches docs/security.md's verification table.

@randomizedcoder
randomizedcoder merged commit c3707bd into redteam/phase0-harness Nov 23, 2026
@randomizedcoder

Copy link
Copy Markdown
Owner Author

Heads-up: this PR merged into the branch 24 s after #310 took the branch's tip into main, so the Phase 1+2 commits never reached main. Follow-up PR #313 brings them in (diff vs main = exactly this branch's two commits).

@randomizedcoder
randomizedcoder deleted the redteam/phase1-exposure 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