Install Kali Linux in virtualbox (using ova file)
This is how I installed Kali Linux in virtualbox using the ova file method in my windows 10 PC along with its screenshots.
Requirements:
- Kali Linux 2019.1 Preinstalled Image : Download Link (Torrent) (~3.2 GB) [Updated link o latest Kali Version]
- VirtualBox : Download Link (~200 MB)
- CPU that supports Virtualization.
- Atleast 8GB of free disk space .
- 7-zip : Download Link (~1.4 MB) [ Note: Winrar is another alternative you could use instead of 7-zip.]
- Virtual Box Extension Pack : Download Link ( ~22 MB ) [Optional]
Installation Procedure:
The first thing you need to do is go ahead download and install Virtualbox in your system. Then download the Kali Linux ova file mentioned above and extract it using 7-zip or Winrar. The extracted file would be a .ova file format which is a pre-installed Kali Linux machine. Using a pre-installed file saves us a lot of time as we don’t have to go through the whole installation process.
Then click on “File” and then click on “Import Appliance“.
Click on the folder icon as shown below.
Now, browse to and select the extract .ova Kali Linux image file and click on “Open“.
You would now see a window called “Appliance settings” where you can configure stuff like the name of your VM, the amount of RAM to be allocated to your Kali Linux VM etc.
If you want to change the name of the VM, simply click on the text and you can change it according to your will.
Finally, click on “Import” and wait for a few moments to import the Kali Linux Appliance.
Now, right click on your Kali Linux Virtual machine as shown below and click on “Settings“.
If you need to adjust the amount of RAM, click on “System” and you can move the slider accordingly. I would suggest atleast a minimum of 2048 MB (2GB) of RAM.
Now, click on “Network” as shown below and select “Bridged Adapter” and then click on “OK“.
Click on your Kali Linux VM and then click on Start as shown below.
You should now be able to see the grub menu. Hit “Enter” in your keyboard.
Now, login to your Kali Linux machine with the default username as root and password toor.
Note: If you are using newer Kali versions (from year 2020 ), the username and password is “kali”.
Ref: https://www.kali.org/docs/introduction/default-credentials/
You should now be booted into your Kali Linux desktop.
Customize Kali (Optional):
I would like to make some minor changes to make sure the VM is not interrupted during pen testing. This section is purely optional, you can skip to the next section if you don’t want to customize it.
Click on the triangle pointing downwards in the upper right corner and then click on the “Settings” icon.
This will bring you the “All Settings” window as shown below. Click on “Date & Time“.
You can change the time zone to your time zone.
Now, go back to the “All Settings” window and then click on “Privacy“.
You would see a screen similar to the one below:
Now, disable “Automatic Screen Lock” by moving the slider.
Go back to “All Settings“, then click on “Power“.
Now, select Blank Screen option as “Never” and turn off “Automatic Suspend” as shown below.
Update Kali Linux:
Open the terminal window by clicking on the icon as shown below:
This is what the terminal window would look like in a Kali Linux system.
Enter the following commands in the terminal to update your Kali Linux system.
apt-get clean && apt-get update -y apt-get upgrade -y && apt-get dist-upgrade -y
This may take a while depending on your internet connection for the update to complete.
And that is it for setting up Kali Linux in virtualbox to get started with pentesting (only for ethical hacking and for purely educational purposes).
If you have any sort of queries regarding this installation, just leave a comment and will get back to you. I will be posting some ethical hacking tutorials in the future, so stay tuned.
How To Use OVA Files with VirtualBox
VirtualBox, from Oracle, is an incredibly powerful tool that lets you create virtual machines on a Windows, Mac, Linux or Solaris PC (as long as the machine uses an Intel or AMD chip).
Virtual machines are self-contained simulations of another computer running a different operating system without any additional hardware. Virtual machines can be used on the PC level or on the server level. Virtual servers run the same sort of applications that can run on a dedicated machine.
For example, you might have a mission-critical application that won’t run on Windows 10. You can still upgrade your computer to Windows 10 and then use VirtualBox to have Windows 7 running on a virtual machine on the same PC.
Web hosting services offer Virtual Private Servers (VPS’s) enabling the benefits of a dedicated server at a fraction of the cost because each customer has a “virtual server” rather than a dedicated “bare metal” server. There can be dozens of virtual servers running on each physical server.
On the PC level, you would likely install and configure virtual machines using OVA files that conform to the Open Virtualization Format. They usually come in two flavors, OVA or OVF and can be used in a number of virtualization apps including VirtualBox. If you want to use OVA files with VirtualBox, this tutorial is for you.
When you create a virtual machine (VM), the entire setup is contained within a single file. Rather than spreading files everywhere like traditional OS installations, the software encapsulates it into a self-contained file to keep everything tidy and in one place, ensuring that the VM has everything it needs to function. If that file conforms to the Open Virtualization Format, it will be usable in many VM applications, including VirtualBox and VMWare.
VirtualBox uses the .VDI format while VMware uses VMDK and VMX files among others. Both will play nicely with OVA files.
Using OVA Files with VirtualBox
To use OVA files with VirtualBox, you need to import them and let VirtualBox configure the file as it needs to. The process is quite straightforward.
- Download and install VirtualBox if you don’t have it already.
- Open VirtualBox and select File > Import Appliance…
- Now, select your OVA file in the import box and verify the settings in the center window.
- Make any changes if you need to in that center window.
- Click Import at the bottom.
- Allow VirtualBox to import the file and then configure it for use.
It may take a little while to import OVA files. I recently imported a new Mac OS image and it took over an hour. A previous Linux image took a mere ten minutes so you may or may not need to be patient waiting for VirtualBox to install the operating system on your virtual machine. The procedure is fairly reliable, though, so it is safe to go have a coffee or something while it’s working. Just let the setup process run until it’s finished.
When you select the OVA file to import, the main details of the VM appear in the center of the import box. You can change some details but not others. If you don’t change them here, you can modify some of them later in the main Settings menu within VirtualBox.
It is worth checking these settings as the machine that created the OVA file may have had fewer resources than the machine you’re importing to. It makes sense to allow the imported VM to have access to the maximum amount of resources so it can run faster.
Export from VirtualBox to OVA
By default, VirtualBox uses .VDI files for its VM images. As well as importing from an OVA file, it can export to an OVA file. It converts a .VDI to OVF which is interchangeable with OVA so you can freely use the image in a different computer or VM program.
- Go to File > Export Appliance…
- Now, select the virtual machine that you want to export and then click Next.
- Then, confirm or edit the details on the next screen and then click Next again.
- Next, you can edit the descriptive information on this screen or just hit Export.
VirtualBox will then create an OVA file which you can use in other VM software. The format options are all OVF, but OVA and OVF are the same things. The file suffix is .ova regardless of what option you select here.
Errors and Issues
OVA files are supposed to be universal but as usual, things aren’t as simple as that. Occasionally when you import an OVA file you will see errors. The syntax can vary but the error message will often say something like ‘Import failed because the image did not pass OVA or OVF conformance or virtual hardware compliance checks.’ If you see these errors, hit retry and the file will usually be imported as expected.
If the import fails more than twice, recheck the OVA file with the program that created it to make sure it hasn’t been corrupted.
VirtualBox Guest Additions
If you are using VirtualBox for the first time, or have installed fresh onto a new computer, you will need to install VirtualBox Guest Additions. This is a resource install with drivers and applications that enable the VM to work properly. For some reason, these files are never included in the default VirtualBox installation and have to be installed separately.
- Download VirtualBox Guest Additions from here. It is called the VirtualBox Oracle VM VirtualBox Extension Pack. It will likely have a version number but this changes all the time.
- Ensure DVD or shared drive is enabled in your virtual machine.
- Start your VM image.
- Select Install Guest Additions from the Devices menu of the VM.
- Let the process complete.
The Device menu is part of the VirtualBox menu, not the guest operating system. It will be at the top or bottom of the screen depending on how you configure your VMs. Once installed, your virtual machine’s operating system should be fully functional.
If you have any tips and tricks for using OVA files with VirtualBox, please comment below.