If you are reading this then you are on your way to the discovery and excitement behind penetration testing. If you have an interest in ethical hacking the best place to begin is by setting up your own penetration lab and here we will show you how to build a hacking lab with VirtualBox.
Before you start you should make sure that the computer you are going to be using will be able to run VirtualBox with no problems. We recommend a computer with at least 8GB of memory, a 500GB hard drive, and an i5 or i7 processor or something equivalent. Since you will be running several virtual machines you will need to ensure that your computer can handle the load.
HOW TO BUILD A HACKING LAB WITH VIRTUALBOX – INSTALLING VIRTUALBOX
To get started you will need to head on over to the VirtualBox website and download the file specific to your operating system. After it is downloaded go ahead and install it. During the installation process just use the default options that you are prompted with.
Learning how to build a hacking lab with VirtualBox starts with the virtual machine monitor which you already have downloaded and installed. Now its time to install the operating systems that you will be using in your penetration lab. The operating systems that you use depends on what you will be using your ethical hacking lab for.
For example, if you plan on using Cain and Abel which is a program used for network sniffing then you will require Windows XP. Cain and Abel isn’t supported on newer operating systems. Installing Windows XP in VirtualBox will give you access to that program.
When you decide what operating systems you want to use with VirtualBox you will have to obtain the installation disc, ISO file, or the virtual image. In this tutorial we start out by installing Kali Linux using an ISO file.
HOW TO BUILD A HACKING LAB WITH VIRTUALBOX – INSTALLING FIRST VIRTUAL MACHINE
Kali Linux is one of the most widely used operating systems for penetration testing and it should be in your arsenal. Visit the Kali website and download the ISO file. After you have the file downloaded we will continue and create a new virtual machine with Kali Linux.
To create a new virtual machine you will need to open up VirtualBox. After you open up the program you need to click the “New” button. A window will pop up and you need to enter the name of the operating system, the type of operating system, and the version. For Kali the name of the operating system is “Kali Linux”, the type of operating system is “Linux”, and the version is “Debian (64-bit)”. Then click the “next” button.
The next screen will ask you how much memory you would like allocated to the virtual machine. I recommend a minimum of 2GB for Kali Linux. Other operating systems will vary but I usually just dedicate 2GB or more to every operating system just to be safe. Use the slider and drag it to 2048MB and click the “Next” button.
Next you need to specify whether or not you want to create a virtual hard disk. In this tutorial we are choosing the option “Create a virtual hard disk now”. Then click the “Create” button. The recommended size is 8GB but we are going to use 20GB which we will set in a minute. Depending on the size of your hard drive you may only want to stick with 8GB.
Then you need to choose the hard disk file type. You can just keep the default set to “VDI (VirtualBox Disk Image)” and click “Next”.
Now you need to choose if you want the hard drive dynamically allocated or set to a fixed size. We are going to set it to 20GB so select “Fixed size” and click “Next”.
Now you need to set the virtual hard disk size by adjusting the slider to 20.00 GB. You can leave the name as default “Kali Linux” and click the “Create” button.
Now just wait until it creates the virtual machine and we will move onto the next step which involves installing the operating system.
HOW TO BUILD A HACKING LAB WITH VIRTUALBOX – INSTALLING KALI LINUX
Now that we have our virtual machine created and configured we need to install the operating system. If you have installed Kali Linux before then this procedure won’t be new to you. To start you need to make sure that your Kali Linux virtual machine is selected and then click the “Start” button in VirtualBox.
When you click the “Start” button a window will pop up where you will have to select the start-up disk. This is where that Kali Linux ISO file will come in handy that you downloaded earlier. Click the folder button and navigate to the ISO file and select it. When it is selected click the “Start” button.
A new window will now open up and you will go through the process of installing Kali Linux. At the Boot menu select “Graphical Install” and press “Enter”. You will then be guided though the installation options. If you have never installed Kali Linux before then take a look at our video on how to build a hacking lab with VirtualBox. The video will guide you step-by-step through the installation procedure. If you plan on using a WiFi adapter in the future to sniff and capture packets then you should learn how to connect ALFA AWUS036H to Kali Linux in VirtualBox.
After you have Kali Linux fully installed you can add other operating systems by using the same procedure outlined above. As you can see below we have Kali Linux, Windows XP, Windows 7, Windows 2003 Server, Backtrack, GnackTrack, and Windows Server 2008 installed.
If you run into problems or have any questions feel free to comment below. This tutorial is intended for “ethical hacking” purposes