Proxmox Lab: Game of Active Directory - Configure with Ansible

In this module, we'll be taking steps to configure the Windows hosts in the Proxmox Game of Active Directory lab using Ansible
Proxmox Lab: Game of Active Directory - Configure with Ansible
In: Proxmox, Home Lab, Active Directory, Game of Active Directory, Windows, Attack
ℹ️
This module is part of a larger project on setting up Game of Active Directory (GOAD) on Proxmox alongside our existing lab infrastructure. Click here to be taken back to the project landing page.

Previous Step

Proxmox Lab: Game of Active Directory - Terraform the Lab
In this module, we’ll be taking steps to provision the entire Proxmox Game of Active Directory lab environment using Terraform





Objectives for this Step

  • Install the Ansible requirements
  • Apply the Ansible playbook against the lab hosts



Configure and Run Ansible

Install Ansible Requirements

cd /root/GOAD/ansible/
ansible-galaxy install -r requirements.yml



Run the Playbook

cd /root/GOAD/ansible
export ANSIBLE_COMMAND="ansible-playbook -i ../ad/GOAD/data/inventory -i ../ad/GOAD/providers/proxmox/inventory"
../scripts/provisionning.sh



Take Snapshots

⚠️
This step needs to be done on your Proxmox node
vms=("DC01" "DC02" "DC03" "SRV02" "SRV03")
COMMENT="after ansible"
# Loop over the array
for vm in "${vms[@]}"
do
  echo "[+] Create snapshot for $vm"
  id=$(qm list | grep $vm  | awk '{print $1}')
  echo "[+] VM id is : $id"
  qm snapshot "$id" 'snapshot-'$(date '+%Y-%m-%d--%H-%M') --vmstate 1 --description "$COMMENT"
done



Current State of the Lab

Ansible completed the lab configuration over the course of about an hour





Next Step

Proxmox Lab: Game of Active Directory - Attacking GOAD
In the final module of the lab, we’ll be taking steps to ensure that we can access our attack box in certain conditions and successfully ensure connectivity to Game of Active Directory targets in the lab.
More from 0xBEN
Table of Contents
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to 0xBEN.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.