Kali Linux Virtual Machine Installation on Linux - hawkinsw/CS5138 GitHub Wiki

Kali Linux Virtual Machine Installation on Linux

Getting a Kali VM up and running is super simple - I just downloaded the virtualbox package from my distribution's graphical package manager and the .ova from the official download page and followed the official Kali Virtual Box instructions.

Of course, this is taking the easy-way-out for this assignment, so a fleshed out, more unique version (with instructions specific to distros) is also provided.


Chad Lape - Manjaro Distribution

Official Manjaro Documentation

Official Arch Wiki Documentation

Useful Documentation on VirtualBox

CD/DVD Support

Storage Settings/ISO setup

Guest Additions


Installing VirtualBox

This consists of installing the correct host modules for your current version of the linux kernel.

Getting the current kernel version

  1. Run mhwd-kernel -li and note the version of linux you are running.

Ex:

$ mhwd-kernel -li
Currently running: 5.15.12-1-MANJARO (linux515)
The following kernels are installed in your system:
   * linux515

Installing the packages

Run the following to install: sudo pacman -Syu virtualbox linux??-virtualbox-host-modules replacing ?? with you linux kernel version.

For linux 515 (my kernel version above) the command would be: $ sudo pacman -Syu virtualbox linux515-virtualbox-host-modules

Afterwards you are all set, just reboot your system for everything on virtualbox to get setup correctly.

Getting the Kali VM Setup

You have two ways of getting kali linux on your virtualbox setup:

  1. The "easy way" by getting the prebuilt ova.
  2. The "hard way" by using the baremetal iso on a brand new VM.

OVA Setup - "Easy Way"

Simple import the ova file into VirtualBox via the "import" button located in the Tools interface. The default credentials are user: kali password: kali. If those don't work try the link below to see the kali wiki for the default credentials. After importing the ova successfully, you may benefit from adjusting the resources dedicated to the VM. It has been found that 4gb+ of RAM makes VMs run much smoother. However, about 1/2 of RAM should always be saved for the host system, starving it of RAM will slow everything down.

Default Kali VM Credentials

Change the Password from the default

  1. Use the command $ passwd after logging in.
  2. Enter the default password.
  3. Enter and confirm your new password of choice.

Creating the Kali Virtual Machine from scratch

Create the VM in Virtualbox

  1. Click the new button in the main UI.

  2. Enter a Name for your virtual machine.

  3. Select the folder for it to reside. (Just not in /tmp, or do it. I dare you)

  4. Select the Type of Linux and the Version of Linux. (Your architecture is likely 64 bit, though I have ascended to 128 bit myself)

  5. Click Next, select a memory of atleast 2048 MB though I'd recommend 4096+ if you have enough RAM. (If playing IWannaCry mode, select 256 MB, best remember to make a SWAP though)

  6. Click Next, Click Create for the Hard Disk Creation Menu. (If you wanna YOLO: select Do not add a virtual hard disk, skip to: Installing Kali)

  7. Click Next if you are okay with the VDI format. (Though if your reject the tyrannical default, supposedly all of them are basically identical in every way that matters)

(If you feel fancy enough to hit Expert mode, why are you reading this?)

(Maybe you don't need these instructions at all)

(Maybe my remarks will be removed)

  1. Click Next again to use the dynamic sizing of the Virtual Disk. (Or don't, its your data storage after all, if you want it filled with an empty fake hard drive, be my guest)

  2. Click the create button and you now have a virtual machine set up for Kali Linux.

  3. If you want to increase or decrease the number of CPUs being used by the Kali machine, click settings for the machine, click system, click the processor tab, then move the selector to the desired amount.

Installing Kali from ISO - "Hard Way"

  1. Click on your new VM, hit the setttings button in the main menu. Then click on the storage tab on the left side of the popup.

  2. Find the "Controller: IDE" with the "Empty" beneath it. This should open an "Attributes" menu to the right side of the popup. Click the CD and click "Choose a disk file" from the drop down menu. find your Kali Linux ISO.

  3. You should see it now use your Kali ISO in the "Controller IDE". Ensure that you allot at least 15GB of virtual size to the disk. I originally allotted 8GB and did not have the size required for the installation of various software so I had to redo my whole installation.

  4. Turn on your virtual machine, this should open a menu that asks if you want to do a Graphical Install. Hit your Enter key.

  5. The default options should be fine for the purposes of this class. It will ask how you want everything to be partitioned, just let the system handle that. When doing the username and password do your preference.

  6. Reboot the image and remove the disk image. After you are in your normal desktop on Kali, go to the device menu tab, click "insert guest editions". Allow virtualbox to download the guest additions if it needs to. Click the desktop icon that appears with a CD icon and something like VBox_GAs_.... Click on the autorun.sh file and run it. You then will need to reboot the machine one final time for everything to be working properly.

  7. I'd recomend taking a snapshot of your "Clean Image" so if anything happens you can always go back to the start.