Kali and the Raspberry Pi.

When the developers of Kali Linux approached porting the OS to the Raspberry Pi 2 they came up with a unique strategy of offering a base system and then creating an apt-get process to download bundled and preconfigured tool sets. Most researchers won’t fully use the Raspberry Pi as sole Kali product but researchers will use the Raspberry Pi version of Kali as an extension of their own shell, such as a remote wireless auditor. So once we download the base OS you will immediately notice how streamline and easy it is to add the Kali tools and removing them as bundles using the same method. The video is coming soon.

It should be noted here that Offensive Security Group which houses the Raspberry Pi version of Kali is an author and creator of the Kali project. Offensive Security Group also houses Metasploit, the Exploit Database, and Backtrack.  Auditor Linux – the first pen suite I ever used by people affiliated with this group.


Only download the image from Offensive Security Group by either the OSG home page or the Kali.org homepage. If you download from other sources you really have no idea what you are getting!!!

Get the Kali image for Raspberry PI We will be showing you here two ways to set up your Pi and both versions are correct. I am going to show you my way first and then a suggested way from the OSG blog in my next post.

My install method.

After we download the minimal image from OSG write it to ur MicroSD and place it in the Pi we then add our Wi-Fi adapter and plug HDMI to our monitor. Usually I go with headless installs but we need to log in one time visually to accept the default desktop and add your Raspberry Pi to the home Wi-Fi network, alternately of course you could just plug your Pi into your router via eth cable and access it that way but the Raspberry Pi is more reliable than say the Orange Pi so I like to do the Raspberry wirelessly.

So with our Pi up and accessible we then resize the MicroSD by running the wiggle script

If these command do not work add sudo and try again.


Expand the SD!

There are two ways to resize the SD card. If the wiggle script does not work try the second longer option.

First Method:

After resize is complete it will ask you to press enter to reboot, please do. Only run once!

wget https://raw.github.com/dweeber/rpiwiggle/master/rpi-wiggle

chmod +x rpi-wiggle

sudo ./rpi-wiggle

Or try this method to download Rasp-config to expand the SD:

Second Method:

wget http://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20150706_all.deb

wget http://http.us.debian.org/debian/pool/main/l/lua5.1/lua5.1_5.1.5-7.1_armhf.deb

wget http://http.us.debian.org/debian/pool/main/t/triggerhappy/triggerhappy_0.3.4-2_armhf.deb

dpkg -i triggerhappy_0.3.4-2_armhf.deb

dpkg -i lua5.1_5.1.5-7.1_armhf.deb

dpkg -i raspi-config_20150706_all.deb




After reboot and resize we log back in, using ssh.   

ssh –l root 192.168.x.x

We then update:

apt-get update

We then upgrade:

apt-get upgrade




Get Remote!

Install xrdp so you can RDP from Linux or a Windows box or even your Phone into your Pi:

apt-get install xrdp

Start the xrdp:

service xrdp start

In other versions of Linux xrdp will automatically start on reboot but on Kali you may have to force it to autostart when loaded by running this command to append xrdp to autostart:

sudo update-rc.d xrdp enable  – info about update-rc.d


Beef it up!

Now we have access to our Raspberry Pi running a slim version of Kali and we need to beef it up with some useful tools. First we add wireless security suite and the we will follow it up with RTL-SDR.

Please browse over to Kali Metapackages for more detail of all packages you can add.

So we already have the base system and this project I had envisioned using my Pi as remote WiFi hacking tool so I will start with the WiFi hacking metapackage.

apt-get install kali-linux-wireless 

This will take some time to install, also note the GB size of each package. As you can see the more you add the larger the space it takes up.

Next I would like to add PWTools for a side project, I will go ahead and add it after the wireless metapackage completes.

apt-get install kali-linux-pwtools

After both installs are complete you just need to add your secondary WiFi card, promiscuous mode, and you are ready to extend your shell.


Now it’s incredibly important that I let you know if you decide to go with a full install it may take over several hours. I did manage to install the full and it took over 3 hrs, It took 40 min alone to download the packages and the a few hours to unpack and install them and after the install the OS was kind of funky.


Uninstall Kali metapackages.

You can also uninstall packages in this method. Say you just want the wireless auditing metapackage but you have decided not to use the PWTools  metapackage. Well all you have to do is uninstall that metapackage group something like this:

apt-get remove kali-linux-pwtools or apt-get purge kali-linux-pwtools