2 years ago 2 years ago Linux Share

How to Install Kali Linux On VirtualBox


Difficulty
Interest
Education
Overall

If you have a relatively modern PC or Mac, you can install Linux (e.g. Kali Linux) as a Virtual Machine. Which is in some ways like having an entire second computer, for the price of maybe an hour of time downloading things and changing settings — as this page will describe.

Kali is a version of Linux that's based on Debian Linux. Kali comes pre-packaged with a large collection of tools which are very useful in the world of Cyber Security.

Some people say it's much better to learn basic things like networking before trying to learn or even look at (or install) Kali. However, I don't think there's much reason why you can't do both of these together.

A couple of years ago, there were some valid reasons to not use Kali, unless you were performing security-specific tasks that required several of the packages in Kali. One of the reasons was that by default, Kali used to run as the "root" (i.e. master administrator, a.k.a. "superuser) account. Current versions of Kali have removed this problem, and you log in as an ordinary user, and not as root.

In some ways Kali is now better in this respect than Windows. By default, Windows gives many administrator priveleges to the main user account that most people log into and use for their daily computer activities. Which is in general a very bad idea for security — since many types of successful attacks on your system, while you're logged in as a user with administrator priveleges, will then give those priveleges to the hacker.

Steps to Install Kali Linux on VirtualBox

1. Install Oracle VirtualBox

Note that if you have a Mac, as of about a month ago (and I haven't looked to see if this problem has been fixed yet), the most recent one or two versions of MacOS do not run VirtualBox. There will most likely be an update to VirtualBox so that it does work on current versions of MacOS. But, until this happens, you can use VMware instead. The free version of VMware is fine for this.

VirtualBox is also free to download and install, as is everything on this web page.

You can download VirtualBox from this page (if it's changed, just do an internet search for VirtualBox, and look for the downloads section). The URL should be virtualbox.org which is the proper website (and not some other random pretend website, in case there are any of those out there).

There are various options for "hosts", i.e. what type of operating system are you going to be using to run VirtualBox on. This is probably the same operating system you're using right now to read this web page, e.g. Windows.

Download the install file from the link above.

Also, download the "Oracle VM VirtualBox Extension Pack" which is a link lower down on the page. It's the same download for all the different operating systems. Some features of VirtualBox need to have this installed also, so you might as well get it now.

Then, install VirtualBox from the first file you downloaded.

After that, install the extension pack too.

2. Download Kali Linux for VirtualBox

Kali Linux is used on VirtualBox so often that they provide a special download as a VirtualBox image, which is a pre-installed version of Kali which works on VirtualBox. This is a big saving of time and effort to actually go through the installation process of installing Kali Linux itself (as you normally would install a new operating system).

Go to the Kali website, and go to the "Get Kali section". Then pick "virtual machines" and the 64 bit VirtualBox one . This file is an ".ova" extension file and is fairly large, about 3.75 GB.

(If you are using VMware — which is a different virtual machine simulator to VirtualBox — e.g. if you have a Mac that can't run VirtualBox, or perhaps if you already use VMware or just like it better than VirtualBox, then get the VMware one. I haven't tried it on VMware, so the rest of this page will describe setting up Kali to run on VirtualBox. Though many of the concepts and even some of the options/settings would be the same, or very similar, for VMware.)

3. Open VirtualBox Manager and Import the Kali Linux .ova Image File

Open the program called Oracle VM VirtualBox Manager (which would have been added to your machine when you installed VirtualBox in step 1 above).

In your list of programs (e.g. on the Windows taskbar) it's probably under "O" for "Oracle". On my Windows 10, it's called "Oracle VM VirtualBox", and then when you run it, the title bar of the app is Oracle VM VirtualBox Manager.

You don't want to create a "new" virtual machine (unless you want to manually install Kali Linux yourself, which would mean not downloading the .ova file, but a different one).

You want to "Import Appliance" which is under the "File" menu and the icon looks like a yellow "n" shaped upside-down U-turn arrow. You can also press Ctrl-I to get this option.

It will say something like "Please choose a file to import the virtual appliance from..." Find your .ova file here and select it.

Then click on "Import".

4. Adjust Some Settings in VirtualBox Manager

Once it's imported you should be able to see it in the list of virtual machines you have installed within VirtualBox on the left of the VM VirtualBox manager window. If you have only just freshly installed VirtualBox it will be the only one there.

You can then click on it, and click on the "Settings" option. Which looks like a yellow gear icon.

Most of the settings should be automatically set when you import the .ova file, so you may not need to change anything at all.

In the General/Advanced section, I've set the Shared Clipboard to "Bidirectional" which means I can copy and paste things from Windows to Kali.

For "System/Motherboard", I've given Kali 4096 MB (i.e. 4GB) of Base Memory (i.e. RAM). You can give it more if you like and have a lot of actual physical RAM in your machine. Don't give the virtual machine all of the RAM in your physical machine or there may not be enough left for your underlying operating system (e.g. Windows) when Kali is running.

For "System/Processor" I've got 2 CPUs, and a 100% execution cap, and the "Enable PAE/NX is turned on".

For "System/Acceleration" I've got Paravirtualization interface as "Default", and the Enable Nested Paging is turned on.

For "Display/Screen" I've given Kali 128 MB of Video Memory. I think this is more than the default that it had originally.

I've given it one monitor, and the Graphics Controller is set to VMSVGA, and "Enable 3D Acceleration" is turned off.

For "Network/Adapter 1", to get the internet working in Kali, the network settings may work better with NAT mode— or possibly otherwise in Bridged Adapter mode. If one of the modes doesn't work, try the other one. They might both work.

In "USB" I've enabled USB, and selected USB 3.0.

I don't have any shared folders, though you could share a folder between your main OS and Kali. I didn't do this as a security precaution, though if you're careful it's probably not that much of a worry. I would think sharing your main C:\ drive in Windows would not be the best idea in terms of security. One of the whole points of having a virtual machine is that it's isolated from the rest of your system — so that if anything gets attacked/hacked when you're using the VM, then (ideally) it can't get out of the VM and into your main operating system. Sharing folders would enable some transfer between the two operating systems. (Even sharing the clipboard would do this, to a lesser extent, and if you're worried about that you may not want to share the clipboard, or only share it in one direction e.g. from Windows to Kali and not the other way around).

Starting Up Kali Linux

Now you should be able to close the settings window and then click on "Start" to boot up your new Kali Linux Operating System.

Now you have a whole entire new operating system you can use anytime you like. It's almost like having a free second computer.

By default, in current versions of Kali, the username and password are both "kali". It would be a good idea at some stage to change the password to something that isn't totally generic and guessable by anyone (like "kali" is).

Once your Kali is running, there are a few other things you can do to improve it.

You may have to experiment with screen settings to get the full resolution of your monitor in Kali in full screen mode. I think it was quite easy for me to get this to work, and a lot easier than to get Virtual Windows 10 to run at my full screen resolution (which is 1920 x 1080).

When you're running the VM, you can press the RIGHT hand side Ctrl key to control options for VirtualBox. For example, RIGHT Ctrl-F goes in and out of full screen mode.

The LEFT hand side Ctrl key will work inside Kali itself like the usual way the Ctrl key works within the OS.

Further Notes

There is a BIOS setting in some PCs (especially AMD ones) which may need to be turned on for the virtual machines to work properly. It might be already turned on by default. But if you have a problem getting anything to work at all in virtualbox that is a possible reason. In that case you would need to reboot your physical machine (not just the VM), and go into the BIOS setup program, and turn on the option for virtualisation. I think in most modern computers, it would be already turned on by default.

You can internet search on how to install Kali on VirtualBox (or VMware if you prefer it) for more tips.

Cover image by Shutterstock

Byte.Yoga Homepage - Australian Cyber Security Web Magazine

Share This Page

If you liked this page, please share it with others! You can use the links to share on Facebook, Twitter, LinkedIn, Pinterest, and Email. Ther is also an RSS feed to get updates for the website.