Skip to content
Karthik R T edited this page Jun 8, 2025 · 16 revisions

Pwnagotchi

A Pwnagotchi is a Raspberry Pi powered AI WiFi sniffing tool, that learns over time how to be most effective at capturing WiFi handshakes.

Raspberry Pi

Raspberry Pi (/paɪ/) is a series of small single-board computers (SBCs) developed in the United Kingdom by the Raspberry Pi Foundation in association with Broadcom. Since 2013, Raspberry Pi devices have been developed and supported by a subsidiary of the Raspberry Pi Foundation, Raspberry Pi Ltd.

Step 1 Installing

How to choose which image to install

Raspberry Pi 0W

The Raspberry Pi 0W is a single core board, it is a 32-bit device. Make sure you download the latest 32-bit image file.

Raspberry Pi 02W, 3, 4 and 5

The Raspberry Pi 02W, 3, 4 and the 5 are multi-core boards, they are all 64-bit devices. These can also run 32-bit software, but it is advised to use 64-bit software to make full use of the hardware. Make sure you download the latest 64-bit image file.

Flashing your image file

ui

I advise to use RPi Imager as your flashing software. Now you can click on Choose OS, and scroll down and click Use custom. Now select your downloaded image file.

ui

After you have selected your image file, you can click Choose storage, select the SD card you wish to install the Pwnagotchi software on.

ui

It will now ask if you wish to EDIT SETTINGS or otherwise. You should select NO. We do not want to use any custom settings, as they have already been correctly set in the image file. If you have set custom settings before, click NO, CLEAR SETTINGS.

Step 2 Connecting

Preparation

In order to make the first connection to your Pwnagotchi we need to prepare your computer to know how to locate your Pwnagotchi. It supports OTG, which requires a data USB cable.

You now have an SD card with Pwnagotchi flashed onto it, put the SD card in the appropriate slot of your Raspberry Pi. If you have a Pi0W or Pi02W connect the micro USB side to the port closest to your HDMI port, and insert the USB-A side into your computer. The Pi3 will require a USB-A to USB-A data cable. If you have a Pi4 or Pi5 you can use the USB-C port to connect to your computer.

Alternatively if you use a Pi4/5 you can connect it with an ethernet cable to your internet modem or router and skip to #Connecting.

Windows

RNDIS driver

Download RNDIS driver suitable to your network Adapter.

Look for the 'Setup Information' file right click and press 'Install'

Alternatively,

In your Device Manager look for the following connection (COMx) with your RPi connected:

image

It may also be identified as an unknown USB device or something similar. When you disconnect the RPi the device should also disappear from the list, it is just a double check for the right connection. Now that you have the correct connection, right click it and select Update driver and select Browse computer and go to folder containing the driver you downloaded in the beginning. It should be recognized as follows:

image

Assigning interface IP and Internet sharing

[1] Open Control Panel > Network and Internet > View network status and tasks > Change Adapter Settings.

Right click the device with the sub-title 'USB Ethernet/RNDIS Gadget ##' [2] > Properties > Double click 'TCP/IPv4' and configure like below

image

Press OK and close the remaining menus.

To share internet to Pwnagotchi, open the control panel menu as above [1]. Select your main internet adapter (Wifi/Ethernet) right click, properties. Open the sharing tab at the top of the menu, enable the top tick button and select the new Ethernet adapter that Pwnagotchi is using [2].

Press OK and close the remaining menus.

Configuring the RNDIS/Ethernet

Click on the System settings>Network>service>Details>TCP/IP. Here you will configure your IP and subnet mask. Under the drop down menu for Configure IPv4, select Manually. For the IP address now you will set it to 10.0.0.1. For the Subnet mask it will be 255.255.255.0 Next we will set the DNS servers, Click on the service>Details>DNS, Add one, enter 8.8.8.8 Add another, enter 1.1.1.1

You can now ssh into your Pwnagotchi

To share internet to your Pwnagotchi

Currently, macOS’s built-in internet sharing seems to break ssh. The way I have found around this is using EvilSocket’s connection sharing script (Download here) To use this script you need your interface number, to obtain such number, use ifconfig. Note down your main interface (Usually en0 sometimes en1 if you use ethernet and wifi) You will also need to find the interface number of your pwnagotchi, find the interface with the IP of 10.0.0.1. Note that number, for me en7.

Now, in a new terminal window. Type sudo sh. Drag the script you downloaded previously into the window, space once. Now enter the interface you're sharing from, for me en0 followed by a space the the interface you are sharing to. For me the command would look like sudo sh /Users/ryan/Downloads/macos_connection_share.sh en0 en7 Once you run this command you will be prompted for your password, enter said password and enter, you will see errors,

sharing connecting from upstream interface en0 to usb interface en7 ... net.inet.ip.forwarding: 0 -> 1 No ALTQ support in kernel ALTQ related functions disabled pf enabled pfctl: Use of -f option, could result in flushing of rules present in the main ruleset added by the system at startup. See /etc/pf.conf for further details.

This is normal, it means it worked! Now you can go over to your Pwnagotchi and ping google.com to make sure everything has worked!

Connecting

I prefer SSH to connect as it will also stimulate me to learn how to use Linux commands and Linux OS in general. I hope you will also.

Connect to your Pwnagotchi with SSH

Default credentials are: pi/raspberry

DO NOT run apt-get upgrade if you do you will need to reflash and start over

Windows

  • Open cmd.exe or a PowerShell session.
  • type ssh pi@10.0.0.2
  • Confirm the security message by entering yes
  • Enter the default password raspberry

If you are using a Pi4/5 and are connected with an ethernet cable, you can look up your device's IP and connect like this:

ssh pi@<IP_of_your_pwn> or ssh pi@pwnagotchi.lan

It will show a security message which you can confirm by typing yes.

And then enter your password.

Step 3 Configuration

Configuring your Pwnagotchi

Pwnagotchi works on a default configuration, which you can customize to your liking. The default configuration file can be found at /etc/pwnagotchi/defaults.toml. As mentioned you can customize your Pwnagotchi with a custom config file. You can do this easily when you have an SSH connection made.

New user-friendly wizard

While you are connected through SSH you can run the wizard:

  • sudo pwnagotchi --wizard This will start the configuration wizard and ask questions to set up a basic configuration file.

or

  • This command will also create a full config for you ready to edit later sudo cp /etc/pwnagotchi/default.toml /etc/pwnagotchi/config.toml

The final file is stored as /etc/pwnagotchi/config.toml.

  • You can either type sudo cat /etc/pwnagotchi/config.toml

This will show the contents of the created file. If you feel up to it, you can now edit it if you want to.

Manual editing

Your custom configuration file can also be edited manually:

  • sudo nano /etc/pwnagotchi/config.toml
  • there is also a shortcut command config And this will open the config.toml ready for editing.

This will open a file editor, and create the file (config.toml) if it does not exist. Make any adjustments as you see fit.

  • CTRL + S will save the file
  • CTRL + X will close the file, if any changes have been made and not yet saved it will ask you if you want to save the changes.