For years, Backtrack Linux, a penetration testing suite from Offensive Security has been the standard operating system for security testing professionals. However, Offensive Security has just released a new distribution based on Backtrack called Kali Linux which seems to offer quite a few improvements. In a previous post, I showed how to create a Backtrack virtual machine using the open-source virtualization software VirtualBox. I felt it would be helpful to create a similar post showing how to create a Kali Linux virtual machine. The process will be nearly identical, but hopefully will still serve as a useful reference to some. With that being said, let's get started.
Creating the Virtual Machine
After getting both Kali Linux installation media, as well as downloading and installing VirtualBox, the first thing we will want to do is to open up VirtualBox and create a "New" VM (disregard the existing VMs on my system).
Then, we will name the operating system. In this case, I will simply name it "kali". After selecting that we are intending to install Debian on the machine (since we know that Kali is using Debian), we will click "Next."
After naming the VM, we need to select the amount of memory (RAM) that we will allocate to it. Since all these virtual machines are running on my laptop, I just start out with 512 MB and move up as needed. Then we will click "Next".
Next, we need to create the virtual hard drive for the VM. I usually just select the default option to "Create a virtual hard drive now" to help keep the VM's separate. We then click "Create."
Once we have selected the type of hard drive we want, we should select the type of hard drive format we want for our virtual machine. As explained in the previous post, each of these has their purposes, but since I stick to VirtualBox, I just create the hard drive as a VDI. Then, we'll click "Next".
To save space where possible, I select to "Dynamically allocate" space on the hard drive as needed. Then, click "Next".
Finally, we need to select how much space we want to allocate to the VM. This will largely depend on personal preference, but I usually start with the default 8GB and allocate more as needed. Then, we click "Create" to create our VM.
After we land in the boot screen, we want to install the OS to the VM so that we won't need access to the ISO every time we want to use it. So, we will select "Install."
Next, we select our language, country, and keymap as appropriate. Then, we will set a hostname for our system. In this example, I just used "kali."
Then, if you have a specific domain name to configure you can do so. Otherwise, just hit "Continue". Next, we need to set a root password. Choose whatever you like, but I will use the Kali default "toor".
After confirming this password, and selecting our time zone, we need to partition our virtual hard drive to install the OS. Since we created a separate VDI for this VM, we can select to use the entire disk.
After confirming the disk to partition (the only disk available), and selecting how we want to partition the filesystem (for my example I only created one partition, but feel free to change as you would like), the installer will begin writing the changes to the disk and installing the OS.
Once everything is installed, there is one more step to do before we can boot into the system. We need to enable PAE/NX for the VM. Otherwise, you may get a fatal error when attempting to boot into Kali Linux. To do this, highlight the VM in the homescreen, and click "Settings". From here, navigate to the "System" submenu and go to the "Processor" tab. You will see the option to "Enable PAE/NX". Check this box to enable it.
After doing this, we can boot into our system. If everything goes well, we should be presented with the following login screen:
From here, just login as "root" using the password set earlier and you're good to go! Enjoy using Kali Linux, and a big thanks goes out to the guys and gals from Offensive Security who work hard to make the best distro possible.
While this was a very basic post, as always, comment below with any questions or comments!
-Jordan