Setting up your virtual lab - Beginners guide to hacking and penetration testing (2017)

Beginners guide to hacking and penetration testing (2017)

Setting up your virtual lab:

One of the best ways to learn and test is to do so in a virtual environment. The overall benefits to this is low cost, reduced hardware requirements, and rapid recovery should we render one of our test machines into a nonresponsive state. A virtual lab can be created on just about anything, but personally I would recommend at least the following: Intel i5 (better or equivalent), minimum of 8 GB of ram (The higher the better), and a minimum drive size of 80 GB or larger (again the larger the better).

There are a number of applications that can be used for virtualization such a VMWare, VirtualBox, and Xen. For the purpose of this book we will be looking at setting up VirtualBox. VirtualBox is a free program from Oracle. It's capable of running on Windows, Linux, Macintosh, and Solaris. Virtualbox is easy to use and updated often.

The first thing that we will need to do is download the VirtualBox client onto the machine that we want to turn into our virtual machine. https://www.virtualbox.org/wiki/Downloads and choose the system that we will be using.

In our case we will be installing VirtuaBox to a Windows machine, so we will click Save File and then run the Win.exe file.

Once launched click the Next button

Click the Next button again.

Click the Next button one last time.

Finally, don't panic when you see the big red warning message. This is simply letting you know that your network interface will be temporarily unavailable while VirtalBox install. Click the Yes to proceed.

We are now ready to finally install VirtualBox! Click Install

You may or may not receive a message asking for permission, if you do simply accept.

For the Windows Security popup make sure that the Always trust is checked and click Install

After a few minutes the install will be complete and you can start loading your Virtual Machines (VMs). Click Finish to launch

Once loaded we can begin to load our software. My recommendation would be Kali Linux, Ubuntu, and some form of Windows to test. I will provide some download links at the bottom of the tutorial.

If we click the button on the top we will be greeted with the Create Virtual Machine dialogue. Enter the name of that you want to call your virtual machine. Under Type drop down the box to the type of machine this is. If you don't see exactly the one that you will be loading, this is fine. This is a general selection . Finally under Version select if it's 32 bit or 64 bit. Once you have made your selections click Next.

Next select how much memory that you want to allocate for your v irtual machine. VirtualBox will let you know what it recommends. Remember this will take some of your host computer's physical memory so adjust accordingly, and click Next when done.

Next we need to setup our virtual disk, click Create.

For the Hard disk file type leave it at the default and click Next.

This next part is interesting. With a virtual machine, the VM will only take up as much space as it needs as long as we keep it set to Dynamically allocated. Otherwise if we chose Fixed that amount of hard drive space would be used. Click Next.

On this screen we can select how much hard drive space that we want to allow our VM. Since we chose to allow it to be dynamically allocated it's safe to select a larger size. Be sure to only allocate as much drive space as you want/can spare. Once you have selected an appropriate size click Create.

We are almost done! Now that we have the settings for our machine we can see it listed on the sidebar now. On the right hand side we can see the various settings such as Audio and Network. If we click the name of any of those fields we can make adjustments. Also in the upper right hand corner we now see a Snapshots option. Snapshots allows us to take an image of our machine. We can have several snapshots, which is great for rapid recovery (if we somehow "blow up" our virtual machine) or want to have several different states saved. We still need to load in our operating system so highlight the machine that you just created and click Start up at thetop.

When you start up your VM for the first time you will need to point it to the ISO that you downloaded or disk that you want to install from. For me, I already downloaded Ubuntu so I clicked the yellow folder and navigated to my ISO. Once that's done click Start to begin the install process. Treat this like you

would any other computer.

The end result is that we now have a virtual machine(s) that operate just like a physical machine. They will also interact with each other and give us a safe working environment to run our tests.

ISO Links:

https://www.virtualbox.org/wiki/Downloads

https://my.vmware.com/en/web/vmware/free#desktop_end_user_computing/vmware_workstat ion_player/12_0

https://www.ubuntu.com/

https://www.kali.org/

https://www.cnet.com/how-to/how-to-download-the-official-microsoft-windows-8-1-iso/

https://sourceforge.net/projects/dvwa/

https://sourceforge.net/projects/metasploitable/