Kali Linux Installation on VirtualBox
- Author: Dr. Jim Marquardson (jimarqua@nmu.edu)
- Updated 2024-06-11
Kali Linux is an operating system that many cybersecurity professionals use to assess system security. Kali contains tools to scan websites for vulnerabilities, crack passwords, and more. It is important to understand what the tools in Kali do before using them. The tools inside Kali should only be used for testing on authorized targets. Pointing the tools at the wrong target could be illegal because the tools might attempt to log into systems or exploit vulnerabilities.
Learning Objectives
In this exercise, you will learn to:
- download a Kali Linux virtual machine image,
- import a Kali Linux virtual machine image in VirtualBox,
- log into your Kali Linux virtual machine, and
- put your Kali Linux virtual machine to sleep.
Download Kali
- Go to https://www.kali.org/get-kali/#kali-virtual-machines.
- Find the VirtualBox version.
- Use the down arrow link to download the file. Save the file in the Downloads folder on your computer
- The download might take a few minutes to complete.
- The downloaded file will be named something like kali-linux-2024.2-virtualbox-amd64.7z. The exact name changes over time because new versions are released several times a year.
Extracting 7-zip files
- Kali publishes its files using the 7-Zip (.7z) file format.
- Windows 10 and earlier versions of Windows lack support for 7-zip files. Newer versions of Windows 11 support it.
- Open the Downloads folder on your computer.
- Right-click on the Kali 7z file, and extract the file. You can extract it to the current folder.
- If you lack the option to extract the file, you will need to install 7-zip. Only perform these steps if you could not extract the 7z file in the previous step.
- Go to https://www.7-zip.org/download.html.
- Download the file for 64-bit Windows x64 systems.
- Run the program and accept all of the defaults to install 7-zip.
- Once 7-zip is installed, return to your downloads folder.
- Right-click on the .7z file and choose 7-zip > Extract here.
- There should be a new folder with the Kali files. Inside that folder is a file with a .ova extension. Remember the location of this file.
Open the Kali Virtual Machine
- Open the folder containing the extracted files. There will be two files:
- a .vdi file that represents the virtual machine's hard drive, and
- a .vbox file that defines virtual machine settings.
- Double-click on the .vbox file to open the virtual machine.
- The VirtualBox manager will open. VirtualBox will remember this virtual machine. Notice that VirtualBox says that the VM is Powered Off.
- Right-click on the Kali VM and choose Settings.
- Open the System settings, and change the Base Memory to 6144 MB.
- Click OK to save the settings.
- With the Kali VM selected, click the Start button.
- The Kali VM will start booting. You do not have to select anything while it boots. Let it start up until you see the login prompt.
Log Into Kali
- After Kali finishes booting, you will see a login screen.
- Use kali for the username and kali for the password.
- You should see the Kali desktop. The screenshot below highlights a few features. Note that the top and bottom of the window are VirtualBox features that help you manage the Kali VM, such as resizing the window or putting the VM to sleep.
Managing the VM
- Explore the Kali interface.
- Launch the terminal and run
pwd
. Close the terminal. - Launch Firefox and to go google.com. Close the browser.
- When finished testing, click the
X
at the top right. Choose the option to Save the machine state and click OK. This is like closing the lid on a laptop. All running applications will still be running when the VM is started again.
- The Kali VM window will close automatically. VirtualBox will show that Kali's state is Saved.
- With the Kali VM selected in VirtualBox, click the Start button again.
- Kali should open quickly. It does not go through the whole boot process when restored from a saved state.
Reflection
- What were the hardest parts of installing Kali in VirtualBox?
- Why would increasing a VM's memory be helpful?
- Why might increasing a VM's memory too much be harmful?