Kali Linux with Desktop GUI on Azure/AWS/GCP

Install Kali Linux with XFCE4 Desktop GUI on any of the cloud platforms.  Comes pre-installed with over 2500 tools and optimised for cloud environments.

Kali Linux Cloud

Setup Kali Linux on AWS

Setup Kali Linux on Azure

Setup Kali Linux on GCP

Kali Linux aws

Deploy Kali Linux with XFCE4 Desktop GUI on AWS

Kali Linux Azure

Deploy Kali Linux with XFCE4 Desktop GUI on Azure

Kali linux GCP

Deploy Kali Linux with XFCE4 Desktop on GCP

Kali Linux contains industry specific modifications as well as several hundred tools targeted towards various Information Security tasks, such as Penetration Testing, Security Research, Computer Forensics, Reverse Engineering, Vulnerability Management and Red Team Testing.

Kali Linux Desktop GUI

Getting Started with Kali Linux

Once your Kali Linux server has been deployed, the following links explain how to connect to a Linux VM:

 

 

Once connected and logged in, the following section explains how to start using Kali Linux.

Update Kali

First lets make sure you’re system is upto date, run the following commands:

				
					echo "deb http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware" | sudo tee /etc/apt/sources.list
sudo wget -q -O /usr/share/keyrings/kali-archive-keyring.gpg https://archive.kali.org/archive-keyring.gpg
				
			
				
					sudo apt update
				
			

Purge the old GTK package 

				
					sudo dpkg --purge --force-all libgtk-3-0:amd64
				
			

Repair dpkg database

				
					sudo dpkg --configure -a || true
				
			
				
					sudo apt -f install -y || true
				
			

Note: If you receive the following error after the dpkg database repair:

 

Errors were encountered while processing:

network-manager-openvpn
network-manager-openconnect
network-manager-openvpn-gnome
network-manager-openconnect-gnome
E: Sub-process /usr/bin/dpkg returned an error code (1)

 

Run the following command otherwise if you didn’t receive this error continue to ‘Install the new GTK t64 package

Uninstall VPN packages if you received the error above:

				
					sudo apt purge -y \
  network-manager-openvpn \
  network-manager-openconnect \
  network-manager-openvpn-gnome \
  network-manager-openconnect-gnome

				
			

Install the new GTK t64 package

				
					sudo apt install -y libgtk-3-0t64
				
			

Complete the system upgrade

				
					sudo apt update
				
			
				
					sudo apt full-upgrade -y
				
			
				
					sudo apt -f install -y
				
			
				
					sudo dpkg --configure -a
				
			

And now reboot your server and you’re system is upto date:

				
					sudo reboot
				
			

If you un installed the VPN packages due to the vpn errors above, now you can re-install. Otherwise carry on to the next section:

				
					sudo apt install -y \
  network-manager-openvpn \
  network-manager-openconnect \
  network-manager-openvpn-gnome \
  network-manager-openconnect-gnome

				
			

Install Kali Linux Tools

Next step is to decide which Kali Linux tools you would like setup.  To install all the Kali Linux top 10 tools from the metapackages is to run the following command

				
					sudo apt install kali-tools-top10 -y
				
			

Kali Linux with XFCE4 Desktop GUI

This Kali Linux image comes pre-installed with the XFCE4 desktop environment.

 

In order to connect you’ll need to use VNC.  Download VNC to your computer first.

Once you’ve installed VNC viewer locally, we need to login to the server via ssh first to configure the VNC server settings.  Links above explain how to connect to a linux VM in the getting started section.

Configure VNC Server

When logged in via SSH, run the following command to configure the vnc server and your screensize, choose from the following:

				
					tightvncserver -geometry 1920x1080 -depth 24
				
			

Of if you prefer 1024×768 do the following:

				
					tightvncserver -geometry 1024x768
				
			

It will prompt to setup a password in order to access your secure desktop via vnc viewer.  When it asks ‘Would you like to enter a view-only password‘ select: n

Note: If you need to reset a vnc session to reconfigure your geometry screensize, run this command to reset:

				
					vncserver -kill :1
				
			

Next is to locate the port that is used by tight vnc server. Run the following command:

				
					netstat -tulpn
				
			

And here you can see vnc server uses port 5901.

Connect to Kali Linux using VNC

Open up your VNC viewer.  Get the IP address of your newly deployed Kali Linux server and within VNC viewer add your ip address followed by the port. For example, on my test server its:

 

40.78.98.166:5901

Note: Before you try to connect make sure you have port 5901 open if you’re using any cloud based firewalls or internal firewalls on your network. If you reboot Kali Linux, also note you’ll have to start the Tight VNC Server. Run the following command if you reboot the server: tightvncserver

When you try to connect it will ask for a password. Use the VNC password you created earlier. Press continue and enter your password.

Password Prompt

You should now be logged in via the desktop.

Kali Linux Desktop GUI

It make take a few minutes for the server to fully load and render a better display.

You’re now ready to start using Kali Linux. All applications are under the applications menu.

Kali Linux Firewall Ports

In order to connect to this Kali Linux server using VNC make sure the following port is open if you’re using any cloud based firewalls or internal network firewalls:

 

  • TCP 5901

 

Depending on which Kali tools you’re using refer to the documentation on which port it uses to confirm.

 

If you are using any of the cloud security groups and need to change / add ports refer to the following guides:

 

To setup AWS firewall rules refer to – AWS Security Groups

To setup Azure firewall rules refer to – Azure Network Security Groups

To setup Google GCP firewall rules refer to – Creating GCP Firewalls

Support / Documentation

Documentation on using Kali Linux can be found on: https://www.kali.org/docs/

 

Full list of Kali Tools: https://www.kali.org/tools/

 

Kali community support from: https://www.kali.org/community/

Disclaimer: KALI LINUX ™ is a trademark of OffSec and is licensed under GNU GPL license. No warrantee of any kind, express or implied, is included with this software. Use at your risk, responsibility for damages (if any) to anyone resulting from the use of this software rest entirely with the user.

Avatar for Andrew Fitzgerald
Andrew Fitzgerald

Cloud Solution Architect. Helping customers transform their business to the cloud. 20 years experience working in complex infrastructure environments and a Microsoft Certified Solutions Expert on everything Cloud.

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x