Even Moar Pentest Lab: Installing VMWare 6.0

So after setting up the NAS yesterday my goal for today was to get back into python. As an update on that, my python is coming along, I finished Python Crash Course and most of the way through Automate the Boring Stuff with Python. I’ve been through the first 4 chapters of Penetration Testing, and have learned a lot of cool stuff.

first_shell_zomg

This summer has been very productive for me, all things considered. But it is drawing to an end, sadly, and with school starting up this week I’ll have less time for my side projects. So I should have been pressing ahead with working the python projects from the books or working the pentesting chapters… but instead ADD won the day and I am finishing out building my lab.

I installed ESXi to run from a USB on my Dell Poweredge 1950. After upgrading it to now have 32 GB of RAM, more than enough for my purposes. Right now I’m just running the pentest lab, which should only consist of a few machines at any given time, but I have other projects in mind down the line that this will be useful for.

The installation was painless. Download the software, available for a free trial from VMWare, or get it licensed from another source. I am still with George Mason University, so we have a deal where we get licensed VMWare products for free. The download, at least in the case of mine, comes with two files. One is a .iso file that will be the server installation files. The other is the management client for Windows.

Burn the .iso file to  disc, it could also be burned to a USB if you aren’t from the ancient past, but I went with the disc because I am a wasteful American, and because I wasn’t sure how the server would react loading the software from USB to USB similar to the NAS4Free install. Probably would work fine though. Insert the “destination” USB into the back of the server. Power the server on, insert the disc, navigate to the boot menu, and boot from disc. The installation to USB is quite easy, follow the prompts and when instructed remove the disc and reboot.

Upon reboot, bring up the BIOS menu and set the boot order. This will differ from server to server.  On my server, the rear USB interface is treated as a hard drive for boot order purposes, and the individual hard drives can be sorted for boot order, so I set the USB drive as the main “hard drive” for boot and set the boot priority for hard drive to 1. This will differ from server to server.

Once the server comes up, navigate in a web browser to the listed IP (assuming you have DHCP configured and the server was automagically assigned an IP, if not….). If the webpage for ESXi displays, then you’ve won. You can download the vSphere client from the link of the webpage or use the file from the initial software download. Install this software on your Windows client, following the default prompts. Once installed, start the software and navigate to the server’s IP. Authenticate using the username root and the password you set up during installation.

Open the NAS management console, in this case I used NAS4Free of course. Navigate to the Services>NFS menu. First head to the Shares tab and input the name of the share and the network to which the share should be accessible. Then select Save and Apply Changes. Remember that every time you do anything with NAS4Free, you have to select Apply Changes.

create_nfs

Once complete navigate back to the Settings tab. Ensure that Enable is selected. I chose to enable NFSv4, I don’t know what the difference is really beyond what was immediately available on Wikipedia, so that’s a problem for future me. But it seems like the smart move. Select Save and Restart to bring the share up. You have to repeat this step and the previous one for each disk to be shared.

restart_nfs

Back in vSphere, navigate to the Inventory tab. You should see a prompt to create a data store, if not go to the Configuration tab. Select Add Storage and then select NFS Store and then Next.

mount_nfs

On the next window, input the IP of the NAS server and the path, not the name, of the share you are adding. Give it a unique name and hit next.

mount_nfs2

Repeat this process for each disk you have to mount on the NAS. Once completed, you should see each disk attached to VMWare within vSphere.

nfs_success

Since I had already created several VMs on my laptop, in order to get them onto the datastore I will have to export them from VMWare Workstation and then import into vSphere. In order to export the VMs, in VMWare Workstation select the VM to be exported and then go to File>Export to OVF. In vSphere, g to File>Deploy OVF Template and select the template in order to import the VM into vSphere.

ovf_deploy

Once imported, navigate to the system in vSphere and console in to change the IP and hostname, if necessary. Pretty easy stuff, minimal surprises or roadblocks. This is basically an enterprise deployment of VMWare, minus the STIGing and other concerns. Which will come in a future update I am sure!