Kali Linux is one of the top cybersecurity Linux distributions available. It’s a great distro created by the Offensive Security group, and we at SecurityTrails love it. In fact, we’ve written a few articles in the past showing the true power of Kali Linux, as in the Top 20 Kali Linux Tools, or when we mentioned some of today’s most popular ethical hacking tools.
But until now, we’ve never covered how to get access to those Kali Linux tools. The traditional method calls for setting up a local machine in your home computer, and installing the GUI-based version. However, there are other, faster ways to get access to all the Kali Linux features within an inexpensive cloud situation.
In this post, we’ll take you through a detailed guide on how to install Kali Linux in the Cloud hosting services from one of the internet’s most popular providers: DigitalOcean.
This type of Kali Linux installation is especially useful for infosec and cybersecurity researchers, red teams and bug hunters who want to access Kali Linux features quickly and without any full installation in their desktop computers or office-based systems.
Installing Kali Linux on DigitalOcean using virtual OS images is possible; however, it does take time as we need to build a custom image first.
Instead, to get what we want (Kali Linux tools) we decided to go for a minimal Debian 9.x setup, and install all the Kali Linux packages manually. The result will be a 100% Debian system, powered by Kali Linux features. Let’s begin.
Set up a Debian-based droplet
If you don’t have an account at DigitalOcean, go to https://www.digitalocean.com and open your user account. We recommend DO as it’s a solid provider, with cheap pricing and a stable network. Of course, you can choose any alternative cloud provider such as AWS, Google Cloud, Vultr, etc., as this guide is fully compatible as long as you keep a minimal Debian-based setup.
Once you are there, we suggest launching a droplet with at least 1GB of RAM and 50GB of disk space so you have enough resources to install Kali Linux without any problem.
We will choose Debian 9.x as the default operating system for this droplet.
Once that’s completed, choose the $10/mo package — that was the one we used for this Kali Linux installation in the DigitalOcean cloud.
Once the droplet has been created, you’ll be able to manage it from the Droplets option located in the left menu:
Stay in the loop with the best infosec news, tips and tools
Follow us on Twitter to receive updates!Follow @SecurityTrails
Install Kali Linux step by step
Connect to your Debian server over SSH:
Replace “X.X.X.X” with your droplet public IP address.
It will ask for a password, or you can login automatically by using pre-configured ssh-keys imported from DigitalOcean.
Then setup the Kali Linux repo by issuing these commands:
echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" >> /etc/apt/sources.list apt-get -y update
If you get this error:
W: GPG error: http://kali.download/kali kali-rolling InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ED444FF07D8D0BF6 W: The repository 'http://http.kali.org/kali kali-rolling InRelease' is not signed.
…then you may need to install an extra package to continue with the installation process:
apt-get -y --allow-unauthenticated install kali-archive-keyring apt-get -y update
Then, run the update command again:
securitytrails@kali:~# apt-get -y update Ign:1 http://mirrors.digitalocean.com/debian stretch InRelease Hit:2 http://mirrors.digitalocean.com/debian stretch-updates InRelease Hit:3 http://mirrors.digitalocean.com/debian stretch Release Hit:4 http://kali.download/kali kali-rolling InRelease Hit:6 http://security.debian.org stretch/updates InRelease Reading package lists... Done securitytrails@kali:~#
As you can see, everything is ready, so it’s time to decide what Kali Linux setup we’re going to install. In our case, and taking the “go big or go home” route, we will install the complete Kali Linux set of tools and features.
You can first perform a search to see what packages are available:
apt-cache search kali-linux
This will show you all the possible kali-linux installation packages:
securitytrails@kali:~# apt-cache search kali-linux kali-linux - Transitional package for kali-linux-core kali-linux-all - Transitional package for kali-linux-everything kali-linux-arm - Kali Linux ARM system kali-linux-core - Kali Linux base system kali-linux-default - Kali Linux default system kali-linux-everything - Kali Linux everything kali-linux-forensics - Transitional package for kali-tools-forensics kali-linux-full - Transitional package for kali-linux-default kali-linux-gpu - Transitional package for kali-tools-gpu kali-linux-large - Kali Linux large system kali-linux-light - Kali Linux light tools kali-linux-nethunter - Kali Linux NetHunter tools kali-linux-pwtools - Transitional package for kali-tools-passwords kali-linux-rfid - Transitional package for kali-tools-rfid kali-linux-sdr - Transitional package for kali-tools-sdr kali-linux-top10 - Transitional package for kali-tools-top10 kali-linux-voip - Transitional package for kali-tools-voip kali-linux-web - Transitional package for kali-tools-web kali-linux-wireless - Transitional package for kali-tools-wireless securitytrails@kali:~#
Fortunately, you can install whatever you need to specifically match your needs. In our case, we will install kali-linux-all (around 15GB) by running this command:
apt-get -y install kali-linux-all
After 15 minutes, your Kali Linux installation will be ready. If you’re new to Kali Linux, some good advice is to read the Kali Linux docs along with running their cybersecurity tools, so you can run a few tests from this fresh installation.
During the installation, the installer will ask you some questions, as shown below:
Set your desired language for the keyboard setup. In our case it was English.
Other system services will need to be configured, such as Samba.
Configure Kismet user privileges and groups to access critical functions:
Specify how you want the sslh daemon to be run (using inetd or standalone):
At the end it will ask if you want to restart all the services during the package upgrade without asking:
Once the Kali Linux installation process is completed, we recommend performing a full system update:
apt-get -y update apt-get -y upgrade apt-get -y dist-upgrade apt-get -y autoremove
Then reboot the machine to apply all the changes:
shutdown now -rf
How can I verify if the Kali Linux installation was okay?
Verify that the kernel you are loading is the Kali kernel:
securitytrails@kali:~# uname -r 4.19.0-kali5-amd64 securitytrails@kali:~#
If you see “kali”, then it’s loading a Kali Linux kernel. Another way to test this is by typing the name of any of the popular cybersecurity tools shipped with Kali, such as Nikto, DNSChef, Lynis, etc.
That’s it! There’s no need for any further Kali Linux configuration—everything should be ready now.
Kali Linux offers an all-in-one penetration testing platform for anyone new to the cybersecurity world, and at the same time providing a very good set of advanced features and tools for experienced infosec professionals as well.
After following this guide, you should be able to run most of the top Kali Linux features and tools without any problem.
Are you a penetration testing professional or a member of a red team? Take a look into our enterprise-grade product SurfaceBrowser™ to explore the attack surface area of any company and website in the world: discover associated IP addresses, open ports, DNS records, domain names, and SSL certificate critical information within seconds.
Book a demo with our sales team today, or sign up for our free API to start testing our passive DNS discovery service.