Thursday, September 10, 2015

Installing VirtualBox DKMS in Kali 2.0

 


Kali linux is one of the mainly used operating system by the Ethical hackers and information security professionals. This write up is a small one which covers the solution for a proper upgrade to Kali 2.0.

How to upgrade Kali linux to 2.0?

The latest version which got released is "Sana" Kali 2.0. I had a hard time upgrading to Kali linux 2.0 lately and lot of things did not work and the hard part is installing virtual box DKMS. It was giving error and I tried most of the things but it did not work. After 2 days of struggle I was able to complete it. The steps are as below. Linux Kali 4.0.0-Kali1-amd64 is the kernel version in Kali 2.0 which is based on Debian Jessie, it aso packs with improved hardware and wireless driver coverage, support for a variety of Desktop Environments like gnome, kde, xfce, lxde etc.


The main features of Kali 2.0 is that its a rolling distribution which means all the packages are pulled from Debian testing and upgrades the Kali core linux. The other feature is that you can see alert system in the desktop whenever there is an update for the new package. There are still many features which I have not covered here.

#Below command to update the repo to latest.

 cat << EOF > /etc/apt/sources.list
 deb http://http.kali.org/kali sana main non-free contrib
 deb http://security.kali.org/kali-security/ sana/updates main contrib non-free
 EOF

#command to do update and upgrade.
 apt-get update
 apt-get dist-upgrade 
 reboot

what is DKMS?


Dynamic Kernel Module Support (DKMS) is a program/framework that enables generating Linux kernel modules whose sources generally reside outside the kernel source tree. The concept is to have DKMS modules automatically rebuilt when a new kernel is installed.

An essential feature of DKMS is that it automatically recompiles all DKMS modules if a new kernel version is installed. This allows drivers and devices outside of the mainline kernel to continue working after a Linux kernel upgrade.

Another benefit of DKMS is that it allows the installation of a new driver on an existing system, running an arbitrary kernel version, without any need for manual compilation or precompiled packages provided by the vendor.

DKMS was written by the Linux Engineering Team at Dell in 2003. It is included in many distributions, such as Ubuntu, Debian, Fedora, and SuSE. DKMS is free software released under the terms of the GNU General Public License (GPL) v2 or later.

DKMS supports both the RPM and DEB package formats out-of-the-box.

Steps to do proper DKMS installation.

 sudo apt-get install build-essential dkms
 sudo apt-get remove --purge virtualbox-dkms

*For some crazy reason there is a bug report which says you need to reboot the OS before installing again. so the reboot and issue the below command.

sudo apt-get install virtualbox-dkms


The other important thing is that Kali 2.0 does not ship with metasploit pro. The latest version includes only the open-source based metasploit framework. The pro version can be downloaded from the Rapid7 website. The starting of metasploit service also got changed , please note it below. 

 /etc/init.d/postgresql start
 msfdb init
 msfconsole

Note: Please post your suggestion or if you find a new way to do this in the comment section.
Update to the post, please add the user to vboxusers to enable all usb redirection and other stuffsExecute sudo adduser YOURUSERNAME vboxusers, log out and log in again.. 

No comments: