0x01 Intro:
Okay, so there was a request for a tutorial on how to create a virtual lab for testing purposes. Now, I don't claim to be an expert on this at all and so don't take this tutorial as all there is too it. This is just meant to be a (very) basic guide on how to get started with your virtual lab system. I'll be using VMware workstation and doing an install of Debian 6 (stable) on it, with windows 7 as my host system. If you have a *nix machine then this guide will still be useful for you as once you have VMware installed you just need to know the terms and what your looking for to help make your virtual machine (VM) workable. Personally I am currently running about 5 VM's, 4 of which are for testing purposes (I'm working on configuring windows 2008 server with multiple workstations of different OS types) and 1 Debian VM which I use as my main computer most of the time.
For this tutorial you will need:
-VMware workstation
http://evilzone.org/security-tools/vmware-workstation-v9-0-0-812388-Some free time (not much)
-A copy of the Debian .iso on your machine
0x01.1 Downloading Debian
If you have a 64 bit system, download the amd64 image from the link below or if you have a 32 bit system download the i386 image from the link below
http://www.debian.org/distrib/netinst 0x02
Setting up your virtual machine:
Open up VMware and go to File > New Workstation. Then select custom install, and click next again. This next page just gives you some info on what sort of limitations your VM has, so read it if you like then hit Next again.
On this page we select our install image, we did a download of the ISO file so we go to the second option then hit browse and find the image you downloaded. It'll be named something like this:
After selecting it, it should then display info underneath about what sort of OS you have selected. See the above picture and how it says Windows 2008 server under mine as that was the install image i used on my last workstation before doing this Debian one.
On the next page you name your VM and can select a place on your machine to store the "hard disk" of it, I just use the default personally which brings us to the following page:
I selected only 8 cores because that's the limit of what I can do atm, I'm not sure if it's because I have so many VM's running or if because that's the limit for one VM however 8 cores is more than enough for a Debian machine. Following this we select the amount of memory to allocate to it (i personally use 1gb as I have 8gb on my comp so if my VM is using 1 it won't affect performance on my host machine too much, but it still gives your VM plenty of speed for this OS).
After selecting the amount of memory you then pick your network type, use NAT for now or you can select dont use a network connection. This can be changed later on if you change your mind about it. If you want it to be an isolated machine. Use whatever is recommended for your I/O controller then go on and select "Create new virtual disk." and use SCSI for its type on the next page. Following this you select the amount of hard drive space to set aside for your virtual machine, it's default 20gb is plenty but if your going to be putting a lot of space-consuming files on it then go ahead and increase it to any amount you like. For the other options look at the following picture:
Then it's just hit next, specify name of the disk files, and select finish. If you wish to customize hardware you can do so, but your also able to do this at any time for the VM.
At any time you are able to power off your VM and go to the options at the top, select VM > Settings to change memory amount set aside for it or stuff of that nature. You can also remove a network card if you decide you want it to be isolated, or even add one if you wish to add it to a network after all.
0x03 In Closing:
I realize for most of you this is pretty basic, and honestly I thought this was just to self-explanatory to require a guide but after a bit of talking with others decided it might be worth writing anyways. It is simple, it is easy, and VMware is quite possibly the most useful tool I have on my computer. No longer do i have to do a clean install on a computer everytime I wish to try a new OS or to try something out on a different OS, I just download an ISO and boot up a VM. You can also set VM's on their own private network, any number of them, so that you have a virtual private LAN connection to test settings/files/scripts for a network before putting it out live. At any time you can take off a networking card and then use that machine for malware analysis instead, or you can be a boss like this guy and use a couple of VM's piped together to debug the kernel for windows XP.
https://www.youtube.com/watch?v=7UU-vuVCMaUHope this helps some folks out, any additions/edits just post in the comments and I'll update this. Cheers