The best possible way is to host Kali Linux in the cloud, where the vendor takes care of the networking and server management, and you will focus on your pentesting only.

The private key is automatically downloaded; keep it secure because you will not be able to get it again. Before taking the instance, make sure that the appropriate region is selected. You can verify the region from your AWS console account as shown in the figure below:

Click continue on the Kali Linux instance, and under EC2 Instance Type, select t2.micro

You are done configuring the Kali Linux in the cloud, let’s discuss the steps to access it from your Windows OS. You need the following tools:

PuTTY PuTTygen

Download and install both the tools from the official website, open the PuTTygen and load the already downloaded private key file, the objective is to convert it into the Putty supported format:

Save the private key and close the PuTTYgen program. Open the PuTTY program to connect it with your Kali Linux, load the private key in the Auth tab under the SSH navigation:

Moreover, in the session, use the username (ec2-user) and the public DNS detail of the Kali Linux machine: Ec2-user@publicDNS

Hit open, and you are done.

Your Kali in the cloud is here, this is the minimal installation, and you cannot be able to access all the tools. However, you can get all the tools by hitting the following command: apt-get install kali-linux-full Alternatively; “apt-get install kali-linux-top10″ to get the top10 security tools, you should not exceed the usage limit else your card will be charged.

For Linux Users: You can also access the Kali AWS from your Linux machine. Set the permission and connect the server using the SSH, hit the following: chmod 400 key_pairs.pem ls -lah | grep key_pairs ssh -i key_pairs.pem ec2-user@publicDNS

To get the root access to your Kali machine, hit the sudo su command. Let’s discuss the steps to get the GUI access of the newly installed and configured Kali Linux machine. The infrastructure used:

Ubuntu (Local Linux machine to access the Kali) Kali Linux (configured in the AWS cloud) Windows with PuTTy (just to access the local and hosted Linux machine)- This is not required, you can do all the functions with your local Linux too, this machine has been used to access the Linux machines only.

Update the packages and install the TightVNC on your host Linux machine: sudo apt-get update sudo apt-get install xfce4 xfce4-goodies tightvncserver

The existing Kali Linux is the command based OS, but to get the GUI, you need to install it first. We will hit the following command in the newly created Kali Linux machine: apt-get install gnome-core kali-defaults kali-root-login desktop-base After getting the GUI installed, set up the VNC server by adjusting the resolution since you will be using the VNC for the first time, it will ask to create the password.

tightvncserver –geometry 1024×768

Kali:1 shows that it is listening on port 5900+1 =5901 Now it is time to setup the SSH tunnel; this should be done on your host Linux instead of the Kali (cloud).

ssh -L 5901:localhost:5901 -N -f ec2-user@PublicDNS -i key_pairs.pem

netstat -anop | grep 590

You can see the listening port. In the command above: -N represents the SSH port forwarding -f run the SSH commands in the background The SSH tunnel has been created; we will be connecting the local host using the TightVNC viewer, you can use the Ubuntu default viewer as well.

And here is the connectivity:

Video Tutorial: