The Pwnagotchi is a great tool for wireless assessments, it’s small, effective and customisable. One of the annoyances I found was that it’s a bit time consuming having to transfer hashes off quickly during an assessemnt. To overcome this, I created the plugin below. With this plugin running there’s no need to pull the Pwnagotchi out at all, just walk around the site and new captured hashes will be posted to Discord along with a hash analysis!
The added discord bot speeds things up even more and will let you pull x amount of hashes (beginning at the most recent) as a .txt file straight from Discord. To fully automate the process, it would be easy to write a python script that imports hashbot, pulls all new hashes periodically and pipes them straight into hashcat.
DiscoHash is a Pwnagotchi plugin that converts pcaps captured by Pwnagotchi to a hashcat compatible hash (EAPOL/PMKID: mode 22000) and posts them to Discord along with any GPS location data (from USB dongle or net-pos plugin) using a web hook.
To avoid reinventing the wheel DiscoHash reuses a couple of functions from the hashie and discord plugins.
Within the bot folder there is a Discord Bot that will scrape all captured hashes from the discord server and return them in a text file. This is not required for the plugin, but it makes it easier to pull large amounts of hashes quickly. You can modify the discord bot to only pull hashes from within a certain date range etc.
ps. can you crack my AP? (⌐■_■)
After you have Pwnagotchi up and running, download, compile and install hxctools.
apt-get install libcurl4-openssl-dev libssl-dev zlib1g-dev
git clone https://github.com/ZerBea/hcxtools.git
Create a new Discord server and set up a new web hook.
Copy discohash.py from this repo to /usr/local/share/pwnagotchi/installed-plugins/ (if the directory doesn’t exist create it)
sudo wget https://raw.githubusercontent.com/flamebarke/DiscoHash/main/discohash.py
Set the following options within /etc/pwnagotchi/config.toml
main.plugins.discohash.enabled = true
main.plugins.discohash.webhook_url = "YOUR WEB HOOK URL"
Simply reboot Pwnagotchi make sure it has internet access (bluetooth pairing) and watch those hashes roll in!
>: Notes (◕‿‿◕):
If you have a custom handshake directory then you will need to modify line 32 of discohash.py to your custom handshake directory.
DiscoHash checks for new pcap files at the end of each epoch so they will come fairly frequently. To reduce this interval modify the code to use a different callback.
To check out how to make plugins for Pwnagotchi check the docs here.
You can contact me by sending my Pwnagotchi some PwnMail at: