The Debian-based Kali Linux is one of the best-known Linux distros among cybersecurity professionals. Previously known as “BackTrack Linux,” the distribution comes equipped with several networking auditing applications and tools.
Though the distro can be installed as the host operating system like any other distro, most professionals prefer running it on a virtual machine.
In this brief guide, we will quickly walk you through setting up Kali Linux on VirtualBox, an open-source virtualization application.
Installing Kali Linux on VirtualBox
VirtualBox runs on both Windows and Linux. You can run VirtualBox on your machine like any other app and start hacking on Kali Linux.
Moreover, VirtualBox “sandboxes” Kali Linux, so any task you do in the virtual machine will not affect your host operating system. So, if you’re analyzing a virus on a Kali Linux virtual machine, you don’t have to worry about it impacting your host OS.
The best part? The steps to follow to set up Kali Linux on VirtualBox are the same on Windows and Linux!
Let’s begin.
Step #1: Download and Install VirtualBox
Navigate to VirtualBox’s official site and download the virtualization app on your machine. When the installer finishes downloading, double-click it to install it on your system.
Step #2: Download Kali Linux
One of the interesting things about Kali Linux is that it is available in a version built specifically for use in virtual machines.
Head to Kali Linux’s official website and navigate to its download page to download it. Then, download the necessary image for VirtualBox.
The file should be about three gigabytes, so it’s best to download it via torrent or a download manager.
Bear in mind that you can also use VMWare to run Kali Linux on a virtual machine.
Step #3: Install Kali on VirtualBox
When the 7z file containing Kali Linux is downloaded, you must add it to the VirtualBox app to get it to work.
First, extract the 7z file to the location where you want the virtual machine’s files to be stored. It’s best to make a folder on a drive other than the C: drive for this purpose. Remember that you will need a tool like 7-zip to extract the image.
Next, you must run VirtualBox. You will see the “Add” button in the app when it launches. Click “Add,” and a Windows Explorer pop-up will appear. Within this pop-up, navigate to the folder where you have extracted the Kali Linux 7z file.
Then, add the VirtualBox Machine Definition file. The file must begin with “kalilinux” and have the .vbox extension. Finally, click “Open.”
You will now see the settings you can apply to the virtual machine before running it. You shouldn’t face any trouble if you pick the default settings. But, to make this guide comprehensive, we’ve discussed the settings in detail in the next section.
After selecting the settings you want, click “Start.” Kali Linux will soon boot in a VirtualBox window.
Until 2020, users were forced to use the default username and password to log into Kali Linux on their virtual machine. The username was root, and the password was toor. But after January 2020, Kali Linux doesn’t use the root account.
So, the default username and password are both set to kali.
On first boot, it’s best to check for system updates and update your OS fully before installing any applications or doing other tasks.
It’s worth noting again that, like Ubuntu, Kali Linux is based on Debian. So, if you run into any problems, following the troubleshooting guides made for Ubuntu or Debian will work just fine.
Settings for Kali Linux on VirtualBox
The nice thing about VirtualBox is that it allows you to alter the settings of a virtual machine after it’s been created. So, you can navigate to any of your virtual machines and open the VM settings.
Some of the settings you should consider changing include:
Display Options
Navigate to Display, then Screen, and set the video memory to 128 MB. Doing this will prevent lags in the installer. It’s also worth enabling 3D acceleration as it avoids performance degradation if any apps need 3D acceleration.
Network Options
Next, go to the network settings section. Here, you can change the networking mode of your virtual machine.
When you select “Bridged mode,” you will set the virtual machine’s network adapter to work just like the physical adapter of the host machine. So, the virtual machine will connect to the network currently in use by the host machine.
Of course, you can also configure options such as the adapter name, MAC address, adapter type, etc.
Boot Options
It’s interesting to note that you can insert a virtual DVD (ISO) into your virtual machine’s virtual DVD drive. You can then boot a virtual machine from that disk.
To do this, go to the Storage section in the VM settings. Then, choose your virtual optical drive’s IDE controller. It is empty by default.
Click the empty status and then the disc icon near the IDE Secondary Device. A menu will appear, where you must click “Choose Virtual Optical Disk File.”
From the Explorer window, please navigate to the extracted 7z file and select it. Finally, click OK to save the settings.
Installing Kali on VirtualBox Using VDI
Following the installation steps mentioned above should install Kali without any hiccups. But there is another way of installing Kali Linux in VirtualBox – using VDI.
When you download and extract the Kali Linux 7z file, you will notice a VDI file in the folder. You can use that file to create a virtual machine of Kali Linux. To do this, launch VirtualBox and click “New.” You must then toggle expert mode in the app.
The good news is that this method of installing Kali on VirtualBox isn’t complicated and doesn’t involve many steps. All you have to do is feed the basic information about the virtual machine you want to make, including the VM name, type, base memory, etc.
After setting up the basics, you will reach the “Hard Disk” section of the VM setup. You must pick the “Use an existing Virtual Hard Disk File” option here. Then, you must select the extracted VDI file from the Kali Linux 7z file.
A dialog box will appear. Hit “Add,” and another explorer pop-up will appear. Within it, you must look for the VDI file and select it. Hit “Choose” then “Finish” to create the virtual machine.
All the settings, including the display and network settings, will be set to their default values. However, it’s still a good idea to set the display memory to 128 MB for maximum performance and enable 3D acceleration.
You can run the Kali Linux VM and enter username and password “kali” to log in.
Conclusion
Installing Kali Linux on VirtualBox provides cybersecurity professionals and enthusiasts with a flexible and secure environment for conducting network auditing and cybersecurity tasks.
VirtualBox’s ability to isolate Kali Linux in a virtual environment offers the advantage of sandboxing, assuring users that activities within the virtual machine won’t impact the host operating system.
Now that you have Kali Linux working on your machine, you’re ready to explore the innumerable possibilities of cybersecurity.