/windows-terraform

Sick of Vagrant? Win10/Server2019 for libvirt using terraform

Primary LanguageHCL

Windows Terraform

Intent

  • Vagrant is a terrible solution for Windows
  • Gives us a simple Win10, or Server 2019 full of goodies
    • Defaults to Server 2019
  • Copy stuff from the /sync folder to C:/sync
  • Always up to date thanks to another workflow
  • Need something bigger/more featured/a Windows lab? See https://github.com/pentesterwtf/windows-lab

Usage

  • Edit variables.tf and pick the OS you want

    • Defaults to Server 2019, Can be swapped to Win10 (See Image selection)
  • Initialise terraform

    • terraform init
  • Apply

    • terraform apply -auto-approve
  • Teardown is similar:

    • terraform destroy -auto-approve
  • Already have one running? Supply a name and you can have multiple machines:

    • terraform apply -auto-approve -var="name=windows_reversing"
    • Note: take care of terraform state

Security considerations

  • Not a hardened image
    • vagrant/vagrant everywhere, change credentials, etc
    • will have SSH enabled

Requirements

Image selection

  • See https://pentesterwtf.s3-ap-southeast-2.amazonaws.com/ for qemu/windows-* images
  • nosysprep images do not have sysprep, and will have the same machine ID, but are faster to spin up
  • all other images will run sysprep on first boot, which is ideal for a domain environment, but will take longer to start initially
  • You're probably going to be OK with nosysprep images

Implementation