0x00 - Getting started

This tutorial will walk you through on installing VirtualBox as well as configuring / installing Kali Linux.

00-00-Oracle-Download-Page-2

Installation - Windows & Mac

  1. Go to https://www.virtualbox.org/wiki/Downloads
  2. Click Windows hosts or OS X hosts
  3. Your download will begin

Installation - Linux

With Linux, you will typically have two options:

  1. Download from your distro's package manager (might be outdated)
    • apt, pacman, yum, etc.
  2. 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!

01-install-vbox-deb

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.

03-vbox-installed

 
 
Great! Now lets download our Kali ISO image, so we can get it installed.

04-Downloading-Kali

  1. Browse to https://www.kali.org/downloads
  2. Select the image that you want. (Kali Linux 64-bit [installer] recommended)
  3. 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
    05-New-Machine
     
     
    06-OS-conf
  • 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.

07-RAM

  • Select the amount of RAM that you would like to give your Virtual Machine

 
08-Disk00

  • Select create a virtual hard disk now

 
08-Disk01-1

  • We will select VDI Hard disk file type

 
08-Disk02-1

  • 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.

08-Disk03

  • 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.

09-start

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

  1. Right click your VM and press Start

0A-Select-Image

  1. You will receive a prompt asking you to select an image. Select the Kali ISO that you have downloaded, and continue.

0D-Launching-Kali

  1. You should be greeted by the installer menu. Select Graphical Install

0E-Language

  1. Choose English (your preferred language)

0F-Country

  1. Choose US (your country)

10-Keyboard

  1. Choose American English (default)

11-Hostname

  1. Choose your Hostname (default is kali)

Note: This is your PC name which will show up in DHCP lease information and other logs.

12-Domain

  1. Configure your domain name if you have one, else leave this blank

13-username

  1. 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.

14-password

  1. Enter and confirm your password

15-time

  1. Enter your timezone (Make sure this is correct)

16-guided-partition

  1. 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.)

17-partitioning

  1. Select All files in one partition.

18-write-changes

  1. Select Finish Paritioning and write changes to disk

19-confirm-changes

  1. Select the Yes radio button under Write changes to disk? and press Continue

1A-installation

  1. You should then begin to see the base packages installed

1B-proxy

  1. Leave the proxy information empty and choose Continue. You will see some initial packages getting installed.

1D-desktop-environment

  1. 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.

1E-GRUB-boot-record

  1. Select Yes. You will need this for Kali to boot properly.

1F-GRUB-location

  1. 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)

21-complete

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.

22-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!

24-bidirectional

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.

Have fun!