• Derek Scheller Jr

Installing Kali Linux to Virtualbox

This post though long is a step-by-step guide to installing Kali Linux to Oracle's Virtualbox. Though you can make adjustments in your setup as you go along this process is designed for new users that don't want to use the base vbox image created by offensive security for one reason or another. Please feel free to comment at the end with any suggestions or comments you may have on my process.

In order to install Offensive Security’s Kali Operating System to virtualbox there are several prerequisites that need to be completed before the install can begin. First you must download the image from https://www.kali.org/downloads as seen below, I prefer the torrent file as it is a smaller initial download and if I ever want to delete the ISO I can easily redownload it from the torrent file without having to go and download the entire image again from the site. Also, I use 64-bit but you can utilize whichever image best suits your system. I choose this image not only for virtualized installations but also because when I decide to install it as the main OS on my computers it works with the hardware I already have.

Second you will want a bittorrent client if you do not already have one, the one I like to use is uTorrent and can be downloaded from https://www.utorrent.com.

Finally make sure you have the newest version of virtualbox by going to https://www.virtualbox.org and download then install the newest version there, as of this post the newest version is 6.0.

Now that we have the prerequisites out of the way as far as software and downloads, we can begin setting up the environment for installation of Kali. Open virtualbox and select New.

Oracle VirtualBox Manager window

Once selected the Create Virtual Machine window will appear where you can type in the name of the operating system, select the type, and version. Utilizing the naming scheme I have it will automatically select Linux for you as the Type and you will just have to alter the Version. As Kali is a variation of the Debian Linux distribution this is the version you will want and select either 64-bit or 32-bit depending on the ISO you decided to download.

Name and operating system of guest virtual machine.

Click Next to bring up the Memory size menu and select how much memory you would like to allocate for your virtual machine while it is running. As I tend to do a lot with Kali at times I like to allocate 8GB though you can allocate the recommended size of 1GB or as much as you want as long as you do not exhaust the memory of your entire system, you do still need some for your host operating system to run everything as well.

Memory size selection

Click Next to bring up the Hard disk menu and choose Create a virtual hard disk now.

Hard disk creation screen 1

Here you will choose the file type, as this is a virtualbox image and unless you plan on eventually migrating to VMWare, then choose VDI for the VirtualBox Disk Image.

Hard disk file type VDI

After choosing the hard disk type you can then decide whether you want a Dynamically allocated hard disk which will expand when necessary, or fixed size which is limited to whatever size you set it to. I choose Dynamically allocated as I tend to download a lot of password lists, updates, and other software that I run out of space on occasion.

Dynamic storage hard disk

The final step in creating the virtual hard disk is selecting the drive size and where you will save your image file to. I like to go with 80GB since I have the storage space and save it to my Data drive for space reasons, you can use less or more the size is completely up to you. However, I would not go less than 10GB as a personal opinion. Also, the default save location is on your local C:\ drive in a virtualbox images folder.

Image save location and hard drive size

Now that the drive is created it is time to modify some settings to help with resources, and also mount the ISO file. You will see the opening virtualbox window, now with your created hard drive there, select it and click settings.

Oracle VirtualBox Manager

The first setting I changed was under Advanced, the settings modified were to allow bidirection clipboard and drag ‘n drop with the host operating system. I do this since there are times I have files on my host or other editing programs that I do not have on Kali. In this initial menu you can also click Description, to put in a description of your virtual machine, or Disk Encryption, if you would like the virtual disk to be encrypted.

General -> Advanced

After adjusting the settings in General, we move onto storage so that we can mount the ISO file that we downloaded. So go to Storage, chooses the drive listed under Controller: IDE and then select the disk drop down next to Optical Drive: so that we can Choose Virtual Optical Disk File, and mount our newly downloaded Kali ISO file.

Storage -> IDE

iso file selection

Now it is time to start our guest and begin installing Kali Linux, so select Start on our virtualbox program to startup our Kali guest. When it starts up select the Graphical Install option.

Oracle VirtualBox Manager

Kali Boot menu

The first screen that appears after selecting Graphical Install is language selection. Select whichever language you are comfortable with and click continue.

Kali language selection

After language selection is the location selection. Select your location and once again click continue.

Kali location selection

Following that is the keyboard type selection. Once again select the type that fits you and click continue.

Kali keyboard configuration

The installation will now detect your networking equipment and any other hardware. This phase is pretty quick. Once complete it will ask you to enter the Hostname for your machine, this can be anything I chose to name mine SCSKali as this system will be used for Scheller Cyber Security.

Kali network configuration

Kali hostname creation

After clicking continue you will be brought to the domain screen, if you are putting this on a domain then feel free to join it, I will not be entering anything as this virtual machine will not be a part of any domain. If you are like me then just continue past this screen.

Kali Domain name screen

After you pass the domain name screen you will then be asked to create a root password. As you use root for most things in Kali it is best to create a long passphrase so that your box can not be easily compromised should you open yourself up to outside attacks.

Kali root password creation

After you move on from here you will configure the time zone for your system.

Kali timezone selection

As this is an easy install aimed mainly at beginners we will use the Guided - use entire disk method of partitioning without LVM or encrypted LVM.

Kali partitioning step 1

Select what should be the only partition available and click continue.

Kali partitioning step 2

Again as this type of installation is geared toward beginners select All files in one partition and continue on.

Kali partitioning step 3

The next screen just wants to validate your settings, as long as you like what you see go ahead and select continue to finish partitioning and write changes to disk.

Kali partitioning step 4

Kali partitioning finalize

After your finalize all changes to the hard disk Kali will begin installing all files to the drive.

Kali system installation

After the system does the initial installation you will be asked if you want to use a network mirror to install any software that is not on the base image. I always say yes and continue on.

Kali network mirror

If you are using a proxy server you will be prompted to enter the information, as I do not have one running right now I left it blank and continued on. You will now see Kali scan the network mirror for updates to apt as well as other software.

Kali Proxy info

Kali package manager

Once that completes you will be asked whether or not you would like to install the GRUB boot loader to the master boot record. Since this should be the only image on the virtual hard disk then you will select yes and continue.

Kali GRUB install

Unless you created multiple partitions you should be able to select the only hard drive available and install GRUB to there by selecting it and then clicking continue.

GRUB drive selection

Once the GRUB installation completes you have now finished this part of the installation, however we still need to install the tools for virtualbox inside the guest. As such click continue and allow the guest Kali operating system to reboot.

Kali installation complete

Once the system reboots you should now be looking at the login screen for Kali. The username is root, and the password is going to be what you created earlier in the installation.

Kali login username

Kali root password

Once you are logged in bring up your terminal and enter:

apt-get update -y

The -y will automatically agree to any space that is needed or freed and allow the update to proceed without user intervention.

apt-get update -y

After the update completes enter in the following command:

apt-get install virtualbox-guest-x11

Note that I didn't add the -y in the screenshot below you will see the prompt asking if we want to continue with the install noting the software that is going to be installed and how much space will be used. Input y and hit enter/return.

vbox tools install

vbox tools install prompt

Once the installation finalizes you will be brought back to your home prompt. Input reboot and hit enter/return to restart your system.

Congratulations you have now completely installed Kali to a brand new Virtualbox image. Stay tuned for more information on how to download and run the Discover scripts by Lee Baird as well as some Metasploit tutorials.

  • Black Twitter Icon
  • Black YouTube Icon

Pittsburgh, PA, USA

©2017 Scheller Cyber Security | Proudly created with Wix.com