Mobile Kali iPad Setup with Raspberry Pi 4
In this video, we'll set up Kali Linux for use with the Raspberry Pi/iPad combo.
Getting Started
Start out by burning the Kali Raspberry Pi image to an SD card and booting up your Pi.
Set up USB-OTG ethernet
Edit /boot/cmdline.txt
adding modules-load=dwc2,g_ether
just before rootwait
. Make sure you have a space before rootwait
.
Then edit /boot/config.txt
add dtoverlay=dwc2,dr_mode=peripheral
as the last line.
Reboot the Pi.
Set up the usb0
network interface
Create /etc/network/interfaces.d/usb0
:
auto usb0
allow-hotplug usb0
iface usb0 inet ipv4ll
Install avahi-autoipd
with sudo apt install avahi-autoipd
.
Configure Avahi daemon to start automatically
The Avahi daemon doesn't start automatically on Kali. Run sudo systemctl enable avahi-daemon
to fix that. You may want to start Avahi immediately with sudo systemctl start avahi-daemon
.
Force HDMI to start
Edit /boot/config.txt
. Add:
framebuffer_width=1194
framebuffer_height=834
hdmi_force_hotplug=1
Change the width and height to fit the dimensions of your device.
Install and configure x11vnc
First off install the x11vnc
package with sudo apt install x11vnc
.
Then create a VNC password with sudo x11vnc -storepasswd /etc/vncserver.pass
. Enter your desired VNC password when prompted.
To start x11vnc
automatically, create a systemd unit file at /etc/systemd/system/vncserver.service
:
[Unit]
Description=Start x11vnc at startup, before login.
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -display :0 -auth guess -forever -loop -repeat -rfbauth /etc/vncserver.pass -rfbport 5900 -shared -localhost
[Install]
WantedBy=multi-user.target
Then run:
sudo systemctl start vncserver
sudo systemctl enable vncserver
You're now all set to connect your VNC client to the Kali Pi. In this configuration, you'll need an SSH tunnel to connect securely. Check the video for an example of how to configure this in Jump Desktop.