Kali Linux on Raspberry Pi12 Jan 2019
Just some notes on my Kali build with Raspberry Pi…
Soldering is required to attach the header that connects the hat to the pi.
1. Prepare OS
Download the image and use Etcher to flash the SD card with Kali Linux. You don’t even have to decompress the image.
2. Basic Setup
Insert the SD card into the Raspberry Pi and plug in the micro USB power source.
You’ll need to hook up an external monitor for the first boot in order to prepare the machine for console use.
root:toor, set up the wifi, and run the standard stuff:
apt-get update apt-get full-upgrade
Make sure to change the default password:
Change the default SSH keys:
Edit the file
/etc/ssh/sshd_config and change the line with
/etc/pam.d/lightdm-autologin and comment out:
# auth required pam_succeed_if.so user != root quiet_success
After this step, you can reboot whenever and have ssh access with your root user.
Optionally, you can change the
hostname so that people don’t know this is a kali box, or to make it easier to find yours.
3. Prepare for a console-only experience
Set Kali to boot into console mode:
systemctl set-default multi-user.target systemctl get-default # this command checks the setting reboot
Clone the following repos:
The first repo has
adafruit-pitft.sh which is used to automatically configure the TFT display but since we’re on Kali some of the dependencies for the script are unvailable which is why we need the second repo.
py-spidev folder, run:
make make install
Go into the
Raspberry-Pi-Installer-Scripts folder and edit the
adafruit-pitft.sh file. In this file, remove the part where it tries to install
tslib. Then, run:
./adafruit-pitft.sh -u /root
This will ask you what screen you have and what configuration/rotation you prefer.
Afterwards, when you reboot you should see the console show up on the display. I prefer the
270 degrees (landscape) setting as this will place the buttons below the display.
I’m still unable to figure out the buttons on a Kali image. If anyone out there has any input, please let me know :)
To edit wifi, there are two ways:
wpa_supplicant -B -i wlan0 -c <(wpa_passphrase "MYSSID" 12345678) && dhclient wlan0 # or nmcli d wifi connect MYSSID password 12345678 iface wlan0
4. Get Sound
Get sound to work
/boot/config.txt uncomment and edit the line:
Install and enable dependencies:
apt-get install alsa-utils systemctl --user enable pulseaudio && systemctl --user start pulseaudio reboot systemctl --user status pulseaudio
Test the tone:
play -n -c1 synth 10 sine 1000