Building an ethichal hacking lab on your laptop with VirtualBox – Part 12 – Kali Linux

Kali Linux is a Debian based penetration testing distribution created by Offensive Security for the purpose of making it easier to carry out penetration tests or security audits by having more than 600 tools easily available.

It is fully customisable and runs on a number of different devices, it was covered in a previous tutorial when I installed it from source in order to get wireless injection working and received a lot of interest.

This team has been around for some time and had previously created and maintained Backtrack Linux, Kali Linux however is a complete overhaul of the OS so that it can run on as many devices as possible and is fully customisable.

Let’s start and get it installed!

Download it from here and take a sneak preview of Kali 2.0 which I am very excited about, I see a sneak preview of the reaver Pixie attack towards the end too which looks fast!

Give your machine a name, select the type ‘Linux’ and the version ‘Linux 2.6 / 3.x (64Bit)’ or the version of your own architecture if it is 32 Bit for example and then click ‘Next’

1 - VirtualBox Create Kali Linux virtual machine

1 – VirtualBox Create Kali Linux virtual machine

Allocate a chunk of memory to the system and click ‘Next’, 2 or 3GB’s is fine

2 - Allocate a chunk of memory to Kali Linux

2 – Allocate a chunk of memory to Kali Linux

Create a virtual hard drive for Kali by clicking ‘Create’

3 - Create a virtual hard drive for Kali

3 – Create a virtual hard drive for Kali

Click ‘Next’ to continue and create a VDI image

4 - Create a virtual hard drive for Kali select VDI

4 – Create a virtual hard drive for Kali select VDI

Select ‘Dynamically allocated’ and click ‘Next’ to continue

5 - Create a virtual hard drive for Kali select dynamically allocated

5 – Create a virtual hard drive for Kali select dynamically allocated

Allocate some hard drive space to Kali and give it a nice chunk as this system may fill up quicker than you expected for some things. Click ‘Create’ to continue

6 - Allocate hard drive space to Kali

6 – Allocate hard drive space to Kali

Next navigate to settings and change System first by removing the floppy and moving the CD/DVD to the top and the Hard Disk second from the top

7 - VirtualBox remove floppy move disc and hard drive

7 – VirtualBox remove floppy move disc and hard drive

Select the ISO on you hard drive

8 - Select Kali Linux ISO

8 – Select Kali Linux ISO

Now we are going to select NAT and click on ‘OK’ for the initial install so that we can update and upgrade the system to the latest version of everything before changing it into internal only mode for testing in the lab

9 - VirtualBox Kali keep NAT as NIC

9 – VirtualBox Kali keep NAT as NIC

Now it’s time to startup the machine, select ‘Graphical install’ at the boot menu to continue

10 - Select Graphical Install

10 – Select Graphical Install

Select your language to continue

11 - Select your language

11 – Select your language

Select your country

12 - Select your country

12 – Select your country

Select your keyboard layout

13 - Select your keyboard

13 – Select your keyboard

Wait for the loading to finish

14 - Loading Kali components

14 – Loading Kali components

Give your system a name

15 - Kali system hostname

15 – Kali system hostname

Leave the domain blank if you don’t have one and click ‘Continue’

16 - Leave domain blank

16 – Leave domain blank

Enter in the password you want to use for root

17 - Enter Kali root password

17 – Enter Kali root password

Select ‘Guided – use entire disk’ and continue

18 - Select Guided - use entire disk

18 – Select Guided – use entire disk

Yes you are sure you want to erase everything and continue so just click on ‘Continue’

19 - Yes I want to erase everything

19 – Yes I want to erase everything

Select ‘All files in one partition’ and click on ‘Continue’

20 - All files in one partition

20 – All files in one partition

Click on ‘Continue’ to finish off the partitioning

21 - Partition Kali disk

21 – Partition Kali disk

Once again select ‘Yes’ and click ‘Continue’ to erase and install

22 - Erase it all

22 – Erase it all

Next comes copying files to disk and installing the system once the partitioning has finished

23 - Copying files to disk

23 – Copying files to disk

Select ‘No’ to not use a mirror and click ‘Continue’

24 - Kali don't select a mirror

24 – Kali don’t select a mirror

Wait for a little bit while and then select ‘Yes’ to install the GRUB boot loader to the hard disk

25 - Kali continue select grub

25 – Kali continue select grub

You’re nearly finished

26 - Kali nearly finished

26 – Kali nearly finished

When it’s finished you will see the following screen, select ‘Continue’ to finish the install

27 - Kali finished select Continue

27 – Kali finished select Continue

Don’t worry if it looks like this for a while

28 - Kali finishing installation

28 – Kali finishing installation

Finally you get to the login screen. Enter the username ‘root’ and your password entered earlier to login.

29 - Kali login screen

29 – Kali login screen

Now you have probably noticed the screen is not in full screen and you have to move a slider around but we can fix that by installing ‘VirtualBox Guest Additons’ but first we need to update the system first so run the following

apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y

The above commands will string together the update and upgrading of the system to the latest version and accept the downloads along the way with a ‘y’ for yes

30 - Kali system update upgrade dist-upgrade

30 – Kali system update upgrade dist-upgrade

Let the system work away for a while and let it upgrade the system, feel free to get up and walk around and come back to it again in a bit as this may take some time depending on your Internet speed and memory allocated to the system

31 - Kali upgrading

31 – Kali upgrading

Once finished upgrading it will look like the following below without any errors

32 - Kali upgrading finished

32 – Kali upgrading finished

Next select and install VirtualBox Guest additions by selecting devices from the VirtualBox menu

33 - Select to install guest additions

33 – Select to install guest additions

Next run the following

cp /media/cd-rom/VBoxLinuxAdditions.run /root/
chmod 755 /root/VBoxLinuxAdditions.run
cd /root
./VBoxLinuxAdditions.run

34 - Installing guest additions fail

34 – Installing guest additions fail

As you can see the above has failed as we need to update the headers to so let’s do that and get full screen!

Open the sources.list file in /etc/apt/

35 - Check the sources file

35 – Check the sources file

Add in the following line

36 - Add to sources list

36 – Add to sources list

After saving the file run an update with

apt-get update

37 - Kali update

37 – Kali update

Updating the Kali headers works now

apt-get install -y linux-headers-$(uname -r)

38 - Updating the Kali headers works now

38 – Updating the Kali headers works now

And finishes without error

39 - Kali headers finish without error

39 – Kali headers finish without error

VirtualBox guest additions will now also complete

40 - VirtualBox guest additons now completes

40 – VirtualBox guest additons now completes

reboot and then you will get full screen

41- Kali reboot

41- Kali reboot

Full screen is great as it will make your life a lot easier in the long run

42 - Kali VirtualBox Guest additons full screen

42 – Kali VirtualBox Guest additons full screen

Take a look around and see what you can do so far with the lab and remember to put it back into internal NIC mode before you do!

43 - Kali internal NIC mode

43 – Kali internal NIC mode

 

 

One thought on “Building an ethichal hacking lab on your laptop with VirtualBox – Part 12 – Kali Linux

Leave a Reply