How to install Kali Linux on the Raspberry Pi
About: Kali Linux is a OS that is based off of Debian. It is the successor to Backtrak and includes many tools that are used in penetration testing. Penetration testing is the act of testing a system, network or Web application to find vulnerabilities that could be exploited. The Raspberry Pi may not be the most powerful system to do penetration testing on, but it is cheap and is very easy to use. After installing Kali Linux you can set up scripts and perform attacks in the wild, and since a Raspberry Pi is very easy to hide the low cost makes it disposable.
Objective: To install Kali Linux 2.0.1 onto a Raspberry Pi B+ Model. I will be using Linux Mint to format the SD card.
Material: You will need the following:
- Raspberry Pi
- 8GB or larger SD card. Class 10 works best on the Raspberry Pi
Instructions: I will assume you know some basic linux terminal commands. If not this guide will be very clear regardless.
You must begin my downloading the Kali Linux Image. There is a compiled image for the Raspberry Pi located at the Offensive Security website. The download page can be found here. Scroll down half way and download the image for your Raspberry Pi. At the time of writing the current version was 2.0.1.
After downloading the image zip file, unzip it and rename the image file to ‘kalipi’. This will allow you to simply copy and paste the terminal commands below much easier and without making many edits.
Open a new terminal window and type the following command:
The ‘df’ command displays information about total space and available space on a file system. Make note of what is listed and insert your SD card into your computer and run the command again. You should see a new file system appear. Make note of your new file system. If this is a new SD card it should only have 1 file system on it, if it was formatted for Raspberry Pi before or anything else it may have multiple file systems.
In the image above you can see the results of using the ‘df’ command before and after putting the SD card into my computer. It added 2 file systems. /dev/sdb1 and /dev/sdb2. We will need to unmount the file systems for the SD card. Make sure you unmount each file system associated on the SD card. Type the following command into the terminal.
umount <file system>
<file system> is your file system for the SD card. Again make sure you unmount each file system. In my case I would have to type the following commands
After you have unmounted the file system we should be ready to write the image to the SD card. Use the following command
sudo dd bs=4M if='<location of image>' of=<file system>
<location of image> is where the image you extracted is located.
<file system> is the SD card. Do not enter any numbers at the end. For example I had 2 file systems on my SD card but I will use /dev/sdb as my file system.
If my Kali Linux image was located on my desktop I would write the following command
sudo dd bs=4M if='/home/dayz/Desktop/kalipi.img' of=/dev/sdb
The ‘dd’ command will not show any progress, just hang tight. After a few minutes you should get a report on how much data was written to your SD card. You can apply this procedure to install any Raspberry Pi image including Raspbian, PwnPi or any other image. The procedure would be exactly the same.
If you have any questions or need help, comment down below and I will try to help you out.