Installation notes for setting up Windows VM Lab in VirtualBox.
packer
: Use packer to build the Windows artifacts.vagrant
: Use vagrant to create the VMsmetasploitable3
: Use packer and vagrant to setup the metasploitable3 VM.
- VT-x/AMD-V supported processor (recommended)
- 65 GB storage space (61440 MB)
- Each VM will be provisioned with this size, but will have their disks resized after provisioning.
- 8 GB ram
Component | RAM (GB) | Storage (GB) |
---|---|---|
Base OS | 1 | N/A |
Kali VM | 2 | 30 |
ADFS2 - dc | 3/4 | 65 |
ADFS2 - adfs2 | 3/4 | 65 |
ADFS2 - web | 1 | 65 |
ADFS2 - ps | 3/4 | 65 |
ADFS2 - ts | 3/4 | 65 |
Metasploitable3 | 1 | 65 |
Get the packer-windows repository
git clone http://github.com/diaclectic/packer-windows
cd packer-windows
Then build the Windows 2012 R2 artifact
cmd.exe /c packer build windows_2012_r2.json
Get the adfs2 repository
git clone http://github.com/diaclectic/adfs2 metasploitlab
cd metasploitlab
Then create the VMs and fill in some printers via powershell scripts
vagrant up dc --provider virtualbox
vagrant up adfs2 --provider virtualbox
vagrant up web --provider virtualbox
vagrant up win7 --provider virtualbox
vagrant up nd --provider virtualbox
powershell -file c:\vagrant\scripts\create-queues.ps1
vagrant up nd --provider virtualbox
powershell -file c:\vagrant\scripts\import-ep.ps1
To resize the hard disks: https://gist.github.com/christopher-hopper/9755310 https://tuhrig.de/resizing-vagrant-box-disk-space/
Single Sign On should work out of the box with the provisioning scripts. But you can install the JBoss Negotiation Toolkit for further tests
- Go to the
ep
box and open the Ocon Shell jb
install-jboss-negotiation-toolkit.pl
- Go to the
win7
box and login asmike.hammer
- Open IE with URL http://ep:8080/jboss-negotiation-toolkit/
After setting up all boxes, you simply can start and stop the boxes, but the Domain Controller should be started first and stopped last.
vagrant up dc
vagrant up web
vagrant up win7
vagrant halt win7
vagrant halt web
vagrant halt dc
Get the metasploitable3 repository
git clone http://github.com/diaclectic/metasploitable3
cd metasploitable3
Build the base VM image using packer
cmd.exe /c packer build windows_2008_r2.json
Then add the base vagrant box to your vagrant environment
vagrant box add windows_2008_r2_virtualbox.box --name=metasploitable3
Install the reload vagrant provisioner
vagrant plugin install vagrant-reload
Start the vm
vagrant up
Once this is setup, you can use the default credentials U:vagrant/P:vagrant
For more information, please use the following resources.
This was ultimately used as the basis for all the repos reference here. GitHub
This is a modified version of the repo above. GitHub
This is a multi vagrant infrastructure with AD for testing ADFS 2. GitHub
This is an intentionally vulnerable VM used for pen testing. GitHub Wiki page Blog post