Tips and Tricks: Fixing VirtualBox Kali Linux Black Screen

Hello friends and welcome to HaXeZ. So, you have run in to the VirtualBox Kali Linux Black Screen Bug? After all that effort spent downloading it and importing the appliance, you’re excited, you attempt to login in and… nothing. Just a black screen. How disappointing. Do you reinstall it? Give up? Or do you fix it and add that knowledge to your mind palace.

The Cause Of The Black Screen

The likely cause of this problem is due to the VirtualBox Guest Additions either not being installed or not being the correct version. Either way, we need to get them installed to rule this out as a problem.

Kali Linux Black Screen
Kali Linux Black Screen

Grab A Shell

Start the Virtual Machine and wait for it to get to the login prompt. Before logging in press your right CTRL key (VirtualBox host key) and your F2 key. If you ever need to do this natively on Linux then it will be left CTRL, ALT and F2. This sends a signal to the operating system to spawn a virtual text only terminal or a TTY. To get back to the Desktop environment you need to press left CTRL and F8.

Install The Guest Additions

Now login to the Operating System using your credentials. If it is a Kali Virtual Machine downloaded from their website then the credentials are likely either username: kali, password: kali or username: root, password: toor. Once you have logged in you need to instruct VirtualBox to mount the guest additions CD. From the menu, Devices > Insert Guest Additions CD Image.

Kali Linux Black Screen - Insert Guest Additions CD
Kali Linux Black Screen – Insert Guest Additions CD

Mount The cdrom

In order to access the content of the Guest Additions CD, you first need to mount it. You could create a mountpoint manually or you could run the following command. As you can see, the command is mounting the device ‘cdrom’ (denoted by the ‘/dev/’ directory) to ‘/media/cdrom’ directory.

sudo mount /dev/cdrom /media/cdrom

Now, if you list out the contents of the ‘/media/cdrom’ directory you should see a file called VBoxLinuxAdditions.run.

Kali Linux Black Screen - Contents of cdrom
Kali Linux Black Screen – Contents of cdrom

Install The Guest Additions

In order to install the Guest Additions you need to run that VBoxLinuxAdditions.run file. To do this simply run the following command.

sudo /media/cdrom/VBoxLinuxAdditions.run

You may be prompted to press enter but wait for the process to complete and then reboot your system with the reboot command.

sudo reboot
Kali Linux Black Screen – Install Linux Guest Additions

Login In

Once the system has been rebooted, try logging in with your username and password. Hopefully you should now be presented with your desktop and are able to go about your nefarious hacking activities.

Kali Linux Desktop
Kali Linux Desktop

Other Suggestions For Black Screen

If for some reason that didn’t work then there are some other things you could try. One of the other common reasons for this error is due to the display settings. Although changing this has never resolved the problem for me, I thought it was worth a mention. In VirtualBox, head to the settings and then the display settings. Try toggling 3D acceleration and changing the amount of video memory. I’ve heard this has resolved the issue for other people but again I’ve never been able to resolve the problem this way.

VirtualBox - DIsplay Settings
VirtualBox – DIsplay Settings

Hack To Learn: Environment Set Up

Hello and welcome to HaXeZ. In order to start hacking you will first need some tools. If you’re running a Windows based Operating System then you can install tools locally. However, a better solution might be to use a Virtual Machine. A virtual machine is an operating system that runs on top of your base Operating System. Furthermore, it is unlikely to affect your local Operating System. With this in mind, you can download all sorts of malicious software without worrying about it damaging your local Operating System. Although, there are attacks that can break out of your Virtual Machine but that’s something we can worry about later.

Choosing an Operating System

There are many different OS’s built specifically for penetration testing or hacking. However, I’m not going to discuss each one individually but feel free to check out any of the following; Kali, Parrot, Backbox and BlackArch. There are others out there but I believe these to be the main distributions. For the purposes of this article I’m going to be using Kali Linux.  

GET an Operating System

Firstly, head over to https://www.kali.org/get-kali/ and have a look around. There you will see a number of options including Virtual Machines.

Kali Linux Website
Kali Linux Website

If you click on the Virtual Machines option then it should take you to the part of the page where you have the option to download either a VMware or VirtualBox image. With this in mind, we need to make a decision about which hypervisor we want to use. To explain, a Hypervisor is the software that is going to run our Virtual Machine. Feel free to google the pros and cons of both VMWare and VirtualBox and make your own decision. However, I’m going to be using VirtualBox for the purposes of this demonstration.

Virtual Machines
Virtual Machines

Compatibility

Now it is important to download the correct version. If you’re on a modern version of Windows then you will likely need the 64 bit version. However, you can check which version you need by running the following command in an elevated Command Prompt (right click, run as administrator).

wmic os get osarchitecture
Operating System Architecture
Operating System Architecture

As shown above, my OSArchitecture is 64-bit which means I should download the 64-bit version. You can perform a direct download by clicking on the download arrow or if you’re feeling generous you can leach and seed the torrent file by using a torrent client.

GET a Hypervisor

While your Virtual Machine OS is downloading, head over to https://www.virtualbox.org/ and click the big blue button that says download VirtualBox. Once the file has finished downloading, locate it, double click it and install it.

VirtualBox Website
VirtualBox Website

Import Your Operating System

Once your Virtual Machine has finished downloading, open VirtualBox and click File > Import Appliance.

Import Operating System
Import Operating System

This will then spawn another window, if you click the file icon it should open a Windows Explorer Window and allow you to navigate to your Virtual Machine Appliance. Select it.

Select Your Appliance File
Select Your Appliance File

You should then see the configuration of the virtual machine. Don’t worry about this too much as most of it can be changed later. For now just make sure the installation file path is correct and click import.

Virtual Machine Operating System Settings
Virtual Machine Operating System Settings