Windows
Setup the Capsulecorp-pentest on a dedicated Windows lab machine.

This guide assumes you will be using Hyper-V. During all of my testing, Hypver-V outperformed VirtualBox and VMware on the Windows system I used to create this guide. If you prefer to use an alternate hypervisor, you do so without the support of this documentation.
It's best to use a dedicated lab machine as these VMs eat up a lot of resources
1. Enable Hypver-V
In order to get the best experience on a Windows machine, enable the native hypervisor Hyper-V from the Windows Features menu. You may be required to restart your computer
Click on the Windows button and start typing the word "add"
Click on "Add or remove programs"
Click "Programs and Features"
Click Turn Windows features on or off"
Check the box next to "Hyper-V"
Click OK

2. Install & Configure WSL
At the end of the day, Ansible and Vagrant just work better from a Linux/UNIX environment. You'll need to install WSL and configure a few environment variables for everything to work as it should.
Open up an administrative command prompt by
Ctrl+Shiftclicking on the Terminal Preview app launcherRun the command:
wsl --installRestart your computer when the command finishes
Enter a username and password to use within your Ubuntu subsystem
Update the package manager with
sudo apt updateUpgrade to the latest version of Ubuntu with
sudo apt dist-upgrade

3. Install Ansible
Install pip with
sudo apt install python3-pipInstall ansible with pip:
pip3 install ansible --user
Alternatively you can install ansible with apt: sudo apt install ansible

4. Install Vagrant
To install Vagrant browse to https://developer.hashicorp.com/vagrant/downloads and select the appropriate Debian package (presumably Amd64). Grab the URL to the download link and use wget to download the .deb package to a folder within your WSL environment
wget https://releases.hashicorp.com/vagrant/[ver#]/vagrant_[ver#]_x86_64.deb

Install the .dep package using dpkg -i Then modify your ~/.bashrc file to contain the following:
export VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1"Don't forget to run source ~/.bashrc and then you should be able to run the vagrant command within your WSL environment.

4.1. Necessary vagrant plugins
A few vagrant plugins are required to launch and provision all of the VMs. If you below vagrant plugin install commands fail, open up an administrative PowerShell prompt and run the command.
Restart-Service LxssManagerReferences:
Vagrant plugins:
vagrant plugin install winrmvagrant plugin install winrm-fsvagrant plugin install winrm-elevated
5. Clone Github Repo
Navigate to an appropriate folder within your WSL environment and checkout the repo from Github.
cd /mnt/c/Users/royce/
git clone https://github.com/R3dy/capsulecorp-pentest.git
cd capsulecorp-pentestFamiliarise yourself with the congents of the Vagrant file. If you need to make any changes to the VMs such as CPU/Memory changes or pick a different base box then this is the file you'll want to edit.
Vagrantfile
6. Create Hypver-V Virtual Switch
Open up the Hyper-V Manager and click on the Virtual Switch Manager link from the Actions menu.
Create a New virtual network switch and name it
Capsulecorp-pentest. Check the External network radio button and select the appropriate network adapter from the dropdown list.
You'll specify this Virtual Switch each time you bring up a VM with vagrant up

Last updated
