Kali Linux is a “toolbox” for hackers and IT-security-specialists, who want to probe networks. The company behind Kali Linux, Offensive Security, offers an image of Kali Linux especially streamlined for the Raspberry Pi. By default, it’s already packed with only the minimum tools, which improves performance. If you wish, you can upgrade it to a standard desktop installation, which includes every tool, by installing the kali-linux-full metapackage.
In the following you will learn how to install a standard Kali Linux image on your Raspberry Pi 2 / Pi 3 in 6 easy steps.
So let’s start shall we?
- Raspberry Pi 2 or Pi 3
- a class 10 microSDHC card is highly recommended (with at least 8GB of storage or greater)
- a Wi-Fi USB Adapter (optional) if you want to use WLAN, you have to buy this because the Raspberry Pi doesn’t has it built-in
Step 1 – Download Kali Linux
Firstly, you will need to download the Kali Linux distribution. It is available on the official site at offensive-security.com. Now:
Click here to download the latest official Ubuntu Mate image for your Raspberry pi 2/3. Once the download finished you’ll need to unzip the .img.xz file so that you get an .img file.
Also, if you’re a windows user, you’ll need a program to transfer the image on your microSD card. The application we’ll be using in this guide is “Win32 Disk Imager”. Download and unzip it.
If you’re a Linux or Mac OS X user, make sure that the program dd is installed.
Step 2 – Making a microSD card
Now we will write the image directly to your SD card.
Here’s the deal for…
Open the just downloaded Win32DiskImager.exe. In the field “image file” you’ll need to select the unzipped Kali Linux Image. In the field to its opposite with the value “device” you’ll need to select the Drive Letter of the microSD card. Make sure it is the right one.
Just click the button write once you’re ready and the program will start to write the image to your microSD card. Before you take this step, you should make sure again that everything is correct.
Linux/Mac OS X users
To transfer the image, we will make use of the application dd. You’ll need to type the following command into the console.
You’ll need to replace (IMG) with the path of your unzipped Kali Linux image and (DEVICE) with the path of your microSD card. This process might take some time without anything showing up in the console, so don’t worry if nothing seems to be happening.
dd bs=1M if=(IMG) of=(DEVICE)
Step 3 – Booting up the Raspberry Pi
As soon as the image transfer is finished, you can insert the microSD card into your raspberry pi, plug-in your ethernet cable or WLAN stick (whatever you prefer), a mouse and a keyboard, the cable of your monitor and fire it up!
Step 4 – Kali Linux Installation Process on the Raspberry Pi 2/3
After powering up the raspberry pi, you will be greeted with a boot screen. The Raspberry Pi 3 will now go through the boot up process of Kali Linux.
The screen will go blank a few time which is normal, so don’t worry about it.
This whole process might take some time.
Step 5 – The first login
Once the installation has finished, a login prompt will appear. Enter the following default credentials:
Now you have a working version of Kali Linux on your Raspberry Pi!
Let’s continue with the last, but important step!
Step 6- Install available updates and secure Kali Linux
First off, you should make sure that every (Kali) Linux package is up to date.
sudo apt-get update
sudo apt-get upgrade
Next, change the password of the default “root” account to something more secure than “toor”.
Lastly, we’ll delete the existing SSH keys and generate new ones, as they are the same in every ARM image. This is really important, especially if this machine will be publicly accessible!
sudo rm /etc/ssh/ssh_host_*
sudo dpkg-reconfigure openssh-server sudo service ssh restart
You’ve successfully installed the Kali Linux Distribution on your Raspberry Pi. Well done!
If you liked this tutorial, help it spread by tweeting about it on Twitter or sending it in an e-mail to a friend.