Installing VirtualBox on Windows and Linux
Virtualization is, perhaps, the most convenient tool when it comes to setting up testing laboratories or experimenting with different operating systems, since it allows us to run multiple virtual computers inside our own without the need for any additional hardware.
Throughout this book, we will use VirtualBox as a virtualization platform to create our testing targets as well as our Kali Linux attacking machine.
In this first recipe, we will show you how to install VirtualBox on Windows and on any Debian-based GNU/Linux operating system (for example, Ubuntu).
Note
It is not necessary for the reader to install both operating systems. The fact that this recipe shows both options is for the sake of completion.
Getting ready
If we are using Linux as a base operating system, we will need to update our software repository's information before installing anything on it. Open a Terminal and issue the following command:
# sudo apt-get update
How to do it...
The following steps need to be performed for installing VirtualBox:
- To install VirtualBox in any Debian-based Linux VirtualBox, we can just open a Terminal and enter the following command:
# sudo apt-get install virtualbox
- After the installation finishes, we will find VirtualBox in the menu by navigating
to
Applications
|Accessories
|VirtualBox
. Alternatively, we can call it from a Terminal:
# virtualbox
Note
If you are using a Windows machine as a base system, skip to step 3.
- In Windows, we need to download the VirtualBox installer from https://www.virtualbox.org/wiki/Downloads

- Once the file is downloaded we open it and start the installation process.
- In the first dialog box, click
Next
and follow the installation process. - We may be asked about installing network adapters from the Oracle corporation; we need to install these for the network in the virtual machines to work properly:

- After the installation finishes, we just open VirtualBox from the menu:

- Now we have VirtualBox running and we are ready to set up the virtual machines to make our own testing laboratory.
How it works...
VirtualBox will allow us to run multiple machines inside our computer through virtualization. With this, we can mount a full laboratory with different computers using different operating systems and run them in parallel as far as the memory resources and processing power of our host allow us to.
There's more...
The VirtualBox extension pack gives the VirtualBox's virtual machine extra features, such as USB 2.0/3.0 support and remote desktop capabilities. It can be downloaded from https://www.virtualbox.org/wiki/Downloads. After it is downloaded, just double-click on it and VirtualBox will do the rest.
See also
There are some other virtualization options out there. If you don't feel comfortable using VirtualBox, you may want to try the following:
- VMware Player/Workstation
- QEMU
- Xen
- Kernel-based Virtual Machine (KVM)