Files
pentest.intro/platforms/qemu/lab.conf
T
quoije 77d123a9cf Add optional Kali attacker VM and DHCP for the lab bridge
lab.sh kali install|up|down|reset|status extracts the official Kali QEMU
image once, keeps it as a read-only base with a throwaway overlay, and
boots two NICs: the lab bridge (for the exercise) and user networking (so
apt works without opening the isolation policy).

DC01 now serves DHCP on 10.10.10.100-200 with DNS and domain options but no
router: devices on the bridge configure themselves while the lab stays
isolated. A reservation pins 10.10.10.101 to the Kali MAC.

Also fixed backend_stop, which still called the pre-refactor WinRM helper
and fell back to killing the VMs.
2026-10-22 19:55:15 -04:00

68 lines
2.6 KiB
Plaintext

# lab.conf — QEMU/KVM platform (generic Linux host)
# Sourced as bash by lab.sh. Keep it KEY=value, no functions.
# Override anything in lab.conf.local (gitignored) instead of editing this file.
# ---------------------------------------------------------------- identity
BACKEND="qemu"
LAB_NAME="norbourg"
DOMAIN="norbourg.lab"
NETBIOS="NORBOURG"
FLAG_PREFIX="NORBOURG"
# ---------------------------------------------------------------- network
# Lab segment. Nothing here is ever bridged to the office LAN.
LAB_SUBNET="10.10.10.0/24"
LAB_NETMASK="24"
LAB_PREFIX="10.10.10"
LAB_HOST_IP="10.10.10.230" # this host, on the lab bridge
LAB_DC_IP="10.10.10.10" # DC01, also the lab DNS server
LAB_GATEWAY="10.10.10.230" # default gateway handed to the VMs
BRIDGE="br-lab"
LAB_BRIDGE="$BRIDGE"
# Interface that faces the participants. Leave empty to auto-detect the
# default-route interface at runtime.
LAN_IFACE=""
# The office network the lab must never be able to reach.
OFFICE_SUBNET="192.168.10.0/24"
# ---------------------------------------------------------------- storage
# Disks must live on a real POSIX filesystem; btrfs gets chattr +C (no CoW).
# Defaults to ~/lab-vms so a fresh clone works anywhere.
LAB_ROOT="${LAB_ROOT:-$HOME/lab-vms/pentest-lab}"
LAB_ISO_CACHE="${LAB_ISO_CACHE:-$HOME/lab-vms/iso}"
MIN_FREE_GB=20
WINDOWS_ISO="$LAB_ISO_CACHE/SERVER_EVAL_x64FRE_en-us.iso"
VIRTIO_ISO="$LAB_ISO_CACHE/virtio-win.iso"
# ---------------------------------------------------------------- vms
# name ip ram_mb disk_gb vcpu role (= windows/roles/<role>.ps1)
VMS=$(cat <<'EOF'
dc01 10.10.10.10 4096 36 2 dc01
fs01 10.10.10.20 4096 36 2 fs01
ws01 10.10.10.31 4096 36 2 ws01
EOF
)
# ---------------------------------------------------------------- windows
LAB_ADMIN_PASSWORD="${LAB_ADMIN_PASSWORD:-Norbourg!2026}"
LAB_SAFE_MODE_PASSWORD="${LAB_SAFE_MODE_PASSWORD:-NorbourgDsrm!2026}"
WINDOWS_IMAGE_INDEX=2 # 2 = Standard, Desktop Experience
# ---------------------------------------------------------------- kali
# Optional attacker VM (official Kali QEMU image, full toolset).
KALI_ARCHIVE_URL="https://cdimage.kali.org/kali-2026.3/kali-linux-2026.3-qemu-amd64.7z"
KALI_IP="10.10.10.101"
KALI_RAM=4096
KALI_VCPU=2
KALI_DISK_GB=40
KALI_SSH_PORT=2222
KALI_VNC_DISPLAY=9
# ---------------------------------------------------------------- tuning
DISK_FILL_RATIO=30 # percent of the nominal disk actually used (measured ~26%)
ISO_BUDGET_GB=8
BUILD_TIMEOUT=2700 # seconds to wait for unattended installs