If you do cyber-security work at all you probably know Kali Linux.

My desktop distro is Ubuntu and I wanted to set up Kali Linux in a VM using VirtualBox.

Kai installs in a VM just fine but I wanted to get full screen resolution so that I could have an my tools running and visible at time same time.

I followed the normal install procedure – though yy machine doesn’t run VMs well with the default memory allocation so I bump RAM up to 2 gig and video ram to at least 64meg)

Since I wanted to be ale to run the VM in full resolution, I went to install the Virtual Box Guest Additions.

Since the installer wouldn’t run from the virtual CD (permissions issue) so I copied VboxGuestAdditions.run from the mounted VBOXADDITIONS_5.1.22_1115126 disc to  my desktop :



cd /root/Desktop

chmod 755 ./VBoxLinuxAdditions.run

./VboxAdditions.run


/var/log/VBoxGuestAdditions.log just pointed me to another log file.

Mmmmmmm……..

Using the universal debugging tool (Google.com) I found several blog posts about installing the VBoxExtensions for Linux and none of them directly worked for me.

So here’s the combination that finally got the VirtualBox Guest Extensions installed and running for me.

Before proceeding you may want to run the uninstaller   “VBoxLinuxAdditions.run uninstall” to get to a clean state.

Then you want to add the Kali sources to your sources list.



leafpad /etc/apt/sources.list


Paste



deb http://http.kali.org/kali kali-rolling main contrib non-free
deb-src http://http.kali.org/kali kali-rolling main contrib non-free

Then run updates…..



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


Then install ….



apt-get install build-essential
apt-get install module-assistant


You also have to install the correct headers for your Kali install.

Run ….


apt-cache search linux-headers

Scroll through the output of the apt-cache search and find the exact line for the headers for your machine.

Then run …..


apt-get install linux-headers-4.12.0-kali2-all-amd64


Now you can install the guest additions using THIS command.


apt-get install virtualbox-guest-dkms


When the install completes, reboot your machine.

This worked for me on two separate machines – hope this helps save someone some time 🙂