In this guide, I will walk you through the process of setting up a Raspberry Pi with a 3.5-inch touchscreen running Kali Linux. This compact yet powerful setup is perfect for on-the-go penetration testing and cybersecurity research. I’ll cover everything from flashing the Kali Linux image onto a microSD card, logging in for the first time with an external display, installing touchscreen drivers, configuring the screen settings, and setting up a portable power solution. Additionally, we will cover some security configurations such as enabling root login, setting a password, and configuring SSH access over root.
By the end of this tutorial, you’ll have a cost-effective, portable penetration testing box that can be powered via an external battery or even a smartphone—making it easy to carry and use in different environments. It will be very similar to its smaller sibling called Pi-Tail I mentioned in my other post when building headless Portable Hacking Lab.
While this guide is specifically tailored for mine Raspberry Pi 4 with a 3.5-inch touchscreen, the overall process can be adapted to other Raspberry Pi models and different touchscreen sizes.
One of the biggest misconceptions about penetration testing setups—especially those running Kali Linux—is that they are some kind of “magic hacking machine” that can automatically break into systems with the push of a button. This is far from reality.
What we are building here is a toolbox, not an automated hacking device. Just like a professional mechanic carries a set of wrenches, screwdrivers, and diagnostic tools, a penetration tester needs a collection of security tools, scripts, and utilities to assess and secure networks. The real skill lies in understanding how these tools work and when to use them.
This blog is intended solely for educational and ethical purposes. The information provided is meant to help cybersecurity professionals, ethical hackers, and technology enthusiasts understand how to set up and use Kali Linux on a Raspberry Pi for legitimate security testing and research.
Unauthorized access to networks, systems, or devices without explicit permission is illegal and may result in severe legal consequences. Always ensure you have the proper authorization before conducting any penetration testing or security assessments.
The author of this blog do not condone or encourage any form of illegal hacking, cyberattacks, or unethical behavior. Use this knowledge responsibly, respect privacy laws, and always follow ethical hacking principles.
Kali Linux is a penetration testing-focused operating system that comes with a vast collection of tools for security testing. To install it on a Raspberry Pi 4, follow the steps below.
Step 1: Download the Kali Linux Image
First, download the Kali Linux ARM image for Raspberry Pi from the official Kali Linux website. Ensure you select the Raspberry Pi version.
Step 2: Flash Kali Linux to a MicroSD Card
To install Kali Linux on your microSD card (32GB or larger recommended), use balenaEtcher or Raspberry Pi Imager:
Once done, insert the microSD card into the Raspberry Pi.
Since the touchscreen will require additional driver installation, we will start with a Micro HDMI external display.
Step 1: Boot the Raspberry Pi
Step 2: Default Login Credentials
The default credentials for Kali Linux are:
After logging in, you will be greeted with the Kali Linux desktop.
Keeping your system up to date is crucial for security and performance. Before installing the touchscreen drivers, we need to ensure the latest updates are installed.
Run the following command to update the package lists and upgrade installed packages:
sudo apt update && sudo apt full-upgrade -y
This command:
apt update
)apt full-upgrade -y
)Once the upgrade is complete, reboot the system to apply changes:
sudo reboot
To use the 3.5-inch touchscreen, we need to install the proper drivers. A useful tool for this is LCD-show-kali, which is available on GitHub.
Step 1: Install Touchscreen Drivers
lcdwiki
repository, to avoid error crashes during boot. I got these when using https://github.com/waveshare/LCD-show
repo.:git clone https://github.com/lcdwiki/LCD-show-kali.git
cd LCD-show-kali
chmod +x LCD35-show
sudo ./LCD35-show
The system will reboot, and the display should now show the Kali Linux interface.
If you need to rotate the screen or adjust the resolution, edit the /boot/config.txt
file:
sudo nano /boot/config.txt
Add one of the following lines, depending on your needs:
display_rotate=1
display_rotate=2
display_rotate=3
Save the file and reboot:
sudo reboot
By default, Kali Linux disables the root account login. To enable it and set a root password, run:
sudo passwd root
You will be prompted to enter a new root password.
For detailed instructions, refer to this guide.
To avoid entering credentials every time you boot up, configure auto-login. This is useful if you would like to connect to the box over SSH using different device such as smartphone run:
sudo raspi-config
From Boot Options
-> Desktop / CLI
-> Desktop Autologin
If you want to remotely access your Kali Linux setup via SSH as root. This step is not necessary, because you can still access the box using kali
credentials.
sudo nano /etc/ssh/sshd_config
no
to yes
:PermitRootLogin yes
sudo systemctl restart ssh
Now you can remotely access your Kali box using:
ssh root@<your_pi_ip_address>
To make this setup portable, we need a reliable power source.
Option 1: External Battery Pack
Option 2: Powering via Smartphone
Controlling the Raspberry Pi with a touchscreen is possible using the on-screen keyboard, but it takes up valuable screen space, making navigation and typing less efficient. For a more convenient experience, especially when working on the go, using a small Bluetooth keyboard can greatly improve usability while keeping the setup lightweight and portable. Alternatively, for remote access and full control, users can connect to the Raspberry Pi over SSH for command-line management or use VNC for a graphical interface, both of which can be done directly from a smartphone or laptop. These options allow for greater flexibility, ensuring you can operate your portable Kali Linux box efficiently in any environment.
For users relying solely on the touchscreen, a practical way to input text without a physical keyboard is by using Onboard, a feature-rich virtual keyboard. It can be installed easily with:
sudo apt install onboard
Onboard is highly customizable, offering features like auto-show when selecting a text field, making typing more seamless. It is also scalable and movable, allowing users to position it anywhere on the screen for better accessibility. Additionally, its adjustable opacity ensures that it doesn’t obstruct critical elements, which is especially useful on a small touchscreen display.
A Raspberry Pi running Kali Linux serves as a powerful and portable cybersecurity toolbox, enabling network reconnaissance, WiFi security testing with external adapters, Bluetooth analysis using specialized dongles, RFID/NFC testing with Proxmark3, MITM attacks with Bettercap, web application vulnerability assessments and others. This setup is lightweight, cost-effective, and versatile, making it ideal for ethical hackers and security professionals who need a mobile penetration testing lab.
By following this guide, you have created a fully functional, portable penetration testing box using the Raspberry Pi and Kali Linux. This setup allows for on-the-go cybersecurity assessments, network testing, and ethical hacking.
With a touchscreen interface, root access, SSH support, and portable power, you now have a mobile ethical hacking toolkit that fits in your pocket.