Setup scripts for creating attacker VM templates in Proxmox.
- Install base OS
- Download contents of kali directory
- Run the setup script:
chmod +x kali-setup.sh && ./kali-setup.sh - Set up Kerberos file for GOAD (optional):
sudo mv krb5.conf /etc/krb5.conf - Clear logs (optional):
sudo rm -f ~/.zsh_history /root/.zsh_history /var/log/* && sudo find /var/log -type f -exec rm -f {} \; - Shutdown and create template
Note: There's a known issue with IDE where ID 0 conflicts with 1 and 2 conflicts with 3. When adding a cloud-init drive to your Windows VM, either ensure that you've removed the other IDE drives or use SCSI.
- Install base OS
- Check for updates and install all updates - may need to be done multiple times
- Modify local group policy: Start > gpedit.msc
- Permanently disable Windows Defender: Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus - set "Turn off Windows Defender" to Enabled
- Stop Server Manager from starting on login: Computer Configuration > Administrative Templates > System > Server Manager - set "Do not display Server Manager automatically at logon" to Enabled
- Install VirtIO drivers and QEMU guest agent (optional): see this link and follow steps under Installation > Using the ISO > Wizard Installation
- Reboot
- Download contents of windows directory
- Download cloudbase-init from here, and go through prompts
- At the end, select the option to run sysprep but DO NOT select the option to shutdown after installation
- Run the setup script in PowerShell:
Set-ExecutionPolicy Bypass && .\windows-setup.ps1- Newer versions of PingCastle need to be downloaded manually from here
- Some links in the setup script are dated, and I like to manually install additional software. View the full list of software below.
move cloudbase-init/* "C:\Program Files\Cloudbase Solutions\Cloudbase-Init"- You may need to change the DNS server and suffix in DNS.bat
move shortcuts/* "C:\Users\Public\Desktop"- Shutdown and create template
Eventually, I'll add updated versions of all this to the setup script.
- Python 3
- MobaXterm
- Notepad++
- Visual Studio
- Visual Studio Code
- 7-Zip File Manager
- Tooling in C:\Tools: Rubeus, Certify, Seatbelt, PrivescCheck, SharpGPOAbuse, SharpSCCM, Whisker, SharpDPAPI, PrivescCheck, winPEAS, SigmaPotato, Snaffler, PingCastle