Installing Kali Linux in VirtualBox

kali-logo

 

Kali Linux is a Debian-based Linux distribution aimed at advance Penetration Testing and Security Auditing. Kali contains several hundred tools aimed at various information security tasks, such as Penetration Testing, Forensics and Reverse Engineering. Kali Linux is developed, funded and maintained by Offensive Security. It was released on the 13th March 2013 as a complete top-to-bottom rebuild of BackTrack Linux, adhering completely to Debian development standards.

The first thing to get straight is if your looking for a distribution to learn Linux or are looking for a general-purpose Linux desktop distribution, web design, gaming etc Kali should not be your first choice. Instead go for a Linux distribution like Ubuntu or Mint.

There is a version of Kali for almost every type of computer, from  raspberry pi to Chromebooks, they have a more light weight versions for older PCs or for customizing your own image, there is even pre-built virtual machine that you just load into VirtualBox  or VMware .

The version of Kali we are going to be installing now is Kali 2016.2 64bit  GNOME 3 version which normally can be found at the top of there download page and ill be installing it into VirtualBox. Theirs a quick how to install VirtualBox in my Setup a Hacking Lab tutorial but otherwise i will assume this is already installed.

So download the ISO, Open up virtual box and we can get started.

 

Create TheVirtual Machine

 

 Step 1

Once VirtualBox is open click New and you should be presented with a Create Virtual Machine window.

vbkali1

Start of by adding a name for your Kali VM, changing the Type to linux and the version to Debian  (64-bit). Next set the memory to 2048 MB for now, if needed you can always change this at a later date, lastly make sure its checked on create a virtual hard disk now and click Create.

 

 Step 2

vbkali2

Now we can create our Virtual Hard disk that kali is going to be installed on. Firstly choose how large a disk you want to create, I normally choose between 30GB and 60GB then select what type of file the hard disk will be. I am choosing VDI as its the virtual box default, but you may want to select a different version like VHD if you wanted to use this virtual machine in some other virtualization software after its been installed. Leave Storage on physical hard disk set to Dynamically allocated as this will keep your VM from taking up a load of disk space that is not needed. Then click create and our virtual hard disk will be get created.

Next i just want to set the network and insert the iso into the virtual CD drive. So within VirtualBox manager right click your new VM and click settings.

 

 Step3

vbkali3

Once the settings is open go down to the networking tab and you want to set the Attached to setting to Bridged Adapter and click the advanced button  and choose which network adapter you want to use and set promiscuous Mode to Allow All.

 

 Step4

vbkali4

Now move down to Storage and add the Kali Linux ISO that we just downloaded to the Controller:IDE by clicking the little picture of a CD and selecting choose virtual optical disk file then browsing to where you saved your Kali ISO, Once found click ok and we are ready to start installing Kali into our new VM.

 

 Installing Kali

 

 Step1

kaliinstall1

Click your newly created Virtual Machine, the Kali installer will run from the ISO we added to the virtual CD, then you should get presented with all the options above, use the arrow keys on your keyboard to select Graphical Install and hit enter.

 

Step2

kaliinstall2

Select your language and click continue.

 

Step3

kaliinstall3

Then select your location and click continue.

 

Step4

kaliinstall4

Now select what type of keyboard you are using and click continue.

 

Step5
kaliinstall5

The Core installation components will start to install

 

Step6

kaliinstall6

Next enter a hostname for your Kali image, this should be something that identifies your VM on the network then click continue.

 

Step7

kaliinstall7

Enter a domain name, I am going with WORKGROUP as this is the default when you setup networking in windows, you can choose anything but make sure all your PCs are on the same domain and click continue.

 

Step8

kaliinstall8

Enter a password for the root user and again to verify and click continue.

 

Step9kaliinstall10

Its time now to setup the disk partitions, make sure Guided – use entire disk is selected  and click continue.

 

Step10kaliinstall11

It now  asks what hard disk we want to install kali to, as we have only setup one just click continue.

 

Step11kaliinstall12

Next we need to choose the partition scheme just make sure All files in one partition (recommended for new users) is selected  and click Continue.

 

Step12kaliinstall13

Now we need to just confirm all our changes to the partitions. Make sure Finish partitioning and write changes to disk is selected and click Continue.

 

Step13

kaliinstall14

and we get one last conformation “are we really sure you want to write to the disk” Just select yes and click continue.

 

Step14

kaliinstall15

It will now start installing Kali to the disk this took me about 7 Mins to run through.

 

Step15

kaliinstall16

We need to now configure the package manager, make sure Yes is selected and click continue.

 

Step16

kaliinstall17

If you need to connect to the internet via a proxy enter the proxy information here otherwise leave it blank and click Continue.

 

Step17

kaliinstall18

Now it goes off and installs the apt-get package manager just leave this to run through.

 

Step18

kaliinstall20

Next its time to install the Grub boot loader, but as we have only one OS running in our VM this is as simple as making sure Yes is selected and click Continue.

 

Step19

kaliinstall21

We then need to select which drive we want to install the GRUB boot loader to, again as there is just the one partition setup just select /dev/sda and click continue.

 

Step20

kaliinstall22

It now goes off and installs the Grub Boot loader.

 

Step21

kaliinstall23

Just click continue one last time, it should finish off the installation and clean up and remove any live packages.

 

Step22

kaliinstall24

Once the VM has rebooted you should get presented with a login screen, type root as the username then hit enter, then type the password you setup earlier and hit enter again.

 

Step23

kaliinstall25

Boom you now have installed Kali…..But wait there are a couple of other things left to do. We need to update everything and install the VirtualBox guest additions.

 

Updating Kali and Installing VirtualBox Guest Additions

 

Step1

kaliinstall26

Open up a terminal by clicking the icon on the left hand side, then type apt-get update && apt-get upgrade, this updates all the Kali repositories and then upgrades Kali and all its tools to the latest version.

 

Step2

kaliinstall27

In the apt-get upgrade stage it will ask if you want to continue just type Y and hit enter. This might take a while, it all depends on how fast your broadband is.

 

Step 3

Once everything has updated we need to just install the VirtualBox guest additions, this allows all the cool extra VirtualBox features to work. The Kali documentation says simply type apt-get install -y virtualbox-guest-x11 but i have found this has some issues with the latest version of VirtualBox, so we are going to use the guest additions CD.

kaliinstall30-2

First install the linux headers by typing apt-get update && apt-get install -y linux-headers-$(uname -r) This makes sure all you apt-get reposatories are up to data and then installs the latest version of the headers.

 

Step4kaliinstall29

Next we need to load the additions CD image into VirtualBox, just click Devices then Insert Guest Additions CD image in your VirtualBox window.

 

Step5

kaliinstall31

now copy the the VBoxLinuxAdditions.run off the additions CD  to your desktop and change the permissions so we can run the file.

So in your terminal type

cp/media/cdrom/VBoxLinuxAdditions.run ~/Desktop/  #This copies the files off the CD to your desktop
cd Desktop #changes directory to your desktop#
chmod 755 VBoxLinuxAdditions.run #Changes the permissions of the file so we can run it

 

Step6

kaliinstall32

Now we just run the file by typing  ./VBoxLinuxAdditions.run This will take a little while to install.

After the guest additions have installed, just type reboot and hit enter. Kali will reboot and all the cool features like shared clipboard and screen resizing will start working.

Keep your eyes open on my blog as i am going to be building on this base Kali install with other tutorials coming very soon also please comment below if you have any questions or feedback for me.

 

Leave a Reply

Your email address will not be published. Required fields are marked *