hacking, cyber crime, security

Kali Linux on Windows 10

In this post I will first start with some background on Kali Linux and Windows 10 running with VirtualBox. Then I will explain how you can setup Kali Linux on Windows 10 using Oracle’s VirtualBox. Subsequently after you have installed Kali Linux on VirtualBox I will finish this blogpost with showing how you can update and upgrade your Kali system.

Kali Linux

Kali Linux is a Linux distribution which is specifically geared towards penetration testing. It comes with a lot of tools you can use to test your applications or systems for errors and vulnerabilities. You can use Kali Linux for:

  • Penetration Testing
  • Security Research
  • Computer Forensics
  • Reverse Engineering

Kali Linux is a Debian based Linux distribution. The Kali distribution is maintained by Offensive Security (https://www.offensive-security.com/), an American Security Company.The Kali distribution comes with a large collection of useful tools like:

  • Metasploit Framework
  • Nmap
  • SqlMap
  • Wireshark
  • Burp Suite
  • Maltego
  • John The Ripper
  • Hashcat
  • Hydra
  • And much more…

Virtual Box

Kali doesn’t run directly on a Windows systems. However to run a Linux system on Windows we need a virtualization hypervisor solution.

VirtualBox is an Open Source hypervisor solution for x86 virtualization. The idea is that you have an x86 based system that runs for example Windows and on top of Windows you run VirtualBox. Within VirtualBox you are able to setup new instances of Virtual Machines like Kali or another Operating System.

Windows VirtualBox Hypervisor
Virtualization of Kali Linux

In the before mentioned figure, Windows is the Host OS which runs Kali and Debian as  a Guest OS. You can configure a Guest OS with it’s own memory size and disk space using the Virtual Disk Image (VDI).

Install VirtualBox on windows

First you start with downloading VirtualBox to your Windows System from https://www.virtualbox.org/wiki/Downloads

For this post I have used VirtualBox 6.1.18. On the download page, click on ‘Windows hosts’ and a popup dialog box will occur. Save the Virtual Box installation file in you download directory. When the VirtualBox installation file download finishes, go to the downloads directory and double click on the installation file. The VirtualBox setup wizard will start. Click on ‘Next’. If you wnat you can change the installation Location. I will use the default location which is ‘C:\Program Files\Oracle\VirtualBox\’.

VirtualBox Setup Wizard
VirtualBox Setup Wizard

After that click ‘Next’ and the ‘custom dialog’ box will show up. You can make the selections you want but for example for my configuration I disabled two options, ‘Create Start Menu Entries’ and ‘Create a shortcut in the Quick Launch Bar’. In short I only need a shortcut to VirtualBox on the desktop.

VirtualBox Options
VirtualBox Options

Click ‘Next’ and the installer will notify you that the it will temporarily disconnect you from the network. This is mandatory to finish the installation. Press, ‘Yes’ and ‘Install’ and the installation process will start. After the installation is ready the following window will appear.

Start Installing VirtualBox
Finish Installing VirtualBox

Press ‘Finish’ and Virtualbox will start on your system.

VirtualBox is running

Download Kali Linux Image

Offensive Security provides an image of the different versions of Kali. You can download the latest version by using the following link:

https://www.offensive-security.com/kali-linux-vm-vmware-virtualbox-image-download/

Click on the 64 or 32 bits Kali Linux Image (depending on your system) and download the image to your computer. After the download is finished you will find the following file in your downloads directory: kali-linux-2021.1-vbox-amd64.ova

On my system I store all my VirtualBox images in the directory C:\project\images\. For me the next step is copy the VirtualBox file from the ‘downloads’ directory to the images directory. However, you can also leave the file in the downloads directory if you want.

Import Kali Image in VirtualBox

The following step is that we will import the image into VirtualBox. From the toplevel menu in VirtualBox click on ‘Import’. In the dialog that appears select the Kali-image that we have just downloaded. After clicking on ‘Next’ you will see the next window.

VirutalBox Appliance Import
VirutalBox Appliance Import

The next window is the ‘Appliance settings’ windows. In this windows you can make specific changes to your virtual machine. On my system the base folder for storing the VMs is ‘c:\users\harold\Virtual Box VMs’. We won’t change any of the settings and work with the defaults.

VirtualBox Appliance Settings
VirtualBox Appliance Settings

Start the import with clicking on ‘import’. Before the import starts, you have to confirm that you agree with the Kali license agreement. After you pressed agree the Kali VM import starts.

Kali Linux Imported in VirtualBox

At this moment we are almost ready. Currently our Kali instance is configured but at this moment it is not running yet. The next step is to start the actual VM. From the top-level menu, press the ‘Start’ button and your Kali instance will start. When Kali is started, you can login with username ‘kali’ and password ‘kali’ (default user credentials). Your Kali Linux system is now up and running on your Windows system.

Kali Up and Running
Kali Up and Running

Upgrading your Kali System

We have downloaded the latest Kali distribution from Offensive Security. Currently you have downloaded the latest version of Kali however some of the packages in the Kali distribution are already updated. Kali uses a package manager to control and install the various software packages . Because Kali Linux is based on the Debian distribution, Debian’s apt package management is used.

Whenever you want to update your system you have to use two commands, ‘apt update’ and ‘apt upgrade’. Firstly, ‘apt update’ checks with the centralized Kali repositories whether new versions of installed packages are available. Secondly, ‘apt upgrade’ is to perform the actual upgrade (installation of newer versions) of the Kali software packages. You can use both commands seperately however it is important that you first execute update and then upgrade.

To upgrade our system we will have to execute both commands after each other. In Linux you can combine two commands using the ‘&&’ option. For ‘apt upgrade’ we will also add the ‘-y’ parameter. Adding this parameter will automatically confirm whenever you are asked whether you actually want to upgrade an package. If you want more control you can skip the ‘-y’ parameter.

Updating and upgrading Kali

Before you can execute the update and upgrade command you need a terminal to enter to correct command. Therefore you need to open a terminal window by clicking on the fourth icon from the left in the top level menu. After you have clicked on the icon the terminal window will open.

Open Terminal Window

The following step is to obtain root priveleges. Before you can make changes to a Linux system, you need root or superuser priveleges. In order to do this In Linux you can elevate priveleges to the root user by preceding the command with the keyword ‘sudo’. ‘sudo’ works on a per command base which means that we have to run ‘sudo apt update’ and ‘sudo apt upgrade’.

First type the update and upgrade command in your terminal:

$sudo apt update & sudo apt upgrade -y

At this moment you press ‘enter’, which starts the updating and upgrading process. When the command prompt returns the update and upgrade process is finished.

apt udate and upgrade
apt udate and upgrade

Congratulations, you have Kali Linux running on your Windows 10 system with VirtualBox. Now you can start working on your updated and upgraded Kali System.