Setting up a Windows environment in a VM
For the Windows environment test lab, I've chosen to install Microsoft Windows 10 as it is currently the latest release by Microsoft. Many users with newer PCs and laptops may already be running Windows 10 but Windows 10, should also be installed as a virtual machine for testing purposes, thereby leaving the host OS untouched. This is also recommended for readers with older versions of Windows as well as Mac and Linux users, so they are able to work with the latest version of Windows as part of their penetration tests in the lab environment. In the real world, we will be seeing fewer Windows 7 machines as support for it has ended (making these systems highly vulnerable), although there will also be faithful users who are not open to upgrading just yet.
For this installation, we will be using an evaluation copy of Windows 10 Enterprise edition, available as a direct download from the Microsoft website. You can download your evaluation copy of Windows 10 Enterprise by visiting https://www.microsoft.com/en-us/evalcenter/evaluate-windows-10-enterprise. Remember that unless you have or purchase a license, this version has a 90-day evaluation period.
Once at the download page, you should notice that there are two available versions, ISO and Long-Term Servicing Branch (LSTB). Choose ISO – Enterprise and click on Continue.
Complete the evaluation form details and click on Continue. Please remember the details entered as you will be required to authenticate via phone call or SMS later on during the installation.
Select your platform (32 bit or 64 bit) as well as your language, and click on Download to proceed.
You can now begin creating your Windows 10 virtual machine. VirtualBox or VMware can be used for this but in this instance I will be using VirtualBox.
Open VirtualBox and click on the New icon at the top left. Give your VM a name and choose the appropriate version (32, bit or 64, bit) depending on the version you previously downloaded. Click on Next to continue.
Assign available RAM to the VM. The recommended memory is 2 GB, but I have assigned just over 6 GB as I have 24 GB of RAM on my machine. Remember to factor in the host usage, as well as other VMs such as Kali Linux, which may be running simultaneously:
Add a new virtual hard disk by clicking on Create a virtual hard disk now and then clicking on Create.
For the hard disk file type, select VirtualBox Disk Image (VDI) and click on Next.
Choose the Dynamically Allocated option under Storage on the physical disk. This option conserves hard drive space by using space on the physical disk only when it is used as opposed to creating a fixed size space on the disk that may not be used. Click Next to continue.
When choosing the size of the virtual disk, consider the recommended HDD space as well as the space of the applications you may wish to install (such as Metasploitable) in the VM. In this instance, I've allocated 64 GB of HDD space. Click on Create to continue:
At this point, we must now point the ISO image to the VM. In the VirtualBox Manager, click on your newly created Windows 10 VM instance and click on the Start arrow. In the Select start-up disk box, click on the folder icon and browse the downloaded Windows 10 evaluation copy. Click on Start to continue:
This brings us to the Windows Setup splash screen. Enter the relevant information for your setup and click on Next to continue.
Click on Install now to begin the installation process.
Accept Microsoft's license terms and click on Next to continue. Choose the Custom Installation option and then click on New and then Apply to format the VM hard disk:
Once formatted, ensure that the partition with the size you previously specified is selected and click on the Next button to continue:
Once the installation is complete as shown in the following screenshot, allow the OS to restart automatically.
You will then be prompted to choose your language and keyboard layout before continuing with the setup, after which you will then be prompted to enter a work or student email before choosing your privacy settings.
To set up your secure sign-in, click on Set up PIN. You may be first be required to verify your identity via phone call or SMS. Once verification is complete, you will be able to set up a pin. Be sure to remember this PIN (minimum six digits) as you will be required to use your pin to sign in.
Once setup is complete, you can now configure your network and install your apps. At the lower-right corner of the screen, you should see the details of your evaluation copy:
You may want to save the machine state in the event you need to quickly restore the VM to a working state.