0x00 - Getting started
This tutorial will walk you through on installing VirtualBox as well as configuring / installing Kali Linux.
Installation - Windows & Mac
- Go to https://www.virtualbox.org/wiki/Downloads
- Click Windows hosts or OS X hosts
- Your download will begin
Installation - Linux
With Linux, you will typically have two options:
- Download from your distro's package manager (might be outdated)
- apt, pacman, yum, etc.
- Download the deb/rpm file for your distro on the website (https://www.virtualbox.org/wiki/Linux_Downloads)
During this walkthrough, I will be installing VirtualBox on my Debian system. If you are on Ubuntu, the instructions will be the same installation. For this exercise I will be downloading the .deb file for Debian 10. If you are on Mac or Windows, once VirtualBox has been installed everything else should be the same.
Step 0x01 - Installing with dpkg
Once you have downloaded your .deb file, browse to your downloads folder and install the package with:
sudo dpkg -i virtualbox-6.1_6.1.10-138449_Debian_buster_amd64.deb
Note: The version may have been updated since this writeup. If that is the case copying and pasting the file with the versoin above will not work. Use the tab-complete to automatically fill out the filename!
On Debian, I have received an error stating that I was missing a dependency. If you have received this error too, simply enter:
sudo apt install psmisc -y
Step 0x02 - Downloading Kali
Now you should have VirtualBox installed on your machine. If there isn't a desktop icon, go ahead and search through your applications for VirtualBox. Once opened, we should see the main application window.
Great! Now lets download our Kali ISO image, so we can get it installed.
- Browse to https://www.kali.org/downloads
- Select the image that you want. (Kali Linux 64-bit [installer] recommended)
- Click the name for HTTP install or Torrent. (both options are fine)
Step 0x03 - Virtual-Machine Setup
- Click New on the dashboard, or go to Machine -> and select New
- Name - The name that you want to give your machine.
- Machine Folder - This field has already be pre-filled for you.
- Type - Should be set to Linux.
- Version - Can be set to Debian 64-bit.
- Select the amount of RAM that you would like to give your Virtual Machine
- Select create a virtual hard disk now
- We will select VDI Hard disk file type
Selecting Dynamically allocated will slowly grow to its max hard disk size as we write more information. This comes at a cost of slightly slower write-speeds, but it will save you space. The speed loss is mostly negligible and will more than likely be transparent.
Selecting Fixed size Will create a hard disk file with whatever ammount you select. If you want to a 50GB VM file, it will create a 50GB file right off the bat. There is no slow grow to your max size.
- Next, use the slider or enter the size followed by GB on the field in the right. 35GB is actually as low as I would go, and 50GB might be a bit more comfortable. However, you can always use some command line magic to expand your drive later.
Great! Now we have been brought back to the main screen with our Kali virtual box sitting on the right-hand side.
Step 0x04 - Guest OS Setup
- Right click your VM and press Start
- You will receive a prompt asking you to select an image. Select the Kali ISO that you have downloaded, and continue.
- You should be greeted by the installer menu. Select Graphical Install
- Choose English (your preferred language)
- Choose US (your country)
- Choose American English (default)
- Choose your Hostname (default is kali)
Note: This is your PC name which will show up in DHCP lease information and other logs.
- Configure your domain name if you have one, else leave this blank
- Create your username. As of Kali-2020, you can no longer log in as root by default. You must configure a user to log in with. Once logged in however, you can switch to root or allow root logins.
- Enter and confirm your password
- Enter your timezone (Make sure this is correct)
- Select Guided - Use Entire Disk
Note: If you would like to encrypt your Guest OS, this is where you would do it. You would select Guided - use entire disk and set up encrypted-LVM. You would be prompted to create a password which you would be prompted for any time you boot up the machine from a powered down state. (A GuestOS with Encrypted LVM does take a bit longer to install.)
- Select All files in one partition.
- Select Finish Paritioning and write changes to disk
- Select the Yes radio button under Write changes to disk? and press Continue
- You should then begin to see the base packages installed
- Leave the proxy information empty and choose Continue. You will see some initial packages getting installed.
- At this point should be asked which Desktop Environment you would like to install. There is no "best" when it comes to Desktop Environments, only preference.Xfce is customizable and lightweight enough to run on machines with low specs (recommended - but research and experiment as well).
You must then select the amount of tools you would like preinstaled. top10 and default should be just fine. You can always install any missing packages / tools later.
- Select Yes. You will need this for Kali to boot properly.
- Select the disk listed so we can install the Grub Bootloader to the specified disk. (GRUB essentially handles loading the OS at boot, hence the name bootloader)
At that point you should see a message stating... Finishing the installation , followed by Installation Complete. Press Continue and reboot when prompted.
Step 0x05 - Final Steps
Power on your VM once more and you should be greeted with the Kali Login Screen.
Here you will enter the username and password that you created during the setup.
Note: Because Kali2020 now pre-installs Guest-Additions, you should be able to maximaze the window for fullscreen.
You are now all setup!
Some things to consider now:
- Enable Bi-Directional clipboard. This will let you copy and paste, back and forth between your Guest and Host OS.
- Enable Bi-Directional Drag and Drop. This will allow you to easily drop files back and forth between your Guest and Host OS.
- Check out our other article here for a closer look at what you can do in VirtualBox.