DubRecen-PwnGang-Build-Guides

DubRecen-PwnGang-Build-Guides

Table of contents

My Setups

Build logs and details coming soon!

Name Picture Board Screen Case Power Extra  
Pwnamon Pwnamon UI Raspberry Pi0W Waveshare Eink 2,13” 3D printed PiSugar 3 USB GPS Dongle  
FAT32   Pi 3B Adafruit Pitft 2,8” Adafruit Case and Faceplate USB    
FAT16   Pi 3A+ Adafruit Pitft 2,4” Adafruit Case and Faceplate USB    
Pip-Boy Pip-Boy Pi 0W2 Pimoroni Displayhat mini 3D printed PiSugar 3    
WarDriver WarDriver Pi 0W2 Adafruit Mini TFT 3D printed (under development) USB Pimoroni I2C GPS  
RasTest OLEDLCD OLED LCD Pi 3A+ Waveshare OLED/LCD Geekworm Alu case (+ 3D printed faceplate under development) USB    
RasTest GFX Hat GFX Hat Pi 3A+ Pimoroni GFX Hat 3D printed (under development) Pisugar 3 Plus Adafruit I2C GPS  
               

Pwnagotchi Build Guide

Build Instructions

PLEASE REFER TO THE UNOFICCIAL PWNAGOTCHI SITE! Also you can join the Pwnagotchi community on Reddit and Discord!

Step 1) Download the image

I use Jayofelonys repo. It is under active development based on the community feedback and updated frequently with bugfixes, new features, and supports more than 80 screens. Also you can skip most of these steps, if you can ssh in to your device, and use the wizard:

sudo pwnagotchi --wizard

Step 2) Flash the image to microSD

Note: Recommended to use Raspberry Imager to flash the image.

Several tutorials exist online (Google or YouTube) that provide instructions for flashing an image to a microSD.

Before flashing the image I use the Raspberry Imager, to set the timezone, and change the default user/password for the OS.

Step 3) Build your config

Your initial config.toml will contain the baseline configuration for your pwnagotchi, such as the name of the device. It is recommended to avoid trying to configure all of your plugins at this stage, and only focus on the essential plugins, such as bt-tether, Modify as necessary!

main.name = "Pwnagotchi"
main.whitelist = [
 "your wifi here",
]

main.plugins.bt-tether.enabled = true
main.plugins.bt-tether.devices.android-phone.enabled = true
main.plugins.bt-tether.devices.android-phone.search_order = 1
main.plugins.bt-tether.devices.android-phone.mac = "MA:CA:DD:RE:SS"
main.plugins.bt-tether.devices.android-phone.ip = "192.168.44.44"
main.plugins.bt-tether.devices.android-phone.netmask = 24
main.plugins.bt-tether.devices.android-phone.interval = 1
main.plugins.bt-tether.devices.android-phone.scantime = 0
main.plugins.bt-tether.devices.android-phone.max_tries = 0
main.plugins.bt-tether.devices.android-phone.share_internet = true
main.plugins.bt-tether.devices.android-phone.priority = 1

main.plugins.bt-tether.devices.ios-phone.enabled = false
main.plugins.bt-tether.devices.ios-phone.search_order = 2
main.plugins.bt-tether.devices.ios-phone.mac = "MA:CA:DD:RE:SS"
main.plugins.bt-tether.devices.ios-phone.ip = "172.20.10.6"
main.plugins.bt-tether.devices.ios-phone.netmask = 24
main.plugins.bt-tether.devices.ios-phone.interval = 1
main.plugins.bt-tether.devices.ios-phone.scantime = 0
main.plugins.bt-tether.devices.ios-phone.max_tries = 0
main.plugins.bt-tether.devices.ios-phone.share_internet = true
main.plugins.bt-tether.devices.ios-phone.priority = 999

ui.display.enabled = true
ui.display.type = "waveshare_4"
ui.fps = 1
ui.invert = false

ui.web.enabled = true
ui.web.username = "changeme"
ui.web.password = "changeme"

Step 4) Copy the config to MicroSD

Note: If you removed, insert the microSD card flashed in Step 2. Open the new drive titled “boot”, and copy over your config.toml

Step 5) Important if you are using an SPI LCD screen!

For jays image since 2.8.7 until now, there is some issue with the SPI chip select stuff.

If your screen is not showing any image, but the backlight is on, you should modify the /boot/firmware/config.txt, and change dtoverlay=spi0-0cs to dtoverlay=spi0-1cs under the necessary pi settings.

Note: if you are sure that you need to modify the config.txt, you can do it after flashing the card. The config.txt is directly in the cards boot partition.

Step 6) Boot for the first time

WARNING: BE PATIENT! The First boot will take longer than average due to key generation.

NOTE: If you specified settings for bt-tether plugin, ensure your mobile device is nearby and listening for new bluetooth devices to pair. Ensure Internet sharing via Personal Hotspot is enabled. Your mobile device will be prompted to pair with your pwnagotchi.

Step 7) Bluetooth connection manually

SSH in (default login: pi, pw: raspberry)

sudo bluetoothctl
scan on

Wait until your phones mac address shows up and copy your phones mac address

pair MA:CA:DD:RE:SS
trust MA:CA:DD:RE:SS
exit

Step 8) Change the default passwords

If you haven’t done it with the Raspberry Imager, change the user “pi” password. Default is “raspberry”

passwd

Change “root” password:

sudo passwd root

If you haven’t done it when creating your config.toml file, change pwnagotchis Web UI password. Default is “changeme”

sudo nano /etc/pwnagotchi/config.toml

Locate and update the values for:

ui.web.username = "changeme"
ui.web.password = "changeme"

Update bettercap password, if you want to, I usually leave it as-is. Default is “pwnagotchi”

sudo nano /etc/pwnagotchi/config.toml

locate and update the values for:

bettercap.username = "pwnagotchi"
bettercap.password = "pwnagotchi"

For the new bettercap password to work yoyu have to modify these two files as well to match config.toml:

sudo nano /usr/local/share/bettercap/caplets/pwnagotchi-auto.cap
sudo nano /usr/local/share/bettercap/caplets/pwnagotchi-manual.cap

reload pwnagotchi for config changes to apply.

sudo systemctl restart pwnagotchi.service

Step 9) Plugins and mods

Consider this step OPTIONAL, unless you would like these custom plugins. Otherwise, proceed to Step 10.

Make custom-plugins directory defined in config.toml, if not done so already.

cd ~ sudo mkdir /usr/local/share/pwnagotchi/custom-plugins/

I usually use the default plugin directory.

Plugins marked with * are not tested by me yet, or needs some tweaking to work on my setup. Installation instruction and details soon

Step 9.1) Default plugins:

These plugins are provided in Jayofelonys repo, therefore if you have a full config.toml, the settings should be in your config.toml as well.

Step 9.2) 3rd party plugins and mods:

Step 10) Back up your work

Download the Backup script from Github Append the “FILES_TO_BACKUP” section of the backup script to include the following additional files that have been added or modified as a result of this guide:

FILES_TO_BACKUP="/root/brain.nn \
  /root/brain.json \
  /root/.api-report.json \
  /root/.ssh \
  /root/.bashrc \
  /root/.profile \
  /root/handshakes \
  /root/peers \
  /etc/pwnagotchi/ \
  /etc/ssh/ \
  /var/log/pwnagotchi.log \
  /var/log/pwnagotchi*.gz \
  /home/pi/.ssh \
  /home/pi/.bashrc \
  /home/pi/.profile \
  /root/.api-report.json \
  /root/.auto-update \
  /root/.bt-tether* \
  /root/.net_pos_saved \
  /root/.ohc_uploads \
  /root/.wigle_uploads \
  /root/.wpa_sec_uploads \
  /usr/bin/pwnlib \
  /etc/systemd/system/pwngrid-peer.service \
  /usr/local/share/pwnagotchi/custom-plugins \
  /usr/local/lib/python3.11/dist-packages/pwnagotchi"

Note: The last entry in the list must include an end quotation mark. Be sure to relocate this to the end of the list before saving. Make the script executable:

sudo chmod +x backup.sh

Run the script

sudo ./backup.sh

Enjoy your new Pwnagotchi, and please support the Pwnagotchi community on Reddit and Discord!