How I built my Pwnagotchi

Tags: security, raspberrypi, pwnagotchi, hacking
Published: 2019-11-12 10:33:38

## What is Pwnagotchi?

[Pwnagotchi](https://pwnagotchi.ai/) is an A2C-based “AI” powered by bettercap that learns from its surrounding WiFi environment in order to maximize the crackable WPA key material it captures (either through passive sniffing or by performing deauthentication and association attacks). This material is collected on disk as PCAP files containing any form of crackable handshake supported by hashcat, including full and half WPA handshakes as well as PMKIDs.

## Building a Pwnagotchi for Dummies - a reference guide for the rest of us :-)

When I got word of pwnagotchi from infosec twitter, I felt very excited and had to have one of my own. I had my own tamagotchis as a teen in the 90's and this seemed like an ideal cute little project to learn about raspberry pi, WiFi security, 3D printing, python, networking, and another community. I'm really fond of this little gadget!

Disclaimer: Please be aware of your local laws when using your Pwnagotchi. 


###Materials Used:

* [Inky Phat eInk Display](https://shop.pimoroni.com/products/inky-phat?variant=12549254938707)

* [Raspberry Pi  Zero WH](https://thepihut.com/products/raspberry-pi-zero-wh-with-pre-soldered-header?q=pi%20zero&variant=547332849681)

* SD card - I just got a generic 32GB one from local Argos as the one from Amazon was a dud

* Battery Pack - I picked up a Merkury MI-PB003 from TK Maxx

* Some good sturdy usb data cables - from Amazon




###Installation and setup steps:

* Insert the screen onto the raspberry pi board. (It's ok if a millimeter of the pins are still showing between the two components.)
* Download [BalenaEtcher](https://www.balena.io/etcher/) and Install
* Download latest pwnagotchi release [image](https://github.com/evilsocket/pwnagotchi/releases) and unzip
* Insert SD Card
* Open up BalenaEtcher and flash the .img file to your SD Card
* While your sd card is still in your pc add a config.yml to the boot partition of the SD card.

Example minimal config yml might look like this:
```
main: 
  lang: en
  name: phattypatty
  plugins: 
    auto-update: 
      enabled: true
      install: true
      interval: 1
    grid: 
      enabled: true
      exclude: 
        - HomeWifi
      report: true
personality: 
  advertise: true
  deauth: false
ui: 
  display: 
    color: fastAndFurious
    enabled: true
    type: inky
    video: 
      address: "0.0.0.0"
      enabled: true
      origin: ~
      port: 8080
  fps: 0.0
```

(modified from default yml at : [here](https://github.com/evilsocket/pwnagotchi/blob/master/pwnagotchi/defaults.yml)) 

Note: You should use a site such as [ymllint](http://www.yamllint.com/) to validate the file formating is correct.

* After you've added your YAML file you can safely eject SD card, insert into the Pi and plug in the power and give it a test.

####Pre Case Pwnagotchi
![Pre Case Pwnagotchi](https://thepracticaldev.s3.amazonaws.com/i/0kft9a3oaomjbv390axd.png)


###Adding a Case:
3D printed, pattern available from Thingiverse
I picked the [case](https://www.thingiverse.com/thing:3930669) with the carabiner loop. 

####Finished print job
![3D Printed Case](https://thepracticaldev.s3.amazonaws.com/i/fanykzi0desp3w2xwq3s.png)


###General usage:

The USB port of the far left is used for connecting to external power
The other usb port is for tethering to your PC for connection sharing or headless mode with the Web UI if you don't have an eink. To tether the gadget to your pc you need to run a connection sharing script (details to be updated here) 

###Finished Product:
Add a bit of flair! 
![Add a bit of flair](https://thepracticaldev.s3.amazonaws.com/i/tj0sosbmv977w002icgb.png)

### Feedback

If I've missed anything please let me know.