Kali Linux 2017.1 + Raspberry Pi 3 + RPI 7″ Touchscreen = Plug and Play!

The Kali Linux penetration testing distribution has been available for Raspberry Pi for quite some time. However, it can be quite a chore to set it up, especially with a touchscreen.

Recently I purchased the official Raspberry Pi 7″ touchscreen and was astonished when I put the SD card in and Kali booted up right to the desktop ready for me to log in with the touchscreen not only displaying but actually fully functional with touch enabled!

Read on to see the setup and some basic instructions to do it yourself!

The Equipment

Setup for Raspberry Pi 7" Touchscreen with case
Setup for Raspberry Pi 7″ Touchscreen with case
Raspberry Pi 4
Raspberry Pi 4

The Raspberry Pi 4 is available in different memory configurations all the way up to 8 GB. It’s about the size of a credit card and uses an extremely low amount of power making it ideal for all sorts of projects and ideas!

Links: Amazon.com*, AliExpress*, Amazon.ca*, Amazon.com.au*, Amazon*.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

Raspberry Pi Official 7" TFT
Raspberry Pi Official 7″ TFT

The official 7″ TFT touchscreen for the Raspberry Pi by the official Raspberry Pi Foundation!

Links: Amazon.com*, AliExpress*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

SmartPi2 Case for Raspberry Pi
SmartPi2 Case for Raspberry Pi

The Raspberry Pi 4 is available in different memory configurations all the way up to 8 GB. It’s about the size of a credit card and uses an extremely low amount of power making it ideal for all sorts of projects and ideas!

Links: Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

CanaKit 3.5A Power Adapter
CanaKit 3.5A Power Adapter

The CanaKit 3.5A adapter has an extra half an amp (500 mA) of capacity to give some breathing room to your accessories. This is bigger than the official Pi power supply which provides 3.0A.

Links: Amazon.ca*, Amazon.com*, Amazon.com.au*, Amazon.sg*

SanDisk Extreme A1
SanDisk Extreme A1

The SanDisk Extreme A1-A2 SD card has the best scoring SD card on Pi Benchmarks for years and is second in popularity only to the SanDisk Ultra (often included in combo kits). The application class (A1) means random I/O speeds (very important when running an OS) have to meet a higher standard. There’s no benefit on the Pi for A2 right now so get whichever is cheaper/available.

Links: Amazon.com*, AliExpress*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

Assembly

The assembly is very easy. First you put your official 7″ touchscreen in the case with the provided screws. Now put your Pi in the slot in the back of the case that is perfectly formed to hold the board. Then you simply connect one ribbon cable from the touchscreen to the Pi.  Finally insert your MicroSD and connect the power supply. That is it!

Imaging your SD card

Head to the official Kali Linux ARM Images Page and scroll down to the Raspberry Pi. You will download the image for the Raspberry Pi 2/3 (the first one). You will *not* choose the one that says Raspberry Pi w/ TFT. That is for other older TFTs and Gen1 boards like the original Model B.

Now write the image to your SD card. If you are doing this from Windows then I suggest to use Win32DiskImager . If you are not on Windows then I am going to assume you already know how to write an image to your SD card. Wait for the process to finish then safely eject the card after the write is complete.

Starting Kali Linux

Simply put the SD card in your Raspberry Pi. Assuming you have already assembled everything go ahead and power it up. It should take you straight to the Kali login. The default login information is username root and the password is toor. This should take you straight to the desktop and you should immediately be able to use the touchscreen. Go ahead and hit the Applications menu or open the web browser and test out to make sure everything is working.

Initial Steps

This is pretty much a no brainer but you should immediately change the default password. SSH is enabled by default so you are extremely vulnerable to anyone just SSH’ing in and taking control if you don’t do it. Open a command prompt and type passwd and change it.

The second step is to regenerate your SSH keys. All these images ship with the same default SSH keys which makes your SSH traffic vulnerable to sniffing quite easily. This is easily done by typing:

dpkg-reconfigure openssh-server

The third step is to expand the image to use all of your SD cards space just like you would with Raspbian. Unfortunately we do not have the raspi-config tool to do it for us on Kali. Thankfully we can just use GParted which is very easy. Type in a console window:

apt-get install gparted

Now run gparted from the applications menu or just right in the console again. The window will open. Resize your ext4 partition to use the rest of the unused space (just slide the end of the partition all the way into the rest of the unused space) and then apply your changes.

Now you should be utilizing the full space and will have plenty of space to upgrade to full Kali Linux!

And the fourth step is to update your distribution. From console window:

apt-get update
apt-get upgrade

Upgrade to Kali-Linux-Full (Optional)

The Raspberry Pi distribution is pretty minimal by default. This makes sense for a small ARM board but chances are you have at least a 16-32GB SD card and if you have resized your partition you have plenty of room to unleash the full power of Kali. The upgrade is simple. Type

apt-get install kali-linux-full

This will take a while and there are a few packages you’ll have to answer some basic questions for. However, once completed, you will have the full version of most powerful security and penetration testing distribution in the world with a touchscreen and a highly mobile platform for testing!

Final Build

Raspberry Pi 7" Kali Build with backplate on
Raspberry Pi 7″ Kali Build with backplate on — notice that GPIO pins are still accessible!
Raspberry Pi 7" Kali Build with backplate off
Raspberry Pi 7″ Kali Build with backplate off
Kali actually running and connected to local WiFi
Kali actually running and connected to local WiFi using built in wifi

Benchmarking / Testing Storage

If you want to verify your drive’s performance you may want to run my storage benchmark with:

sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash

If you search for the model of your drive on Pi Benchmarks you can compare your score with others and make sure the drive is performing correctly!

Other Resources

You may also want to check out my newer Kali Linux Raspberry Pi guide

If you have a Raspberry Pi Zero you may want to check out my Kali P4wnP1 Linux guide here

*Update 8/28/2021

It has been brought to my attention that the screen no longer seems to be plug and play in Kali. This is most likely due to many distros dropping support for resolutions lower than 800×600.

To do a “manual override” and add the correct screen dimensions add this to your /boot/config.txt file:

max_usb_current=1
hdmi_force_hotplug=1
config_hdmi_boost=7
hdmi_group=2
hdmi_mode=87
hdmi_drive=1
hdmi_cvt 800 480 60 6 0 0 0

The last line there will tell it to use the resolution 800 x 480 which will match the screen’s dimensions precisely.

Subscribe
Notify of
guest

4 Comments
Inline Feedbacks
View all comments
noob
noob
6 years ago

Hi great guide.

However I have 7″ official screen but cannot get it functioning with Kali, no issues with default raspbian just Kali.

Any suggestion

noob
noob
2 years ago

still doesnt work since the bottom of my screen is out of range. I will prob be dead if you wait three more years to reply