Raspberry Pi Zero 2 W
PiSugar 3 1200 mAh battery
Pimoroni Display Hat Mini
ATGM 336H GPS Radio
16 GB Micro SD
GPS Pi
VCC -> 3.3v (pin 1)
GND -> GND (pin 14)
TX -> UART RX (pin 10)
RX -> UART TX (pin 8)
30 Gauge Wire fits through the holes in the PiSugar board nicely
Case files can be found on Thingiverse
port 22 ssh: pi/raspberry
port 8421 Pi Sugar 3: admin/admin
port 8080 Pwnagotchi web interface: changeme/changeme
port 80 Bettercap: pwnagotchi/pwnagotchi
Flash the 64 bit version 2.9.4 of the jayofelony image, 2.9.5 crashes the broadcom driver and implodes
jayofelony github
Using Raspberry Pi Imager
Boot with keyboard and monitor connected
Configure username/password
Default user/pass for a Raspberry pi build are pi/raspberry
Power off
Swap keyboard for USB to ethernet adapter
Boot
sudo raspi-config
-> Localization Options
-> Timezone
Wifi will not work if you do not set the country
sudo raspi-config
-> Localization Options
-> WLAN Country
sudo raspi-config
-> Interface Options
-> Serial Port
-> Disable login shell over serial
-> Enable serial port hardware
reboot
Browse to port 8080 in a web browser on the Pi's IP address
Default credentials are changeme/changeme
Click on plugins
You must make a change to a plugin to generate the file
If you do not want to disable anything, disable one and reenable it
Optional - disable grid plugin
validate /etc/pwnagotchi/config.toml now exists
git clone https://github.com/r3dfish/Beepergotchi.git
cd Beepergotchi
chmod +x beepergotchi_installer.sh
./beepergotchi_installer.sh
DO NOT run apt upgrade, it will break pwnagotchi
sudo apt update
sudo apt install vim
wget https://cdn.pisugar.com/release/pisugar-power-manager.sh
bash pisugar-power-manager.sh -c release
Browse to port 8421 in a web browser on the Pi's IP address
Login with the credentials you configured
Default credentials are admin/admin
You should see the Pi Sugar control interface
Browse to port 8080 in a web browser on the Pi's IP address
Default credentials are changeme/changeme
Click on plugins
You must make a change to a plugin to generate the file
If you do not want to disable anything, disable one and reenable it
Optional - disable grid plugin
validate /etc/pwnagotchi/config.toml now exists
git clone https://github.com/nullm0ose/pwnagotchi-plugin-pisugar3.git
cd pwnagotchi-plugin-pisugar3
sudo cp pisugar3.py /usr/local/share/pwnagotchi/custom-plugins/
sudo vim /etc/pwnagotchi/config.toml
Add these settings to config.toml:
main.plugins.pisugar3.enabled = true
main.plugins.pisugar3.shutdown = 5
Optional - change the name of the pwnagotchi
main.name = "Beepergotchi"
sudo systmctl restart pwnagotchi
Browse to port 8080 in a web browser on the Pi's IP address
The power status should show up at the top of the pwnagotchi display in the browser
sudo raspi-config
-> Interface Options
-> Serial Port
-> Disable login shell over serial
-> Enable serial port hardware
reboot
sudo apt install gpsd gpsd-clients
gpsd -V
We will see version 3.22 which needs to be uninstalled
sudo apt remove gpsd
The fix for 3.22 only pulling the location from first fix can be found on this thread post:
why does gpsd not update a location past its first fix
sudo apt install scons cppcheck
wget http://download.savannah.gnu.org/releases/gpsd/gpsd-3.25.tar.gz
tar -zxvf gpsd-3.25.tar.gz
cd gpsd-3.25/
sudo scons
sudo scons install
which gpsd
/usr/local/sbin/gpsd -V
validate we are now running version 3.25
sudo rm /etc/default/gpsd
sudo bash -c 'cat > /etc/default/gpsd' << EOF
# Default settings for the gpsd init script and the hotplug wrapper.
# Start the gpsd daemon automatically at boot time
START_DAEMON="true"
# Use USB hotplugging to add new USB devices automatically to the daemon
USBAUTO="false"
# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
DEVICES="/dev/ttyS0"
# or, if you want to setup with BlueNMEA on your android phone, with bt-tethering :
# DEVICES="tcp://192.168.44.1:4352"
# Other options you want to pass to gpsd
GPSD_OPTIONS="-n -F /var/run/gpsd.sock"
EOF
Finish creating the gpsd.service following this forum topic:
gpsd failing on boot, but starts manually
which gpsd
take note to modify ExecStart line below
sudo vim /etc/systemd/system/gpsd.service
[Unit]
Description=GPS (Global Positioning System) Daemon
Requires=gpsd.socket
# Needed with chrony SOCK refclock
# After=chronyd.service
[Service]
EnvironmentFile=-/etc/default/gpsd
EnvironmentFile=-/etc/sysconfig/gpsd
ExecStart=/usr/local/sbin/gpsd -N $GPSD_OPTIONS $DEVICES
[Install]
WantedBy=multi-user.target
Also=gpsd.socket
sudo systemctl enable gpsd.service
sudo reboot
gpsmon
Once we get a GPS fix, we should now see current location data in gpsmon
cd /usr/local/share/bettercap/caplets/
> backup original auto caplet incase you need to restore later
cp pwnagotchi-auto.cap /home/pi
sudo cp pwnagotchi-manual.cap pwnagotchi-auto.cap
sudo reboot
Browse to the Pi's IP Address in a browser
Advanced -> gps
baud rate 9600
click the save button on baud rate
device 127.0.0.1:2947
click the save button on device
click gps on
click Position on the top menu bar and validate you have location after you get a GPS fix
sudo pip3 install --break-system-packages gpsd-py3
git clone https://github.com/kellertk/pwnagotchi-plugin-gpsd.git
cd pwnagotchi-plugin-gpsd
sudo cp gpsd.py /usr/local/share/pwnagotchi/custom-plugins/
sudo vim /etc/pwnagotchi/config.toml
main.plugins.gpsd.enabled = true
main.plugins.gpsd.gpsdhost = "127.0.0.1"
main.plugins.gpsd.gpsdport = 2947
sudo reboot
Browse to port 8080 in a web browser on the Pi's IP address
plugins -> enable memtemp
sudo vim /etc/pwnagotchi/config.toml
main.plugins.memtemp.scale = "fahrenheit"
main.plugins.memtemp.orientation = "vertical"
sudo vim /etc/pwnagotchi/config.toml
ui.display.enabled = true
ui.display.rotation = 180
ui.display.type = "displayhatmini"
sudo systemctl restart pwnagotchi
Display should now be working
sudo vim /etc/pwnagotchi/config.toml
Add the URL below to the existing main.custom_plugin_repos list
main.custom_plugin_repos = [
"https://github.com/V0r-T3x/Fancygotchi/archive/main.zip",
]
sudo pwnagotchi plugins update
sudo pwnagotchi plugins list
sudo pwnagotchi plugins install Fancygotchi
sudo reboot
Browse to port 8080 in a web browser on the Pi's IP address
click on plugins
enable Fancygotchi
refresh the page
click on Fancygotchi
click on theme downloader
click load theme list
click select theme
click theme manager
select cyber theme from the drop down
click select theme
cyberartemio's wardriver plugin
git clone https://github.com/cyberartemio/wardriver-pwnagotchi-plugin.git
cd wardriver-pwnagotch-plugin
sudo cp wardriver.py /usr/local/share/pwnagotchi/custom-plugins/
sudo cp -r wardriver_assets/ /usr/local/share/pwnagotchi/custom-plugins/
sudo vim /etc/pwnagotchi/config.toml
Add the following code block to config.toml
# Enable the plugin
main.plugins.wardriver.enabled = true
# Path where SQLite db will be saved
main.plugins.wardriver.path = "/home/pi/wardriver"
# Enable UI status text
main.plugins.wardriver.ui.enabled = true
# Enable UI icon
main.plugins.wardriver.ui.icon = true
# Set to true if black background, false if white background
main.plugins.wardriver.ui.icon_reverse = false
# Position of UI status text
main.plugins.wardriver.ui.position.x = 7
main.plugins.wardriver.ui.position.y = 95
# Enable WiGLE automatic file uploading
main.plugins.wardriver.wigle.enabled = false
# WiGLE API key (encoded)
main.plugins.wardriver.wigle.api_key = "xyz..."
# Enable commercial use of your reported data
main.plugins.wardriver.wigle.donate = false
# OPTIONAL: networks whitelist aka don't log these networks
main.plugins.wardriver.whitelist = [
"network-1",
"network-2"
]
# NOTE: SSIDs in main.whitelist will always be ignored
sudo systemctl restart pwnagotchi
git clone https://github.com/r3dfish/Beepergotchi.git
sudo cp /home/pi/Beepergotchi/320x240e-t-g.png /usr/local/share/pwnagotchi/custom-plugins/themes/cyber/img/bg/320x240e-t-g.png
sudo cp -r /home/pi/Beepergotchi/boot /usr/local/share/pwnagotchi/custom-plugins/themes/cyber/img/
sudo cp /home/pi/Beepergotchi/memtemp.py /home/pi/.pwn/lib/python3.11/site-packages/pwnagotchi/plugins/default/memtemp.py
sudo cp /home/pi/Beepergotchi/config-h.toml /usr/local/share/pwnagotchi/custom-plugins/themes/cyber/config/config-h.toml
sudo cp /home/pi/Beepergotchi/pisugar3.py /usr/local/share/pwnagotchi/custom-plugins/pisugar3.py
local timezone must be set via raspi-config to convert UTC to local time
sudo cp /home/pi/Beepergotchi/gpsd.py /usr/local/share/pwnagotchi/custom-plugins/gpsd.py
sudo mkdir -p /etc/systemd/scripts
sudo vim /etc/systemd/scripts/turnOffDisplayLED.py
import RPi.GPIO as GPIO
red_pin = 17 # GPIO pin for red channel
green_pin = 22 # GPIO pin for green channel
blue_pin = 27 # GPIO pin for blue channel
GPIO.setmode(GPIO.BCM)
GPIO.setup(red_pin, GPIO.OUT)
GPIO.setup(green_pin, GPIO.OUT)
GPIO.setup(blue_pin, GPIO.OUT)
GPIO.output(red_pin, GPIO.LOW)
GPIO.output(green_pin, GPIO.LOW)
GPIO.output(blue_pin, GPIO.LOW)
GPIO.cleanup()
sudo vim /etc/systemd/system/turnOffDisplayLED.service
[Unit]
Description=Dim LED on Display HAT Mini
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/python3 /etc/systemd/scripts/turnOffDisplayLED.py
Restart=on-failure
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable turnOffDisplayLED.service
sudo reboot
sudo cp /home/pi/Beepergotchi/bt-tether.py /home/pi/.pwn/lib/python3.11/site-packages/pwnagotchi/plugins/default/
Browse to port 8080 in a web browser on the Pi's IP address
> click on plugins
> enable bt-tether
For Android, you must enable bluetooth tethering prior to pairing
Settings -> Connections -> Mobile Hotspot and Tethering -> Bluetooth tethering
sudo bluetoothctl
scan on
discoverable on
Copy the phone's mac address and name once it is discovered
sudo vim /etc/pwnagotchi/config.toml
main.plugins.bt-tether.phone = "android"
main.plugins.bt-tether.phone-name = "<<phone name>>"
main.plugins.bt-tether.mac = "<<phone mac>>"
Find the pwnagotchi in the list of available bluetooth devices on the Android phone and click it to begin pairing
type yes in bluetoothctl to authorize pairing
click on "pair" on the Android phone
once bluetoothctl says it has paired, run the following command in bluetoothctl:
trust "<<phone mac>>"
exit
sudo systemctl restart pwnagotchi
After a restart, the pwnagotchi should automatically connect to the Android phone via bluetooth
The IP address of the pwnagotchi will be displayed on the screen in the bottom right
you can navigate to this IP address in a browser on the Android phone to interact with the pwnagotchi
NOTE: If you disable bluetooth, you will have to manually re-enable bluetooth tethering on the Android phone or the pwnagotchi will not connect
For iOS, you must enable Personal Hotspot prior to pairing
Settings -> Personal Hotspot -> Allow Others to Join
sudo bluetoothctl
scan on
discoverable on
Copy the phone's mac address and name once it is discovered
sudo vim /etc/pwnagotchi/config.toml
main.plugins.bt-tether.phone = "ios"
main.plugins.bt-tether.phone-name = "<<phone name>>"
main.plugins.bt-tether.mac = "<<phone mac>>"
Find the pwnagotchi in the list of available bluetooth devices on the iOS phone and click it to begin pairing
type yes in bluetoothctl to authorize pairing
click on "pair" on the iOS phone
once bluetoothctl says it has paired, run the following command in bluetoothctl:
trust "<<phone mac>>"
exit
sudo reboot
After a restart, the pwnagotchi should automatically connect to the iOS phone via bluetooth
The IP address of the pwnagotchi will be displayed on the screen in the bottom right
you can navigate to this IP address in a browser on the iOS phone to interact with the pwnagotchi