So youβre ready to get your hands dirty and start hacking? Excellent. If you havenβt set up a virtual machine before, the task can seem a little confusing. Youβve made a good choice using VirtualBox as your hypervisor, so that much is done. But even with that out of the way, there are still multiple methods to get Kali installed and running.
The good news is, weβre here to walk you through it. This article is designed to be followed along with. We will go over what VirtualBox is, in case youβre somewhat unclear as to why you need to use a program like that and discuss how it functions. Then weβll cover all the system requirements you need and get VirtualBox downloaded and installed.
Finally, weβll walk you through two methods to install Kali Linux and get your new hacking OS configured. So walk with us as we cover how to install Kali Linux on VirtualBox.
What Is VirtualBox?
To understand what VirtualBox is, you need to understand virtualization. Virtualization allows an operating system to operate within a contained environment on top of your existing operating system.
Simply put, you are creating a nearly fully functioning computer within your current computer. This new system (called a virtual machine) will respond to commands, run its own software, and access the internet as if it were its own physical machine.
Three terms you will need to know are βhypervisor,β βhost,β and βguest.β
A hypervisor is a program that allows you to run a virtual machine. The virtual machine image is the operating system, the hypervisor is the digital equivalent of a physical computer.
A hypervisor tells the virtual machine how much RAM and disk space it can borrow from your physical computer, handles the networking end, and allows communication with peripherals connected to the physical machine, such as keyboard, mouse, USB drives, and external network adapters.
Host refers to the physical machine that is running the hypervisor. If you are running VirtualBox on a Windows Desktop, the Windows machine is the host. If youβre running it on a MacBook, the MacBook is the host. It will lend its physical resources, such as RAM, to the virtual machine.
Guest is the virtual machine. So to put it all together, your host is running a hypervisor, which in turn is running a guest operating system.
VirtualBox is a free and open source hypervisor created by Oracle. Due to its frequent updates, solid performance, and zero pricetag, it is often the go-to choice for home virtualization.
Why Run Kali in a Virtual Machine and Not as My Main OS?
You certainly can run Kali as your main operating system, but there are a lot of reasons to stick with using it as a virtual machine.
- Kali is not designed to be a primary operating system for day-to-day use (a daily driver). Regular daily-use operating systems should have a focus on tools like word processors, calendars, etc. That is not what Kali is primarily designed for.
- You will not have to dedicate hardware to Kali. Unless you are buying a laptop or desktop only for hacking, running it as a virtual machine is more convenient and less expensive.
- You will be running and storing malicious scripts on your Kali instance, opening ports, running temporary webservers, etc. It is safer to keep those sandboxed in a virtual environment.
- When practicing hacking, you will be running other virtual machines as targets. This will be easier to set up if everything is running on the same hypervisor.
- The hypervisor handles compatibility, so you wonβt have to worry about Kali not being compatible with your hardware, such as your graphics or network card.
- A hypervisor allows you to take frequent snapshots easily, allowing you to roll back your Kali to an earlier state if you have a problem.
System Requirements
VirtualBox has low system requirements
- A processor capable of virtualization (check your CPU manufacturers page, but most modern computers shouldnβt have a problem)
- A minimum of 2GB RAM (4GB recommended)
- 300MB of hard disk space
In addition to the above, you will need enough resources for your Kali instance. Kali requires
- 20GB of hard disk space minimum
- 2GB RAM minimum (though allocating between 4GB and 6GB will improve performance)
Since VirtualBox will be handling other resource allocation, we do not need to worry about the CPU type or other compatibility issues.
See our choices for "Best Laptop for Kali Linux" here.
Downloading and Installing VirtualBox
VirtualBox is available on Windows, macOS, Linux, and other lesser used systems. We will walk through installation on a Windows system, but the steps are essentially the same no matter what operating system you are using as your host.
First, visit the VirtualBox downloads page (www.virtualbox.org/wiki/Downloads) and select the platform package that matches your operating system. In our case, we will be choosing Windows hosts.
You will also want to download the VirtualBox Extension Pack (there is only one options that works for all supported operating systems).
Once downloaded, double-click the VirtualBox installer file and follow the prompts. The standard installation opens will be fine.
With VirtualBox installed, double-click the Extension Pack installer. You will be prompted with a warning. Click install.
You will be greeted with a licence agreement. Scroll to the bottom and click I Agree. You can now open VirtualBox.
Downloading Kali Linux
There are two different ways we can download and install Kali Linux. The first is the VirtualBox image file. This is by far the easiest and fastest method. The other is downloading the .iso file (essentially an installer disk) and go through the process manually.
There was a time when we may have suggested doing the manual install, but the VirtualBox image file is configured exactly how we need. None the less, we will present both ways for you.
Using a Virtual Machine Image
To install Kali Linux, go to the Kali Linux website, click the big Download icon, and select βVirtual Machines.β
You will want to download the VirtualBox 64-bit image file. As we said, this one is already pre-configured for VirtualBox, so you donβt have to go through the trouble of installing it as a fresh image.
Your download will finish as a zipped file. Double-click the downloaded file to open it with your default zip program. (Donβt have one? Try 7zip.) Once opened, drag the compressed file to a location of your choice and wait for the extraction to complete.
Navigate to the extracted folder and double-click on the .vbox file.
Once you click open, it will launch VirtualBox, and the virtual machine will appear listed in the left panel of your VM manager.
You can now launch Kali Linux by clicking the Start button with the green arrow up top. The default login credentials are
- Username kali
- Password kali
You should now have access to your Kali Linux attack box.
Installing Kali Linux From an ISO File
Letβs go back to the download page on the Kali Linux website. This time we will select the installer image section.
Keep the 64-bit options open. Now you have several choices.
You have the standard offline Installer, which is what we will be using in this article. It comes with the primary tools and requires no internet connection for the actual installation process. This is ideal if you were planning to put this on a USB and install has a host system as well.
You also have the Weekly image, which has the latest updates. Since we will be updating Kali anyway, letβs not worry about that option.
There is the Everything version, which has βevery tool possible.β This isnβt entirely true, there are simply too many third-party tools out there, but it is a very loaded and powerful version. It is also 10GB at the time of writing. If you wish to go that route, itβs your call but likely unnecessary. The standard Kali is loaded with tools, and you will download others as needed during regular use.
Finally, you have NetInstaller, which downloads most of its content from the web during the installation process. It is a smaller initial download, but all it does is shift when the rest of the downloading happens.
Letβs stick with the standard Installer version for now.
Depending on your internet speed, this download may take a while.
Once you have the .iso, click New in VirtualBox.
You will be prompted to create a new machine. Name the machine whatever you like. VirtualBox will have a default folder, you can leave it as is or change the location. Lastly, choose the .iso image and click next.
VirtualBox will identify Kali as an Ubuntu image, which is fine for our purposes. You will be asked how much RAM and processing power you wish to use. The defaults are fine, but you will see better performance providing it 6GB of RAM and 2 CPUs (if you have that to spare).
You will have to allocate hard disk space for the VM. The minimum is 25GB, but you will need more than that as you save files and modify your system. If you have the room, 35GB if a good number to begin with.
Note the Pre-allocate Full Size option. If you click that, VirtualBox will immediately dedicate the entire selected size as a fixed hard drive. However, leaving it unclicked means the virtual machine will be in an elastic state. This is referred to as βdynamically allocated.β
When dynamically allocated, VirtualBox will only allocate how much space the system is actually using at the time (roughly 20GB after a new install) and will expand as needed to a maximum of the 25GB (or whatever you choose).
As far as the VM is concerned, it has that total amount of hard disk space at all times, it simply isnβt allocated until needed.
You will be shown a summary of your choices. When ready, click Finish.
Weβre not done yet, however. In the VirtualBox manager, highlight the Kali instance and click Start. Now we have to install Kali like we would any other operating system.
Kali will boot and ask you how you wish to install. Choose Graphical install.
Kali will now begin loading files.
When asked, select your language, country, and keyboard layout. You will then be asked to choose a domain name - leave this blank and click Continue.
You will be asked to select a hostname (how will this machine appear on the network)...
A username (how you will login to the machine)...
And a password. We went with βkaliβ for everything.
For the disk partitioning, choose βGuided - use entire disk.β
Kali will only give you one option, so click Continue.
After reviewing, select βFinish partitioning and write changes to diskβ and click Continue.
It will ask you to confirm. Select βYesβ and Continue.
The base system will install.
You will have the opportunity to select a desktop environment. Xfce is the lightest on resources and the most commonly used now. We also think itβs the best looking. Click Continue.
You will want to install the GRUB boot loader. Select Yes.
You do not need to set up the boot loader manually, so select the recommended hard disk and continue.
Kali will now reboot.
Once done, you will be taken to a login screen. Use your credentials (we used kali and kali) to log in.
You can update the Guest Additions by clicking βDevicesβ in the VirtualBox window and click βUpgrade Guest Additions.β Your manual install Kali is now complete.
Which Way Should I Use?
Doing an .iso installation gives you more control over the setup, but in truth, most of that is unnecessary. Our recommendation is to save yourself time and hassle and just use the VirtualBox machine image.
Whichever way you choose, be sure to run the following commands to get your Kali instance up to date.
Type sudo su
to switch to the root account (you will be prompted for your password). Then type:
apt update && apt upgrade -y
This will install all needed updates and get your Kali OS to the latest release.
Other Articles You Might Like
Performance and Set Up
With Kali now installed, there are some VirtualBox features you should be aware of.
Changing Your RAM
If you select the virtual machine in the management window, then click Settings in the top menu, you can navigate to the System tab and either raise or lower the RAM allocated.
Change Your Network Settings
Likewise, if you go to the Network tab in the Settings windows, you can add or remove network adapters, as well as change the settings to match your needs.
Creating Snapshots
It is always a good idea to create frequent snapshots of your virtual machine, so you can roll back to a previous version if something bad happens to your instance. Select the instance from the left hand panel, then click Take to create a snapshot. Give it a name and description.
You can also roll back to a previous snapshot or delete a snapshot from this panel.
Increasing Disk Space
If you select the virtual machine image, then click File, Tools, and Virtual Media Manager, you can adjust the size of the hard drive space given to the VM.
Conclusion
You now have all the information you need to get rolling with Kali Linux on VirtualBox. As you can see, VirtualBox has a well organized interface, allowing lots of control of your virtual machine instance both before and after installation.
Now that you have Kali set up, why not try building your own virtual hacking lab with our how-to guide? And donβt forget to check out our Member Section for a huge selection of courses on how to hack using your new Kali Linux virtual machine.
This is a great walktrhough for people learning how to install Kali Linux at home.