Repository navigation
redteam: Phase 3 part 3 — S3 exfil with inherited creds + the artifact-poisoner rows - #324
Open
randomizedcoder wants to merge 2 commits into
Open
randomizedcoder wants to merge 2 commits into
randomizedcoder wants to merge 2 commits into
Conversation
Four scenarios (all in redteam-matrix; 22 scenarios, 0 failed):
rt-3-2 (CONFIRMED, 15/15) — S3 destination exfil with INHERITED creds:
the s3parquet twin of rt-3-1 with one twist stronger. The attack Set leaves
the S3 credential fields EMPTY, and Set's secret-preservation rule
('empty means unchanged, not clear') inherits the RUNNING creds — the
daemon brings its own access/secret key to the attacker's endpoint. The
attacker's permissive fake S3 (~60-line python server; signature
validation is up to the server's owner) accepts the BucketExists probe +
the PUTs: 43 parquet objects with host=rt-victim keys, victim data in
the parquet column bytes, and the victim's ACCESS KEY ID in every SigV4
Authorization header. The tier-4 blind rides the same Set: the victim's
in-VM Garage froze (objects 535 -> 535). Only detector: the Set audit
line. Restored + verified by final Get.
rt-7-1 (BLOCKED, 10/10) — the plan's expected outcome holds: the 256 MiB
cap (pkg/ipasn readZstdFile, io.LimitReader) refuses a 9361x bomb
(1.1 MiB on disk -> 10 GiB decompressed) at the cap with the log line
naming it, the good table keeps serving (gauge unchanged), the daemon
stays healthy, RSS bounded; the under-cap 240 MiB bomb is refused at the
parquet open with the same keep-table guarantee; every refusal counted.
rt-7-2 (CONFIRMED, 16/16) — bootstrap swap: the same-name file loads
WITHOUT complaint (no integrity check at load; the Nix deploy's answer
is the build-time lock, nix/ipmeta-bootstrap-lock.json, documented). The
poison is SEMANTIC: a one-row table over the remote dial target puts
networkOwner=ATTACKER-NET into 22,784 reported record lines — the
corrupted enrichment IS the telemetry. PRODUCT FINDINGS pinned: (a) a
bootstrap-only load publishes NO loadAsn gauges (loadInitialAsn bypasses
loadAsn's publish — the table in service is invisible in metrics until a
live load); (b) with a live artifact present, the live refresh overwrites
the bootstrap table within one 5s tick (measured).
rt-7-3 (BLOCKED, 9/9) — bounded by construction: 100k duplicate-/32
rows (the maximal row-to-entry ratio, one garbage row per 1000) load in
~60ms with garbage skipped, no panic, daemon healthy; the depth ladder
(every prefix length 0..32) loads equally cleanly.
Harness pieces:
- two new deploy-shape axes: XTCP2_DEST (tcp | s3 — s3 boots an in-VM
Garage v2.1.0 fixture mirroring nix/modules/garage-bucket-bootstrap.nix,
bucket xtcp2-records + a fixed imported key) and XTCP2_ENRICH (none |
asn — the enricher with the bind-mounted artifact dir, 5s refresh)
- tools/ipfeed-fixture (static, rides the attacker tools tar): crafts
collector-shaped parquet.zst artifacts (dup32/ladder/random24 shapes,
arbitrary -prefix, interleaved garbage rows) and zstd bombs with a
target decompressed size (10 GiB from 1.1 MiB, 9361x)
- vm_pull in lib/ssh.sh (attacker -> harness -> victim artifact hops)
- the victim daemon row for DEST=s3 sets fast deterministic flush knobs
(s3FlushInterval 2s, threshold 4096, jitter 0) so object counts are
assertable within a poll
…ntract (nolint), WriteFile 0600
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.
Phase 3 part 3 — the Garage/S3 + artifact rows (rt-3-2, rt-7-1..3)
Full matrix after this PR: 22 scenarios, 0 failed (~70 min).
grpc_configService.go— "empty means unchanged, not clear") inherits the running creds, so the daemon brings its own access/secret key to the attacker's endpoint. The attacker's permissive fake S3 accepts the probe + PUTs: 43 parquet objects (host=rt-victimkeys, victim data in the column bytes) + the victim's access key id in every SigV4 Authorization header. Tier-4 blind: the victim's in-VM Garage froze (535→535). Only detector: the Set audit line. Restored + final Get.pkg/ipasnreadZstdFile,io.LimitReader) refuses a 9361× bomb (1.1 MiB → 10 GiB) at the cap, the good table keeps serving, the daemon stays healthy, RSS bounded (~1.1 GiB peak incl. the read buffer); the under-cap 240 MiB bomb is refused at the parquet open; every refusal counted.nix/ipmeta-bootstrap-lock.json, documented). The poison is semantic: a one-row table over the remote dial target putsnetworkOwner=ATTACKER-NETinto 22,784 reported record lines.Product findings pinned by rt-7-2 (follow-up candidates)
loadInitialAsncallsReloadArtifactdirectly, bypassingloadAsn's gauge publish — the table in service publishes noloadAsngauges until a live load happens.Harness pieces
XTCP2_DEST(tcp|s3): s3 boots an in-VM Garage v2.1.0 fixture on the victim (bucketxtcp2-records, fixed imported key — mirrorsnix/modules/garage-bucket-bootstrap.nix), and the daemon runs the §29 S3 sink shape with fast deterministic flush knobs.XTCP2_ENRICH(none|asn): the ASN enricher with a bind-mounted artifact dir (-asnRefreshInterval 5s,-ipmetaBootstrapPathon the mount).tools/ipfeed-fixture(static, rides the attacker tools tar): crafts collector-shapedparquet.zstartifacts (dup32/ladder/random24 shapes, arbitrary-prefix, interleaved garbage rows) and zstd bombs with a target decompressed size.vm_pullinlib/ssh.sh(attacker → harness → victim artifact hops); four shell-lint hardening fixes along the way (URL-encoded object keys,grep -cexit codes, minio label order, garage v2 CLI/key formats).Evidence:
vagrant/redteam/evidence/20261124T0{63147,65747,83620,85513}-*; findings rows invagrant/redteam/findings.md; plan rows amended with the verdicts indocs/redteam-plan.md.