Repository navigation
redteam: Phase 0 — Vagrant/libvirt harness wired into the flake - #310
Merged
Merged
Conversation
…ario app wiring Phase 0 commit C1 (docs/redteam-harness.md): packages.redteam-oci and redteam-oci-tcp-stress materialize the streamLayeredImage scripts as deterministic .tar.gz files; redteam-attacker-tools tars the static xtcp2client/xtcp2ctl with a build-time static-ELF assertion. Apps: one per vagrant/scenarios/rt-*.sh (discovered from the flake source), plus destroy/status/lint helpers. vagrant (with the bundled vagrant-libvirt plugin) is evaluated in its own allowUnfree instance so nothing else in the flake needs NIXPKGS_ALLOW_UNFREE.
…— C2 shellcheck -x + bash -n over vagrant/**.sh, hermetic, the only red-team member of nix flake check (VM scenarios need KVM+libvirtd+network, so they are apps). make redteam-lint / redteam-smoke / redteam-destroy; dev-shell banner and nix/README.md workflow rows.
…ers — C3-C5 Ubuntu 24.04 (cloud-image/ubuntu-24.04 at 20260926.0.0) victim+attacker VMs on the xtcp2-redteam-mgmt network. provision/victim.sh builds the prod-host shape from the XTCP2_* deployment matrix (catcher systemd socat sink, xtcp2 daemon container in the TODO §29 shape — /var/lib/xtcp2 bind, /run/netns+docker netns ro,rslave, cgroupns=host — RT-11 work population from oci-xtcp2-tcp-stress, co-tenant attacker container at the tier). lib/: TAP assert helpers, matrix validation, evidence run-ids, ssh/scp over vagrant ssh-config (the box ships no rsync), and the victim-still-reporting invariant that consumes the catcher rather than a daemon gauge.
docs/redteam-harness.md: verified Phase 0 wiring plan — the inventory of what flake.nix/nix already provides (vagrant 2.4.9 bundles the libvirt plugin in the pinned nixpkgs; oci-xtcp2-tcp-stress is the RT-11 work population; -dest tcp: jsonl is the catcher format), design decisions D1–D10, the nix/redteam.nix + vagrant/ specs, the rt-1-1 walkthrough and the C1–C6 commit map. Box corrections for the earlier docs: the Vagrant Cloud catalog has no ubuntu/noble64 — the official box is cloud-image/ubuntu-24.04; nixpkgs grpcurl is dynamically linked, so the Phase 0 attacker tools ship the repo's static xtcp2client/xtcp2ctl only.
…en; Phase 0 DoD closed Ran the scenario end to end on l through 8 harness fixes (listener specs, cap_add for docker defaults, ~/xtcp2-redteam delivery dir, atomic vm_push against 0444 store modes, socat cat-append catcher, grpc serves=grpc-read on the off row, 20G disk + image prune). All matrix cells pass with exit 0: - host+off (default row): BLOCKED — the co-tenant cannot reach the loopback-only listener (HTTP 000); the loopback rule holds under --network host - host+raw (§29 prod shape): BLOCKED — 401 for a tokenless co-tenant - bridge+raw: BLOCKED — 401 through -p (the DoD flip line) - host+raw + read-cred tier: CONFIRMED — HTTP 200 with the full xtcp_ series from the stolen read token (the actual exposure; rt-11 tier 2) Also: the premise shift (listener-security-hardening landed between the plan doc and the harness — unauthenticated non-loopback TCP no longer exists; docs amended in place) and the harness's first real finding — tcpDest dials once and never reconnects, so a receiver restart blinds delivery until a daemon restart (findings.md rows; file under rt-4-7/rt-11-5).
randomizedcoder
force-pushed
the
redteam/phase0-harness
branch
from
November 23, 2026 04:52
3c16151 to
380a22c
Compare
randomizedcoder
added a commit
that referenced
this pull request
Nov 23, 2026
redteam: Phases 1+2 — exposure sweep + authentication matrix (follow-up to #310)
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.
What
Closes the Phase 0 row of docs/redteam-harness.md: the Vagrant/libvirt red-team harness inside the repo, wired into the flake, per docs/redteam-plan.md and docs/redteam-implementation.md (merged as #304).
nix/redteam.nix: per-scenario apps vialistFilesRecursive vagrant/scenarios, the OCI images, the static-ELF attacker-tools assertion, andchecks.redteam-lint(hermetic shellcheck).nix/default.nix:redteamVagrant(an allowUnfree vagrant instance — vagrant is bsl11), namespaces merged.vagrant/: Vagrantfile (victim+attacker libvirt VMs, 192.168.142.10/.11), provision scripts, shared libs (matrix/evidence/ssh/invariant/assert/deploy), and the first scenariort-1-1-unauth-scrape.redteam-lint/redteam-smoke/redteam-destroy.Verified
All four rt-1-1 matrix cells PASS (exit 0) — BLOCKED/CONFIRMED per the expectation contract — with expectation flips traveling with the fix and failing CI otherwise. Cold-boot-from-destroy re-validated; teardown leaves only the pre-existing libvirt default network. Findings recorded in
vagrant/redteam/findings.md(premise shift after the listener hardening landed; tcpDest never reconnects — first product finding).Stack: Phase 1 (#fill-in) builds on this branch.