Over the past month I have built THREE virtual labs on different machine, and I came across the same two problems all three times that none of the guides I read mentioned and so as this blog is about the issues I came across and what I am doing I thought it would share with you how to install Linux Kali onto VirtualBox using a Windows 10 operating system.
Even the discussion of how to install Kali is one I have googled around and read blog posts, forum posts and discussed in Discord as there are several different ways to use Kali:-
- Full Install onto the laptop.
- Virtual install in VirtualBox, Hyper-V, VMware etc
- Partitioned install using some of the HDD/SSD on the laptop but leaving the main Operating System there to use also.
- Live Disc, where the Kali build is installed on a USB drive or CD (anyone actually still using these?) and this is a complete bootable OS which runs directly from USB/CD without affecting the main OS install at all.
During these discussions and reading about peoples experiences and especially given what I was going to be using it for I decided to finally opt for the Virtual Install or VM as I will be calling it from now on, short for ‘Virtual Machine’. The reasoning for this is because in a hacking lab where you are messing about with networking settings, running scripts and loads more it is VERY EASY to mess the OS and setting up and with a VM you can keep snapshots of when you had it working and set up to your preference.
A VM snapshot is basically just a full copy of your VDI (Virtual Disk Image) so if/when you mess up you just delete the VDI you were using, copy the snapshot and all is good in the world again regarding your lab.
Right, back to the VirtualBox Kali install and the FIRST issue I came across was AFTER I had installed VirtualBox and at beginning of setting up Kali so I will tell you here now before beginning so you are aware, all three laptops I set the labs up on all came across the issue where Virtualization (VT-x/AMD-V) was switched off in the BIOS and needed to be enabled, here is how it’s done.
For me, the following is what I did on my HP:-
- Power on.
- Hit ESC for start-up menu.
- Hit F10 for BIOS menu.
- Go to System Configuration tab.
- Go down to Virtualization Technology.
- Select Enabled.
- Escape BIOS saving settings.
If you don’t have an HP then don’t worry as I found a fantastic blog post over on 2N WIKI that has instruction on pretty much every laptop type on setting this up and the link is HERE!
So we have enabled our VT-x/AMD-V) towards installing Kali Linux in VirtualBox and the next thing to do is to download and install VirtualBox from HERE but wait… don’t just install the VirtualBox client as that is the SECOND issue I came up with, also install the ‘VirtualBox 6.0.12 Oracle VM VirtualBox Extension Pack’ on the same page.
It wasn’t for Kali that I needed the extension pack for but I was getting errors when trying to install Windows Server 2016 and the resolution I found online that worked was installing this pack so just download and install when on the page already.
Next, you need to obviously go to the page of Linux Kali and download the latest build.
NOW we are ready to install Kali on VirtualBox as our VM to use 😃 happy days.
Open up the newly installed (I am assuming) VirtualBox and click on ‘New’.
Type in Kali Linux as the name.
Choose memory size.
Choose to Create a virtual hard drive now.
Select VDI (VirtualBox Disk Image).
Choose Dynamically allocated.
Select your disk size, it is set at 8GB but would put minimum 10GB, I personally went with 20GB then click create.
We now need to change the setting on the VDI before the actual install.
On the Kali VDI click settings.
In general, then advanced change the clipboard and drag and drop to ‘Bidirectional’ so can share between the host laptop and VM.
Go to Storage > Controller: IDE, highlight the empty CD icon under Attributes: CD/DVD Drive: IDE Secondary Master and choose the Kali .iso and then ok.
From there you can start the Kali VDI and install the OS for real.
Click Graphical Install > Choose Language > Choose Country (for time zone) > Choose Keyboard > Hostname (I am leaving at Kali) > Choose whatever domain name you want to use, I am leaving black for my lab > Choose ROOT password or it will stay as the default one with is TOOR > Choose new user > Password then Continue.
From there we select the partition disk > Choose your new VirtualBox Kali Disk > Choose Guided Partitioning > Guided – use entire disk > see the screen below and click next.
Choose all files in one partition > finish partitioning and write the changes to disk then continue.
Choose yes to write the changes and then it will start to install the system:-
This can take anything from ten to thirty minutes depending on your set-up.
I choose no for a networked mirror and it will ask to start installing the GRUB boot loader which i will install on the VM space will continue to finish the install.
Continue to complete the install and when it goes through the final motions you are greeted with this BEAUTIFUL looking screen…
And we can log in and see this following screen WHERE IT ALL BEGINS!
And that’s it for this time folks, have to say that I enjoyed doing this post a lot more than i thought i would and it was NOT the original topic i was going to post about as I’ve been studying up on proxychains and DNS leaks that i was going to write about but will leave for another time.
Think for my next post I will continue with the Linux Kali theme and post how to update/upgrade before starting in the OS.
Also, plan to add a server along with both a Windows and Linux OS for playing around in.
The last image of the post is a full shot of my Linux Kali settings i like to use on my VM:-
Thanks again for ANYONE that has read through the blog or interacted in any way at all, please feel free to share around to anyone you think might find it handy.
P.S I got myself a Bash Bunny from HAK5 that i will be messing around with to post about.