Skip to content

feat(range): build tpl-kali on gandalf and make the attack VM, ragnar… - #1336

Open
Gerrrt wants to merge 1 commit into
mainfrom
gerrrt/421-tpl-kali-attack-vm
Open

Gerrrt wants to merge 1 commit into
mainfrom
gerrrt/421-tpl-kali-attack-vm

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Nov 9, 2026

Copy link
Copy Markdown
Owner

…ok (#421)

build-the-playground.md §5, and build-the-lab-templates.md §5 as run.

gandalf is not clustered, so it got its own phoenix@pve user, roles and token, with ACLs on range, local and both bridges. phoenix trusts gandalf's CA and keeps that token in gandalf.env, apart from phoenix.env. 902 was built twice from phoenix (10m33s, then 10m41s with -force), and packer-smoke.sh passed after each. The build needs phoenix.env sourced under gandalf.env, because the variables file refuses an empty build password even for Kali.

scripts/make-attack-vm.sh makes ragnarok, VMID 130: a full clone of 902 on range, net0 on vmbr0 by DHCP, net1 on vmbr1 at 172.30.30.10/24 with no gateway, firewall flags off. It then writes 99-no-forward.conf and runs §8's third check. Both sysctls read 0, there is no NAT, and the one default route is via 10.0.30.1. On the fresh clone, 0 failed units and 0 accounts expiring at the epoch, the check #1196 owed 902.

The changes:

  • Packer: the Kali ISO is pinned to 2026.2, and the README row reads built.
  • Current-state documents: architecture.md, network.md, the network diagram and the roadmap now name ragnarok.
  • Changelog: a new entry for 2026-11-09.

Refs #421
Refs #790

What changed

Why

Blast radius

  • No change to network segmentation or firewall rules
  • No new port published to a VLAN that could not already reach the service
  • No credential added outside secrets/*.sops.yaml

Verification

  • make validate passes
  • Deployed to the lab and confirmed working
  • Docs updated (docs/, service README, or docs/roadmap.md)

…ok (#421)

build-the-playground.md §5, and build-the-lab-templates.md §5 as run.

gandalf is not clustered, so it got its own phoenix@pve user, roles and
token, with ACLs on range, local and both bridges. phoenix trusts
gandalf's CA and keeps that token in gandalf.env, apart from phoenix.env.
902 was built twice from phoenix (10m33s, then 10m41s with -force), and
packer-smoke.sh passed after each. The build needs phoenix.env sourced
under gandalf.env, because the variables file refuses an empty build
password even for Kali.

scripts/make-attack-vm.sh makes ragnarok, VMID 130: a full clone of 902
on range, net0 on vmbr0 by DHCP, net1 on vmbr1 at 172.30.30.10/24 with no
gateway, firewall flags off. It then writes 99-no-forward.conf and runs
§8's third check. Both sysctls read 0, there is no NAT, and the one
default route is via 10.0.30.1. On the fresh clone, 0 failed units and
0 accounts expiring at the epoch, the check #1196 owed 902.

The changes:
- Packer: the Kali ISO is pinned to 2026.2, and the README row reads built.
- Current-state documents: architecture.md, network.md, the network
  diagram and the roadmap now name ragnarok.
- Changelog: a new entry for 2026-11-09.

Refs #421
Refs #790

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 9, 2026 15:18
@Gerrrt
Gerrrt enabled auto-merge (squash) November 9, 2026 15:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Isolation checks can falsely report success because failed NAT reads appear clean, legacy SNAT rules are missed, and disabled SSH host-key verification allows an attacker to fabricate results.

2 open issues
What changed in this PR

This PR records the completed Kali template build on gandalf and adds repeatable provisioning for ragnarok, the range’s dual-homed attack VM. Targets and Sliver remain future work.

Changes:

  • Add a VM-cloning script that configures networking, disables forwarding, and checks isolation.
  • Pin template 902’s installer and document builds through gandalf’s API.
  • Update current-state documentation and record build, smoke-test, and epoch-expiry verification results.
File Description
scripts/​README.md Index the attack-VM provisioning script.
scripts/​make-attack-vm.sh Clone, configure, and check ragnarok.
packer/​variables.pkr.hcl Pin 902’s Kali installer filename.
packer/​README.md Record 902 as built and smoke-tested.
packer/​kali.pkr.hcl Update comments describing completed builds and ISO placement.
docs/​runbooks/​build-the-playground.md Document attack-VM provisioning and operator access.
docs/​runbooks/​build-the-lab-templates.md Document gandalf credentials, permissions, and build steps.
docs/​runbooks/​build-the-analyst-workstation.md Record successful epoch-expiry verification on 902’s clone.
docs/​roadmap.md Update range progress and remaining work.
docs/​network.md Describe ragnarok and its network placement.
docs/​diagrams/​current/​network.svg Label the range host’s new attack VM.
docs/​changelog.md Record template builds and attack-VM deployment.
docs/​architecture.md Describe gandalf’s first guest and dual-homed configuration.

Review effort: Balanced

Comment thread scripts/make-attack-vm.sh
Comment on lines +115 to +116
SSH=(ssh -i "${SSH_KEY}" -o BatchMode=yes -o StrictHostKeyChecking=no
-o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -o ConnectTimeout=10)
Comment thread scripts/make-attack-vm.sh
Comment on lines +130 to +135
out="$("${SSH[@]}" "kali@${addr}" 'sudo sh -c "
sysctl net.ipv4.ip_forward net.ipv6.conf.all.forwarding
nft list ruleset 2>/dev/null | grep -Ei \"masquerade|snat\" || echo \"no NAT\"
iptables -t nat -S 2>/dev/null | grep -- \"-j MASQUERADE\" || echo \"no legacy NAT\"
ip -br addr; ip route
"')"
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.

2 participants