Deploy N attacker VMs alongside the domain lab and hand each colleague a console URL, with nothing to install or configure on their side. - import the Kali image once, keep it as a template, clone per seat - deterministic MAC + DHCP reservation on DC01, so addresses are stable - configure through the QEMU guest agent: hostname, wordlist from the tool ISO, sshd, then verify network and DNS - add the `users` command: a PVEVMUser account scoped to one VM plus the noVNC URL and generated password - check: 7z/pveum presence, address range, RAM budget for the clones - destroy cleans up the clones and the template The documented path no longer depends on bloodyAD: the password reset uses impacket-changepasswd (already installed) and ACL inspection uses nxc's daclread module, both verified against the live lab.
51 lines
1.5 KiB
Bash
51 lines
1.5 KiB
Bash
# shellcheck shell=bash
|
|
# cmd_answers / cmd_destroy — small utilities shared by both platforms.
|
|
|
|
cmd_answers() {
|
|
local file="$ROOT_DIR/answers/walkthrough.md"
|
|
[[ -r $file ]] || die "no answer key at $file"
|
|
cat "$file"
|
|
}
|
|
|
|
cmd_destroy() {
|
|
local name i
|
|
|
|
step "stop"
|
|
for name in "${VM_NAMES[@]}"; do
|
|
backend_stop "$name" >/dev/null 2>&1 || true
|
|
done
|
|
|
|
step "remove"
|
|
for name in "${VM_NAMES[@]}"; do
|
|
backend_destroy "$name" || warn "could not fully remove $name"
|
|
done
|
|
|
|
# Kali lives outside the VMS table; stop it but keep its 16 GB base image.
|
|
if declare -F _kali_installed >/dev/null && _kali_installed; then
|
|
_kali_down >/dev/null 2>&1 || true
|
|
info "kali stopped; base image kept ($(du -h "$(_kali_base)" | cut -f1))"
|
|
fi
|
|
|
|
# Platforms that manage extra VMs (participant Kali clones) clean up here.
|
|
if declare -F platform_destroy_extra >/dev/null; then
|
|
platform_destroy_extra
|
|
fi
|
|
|
|
step "generated artifacts"
|
|
rm -rf "$LAB_ROOT/seeds" "$LAB_ROOT/run" "$LAB_ROOT/provision"
|
|
ok "seed ISOs, runtime state and provisioning scratch removed"
|
|
|
|
printf '\n'
|
|
info "kept: ${LAB_ROOT}/images (baselines), logs, and the ISO cache"
|
|
info "remove those by hand if you really want the space back"
|
|
}
|
|
|
|
# Platforms that support participant tunnels override this.
|
|
cmd_peers() { planned peers; }
|
|
|
|
# Overridden by the qemu platform, which ships the Kali image helper.
|
|
cmd_kali() { planned kali; }
|
|
|
|
# Participant accounts are a Proxmox concern (console access per VM).
|
|
cmd_users() { planned users; }
|