Pwnagetty - Automating handshake download, validation and conversion process


I got real tired of SSH’ing to download handshakes, filter them, convert them, etc…

Pwnagetty is a cli application written in NodeJS, to streamline the process of downloading handshakes from your Pwnagotchi, verify each PCAP file and convert them to the appropriate format (EAPOL or PMKID) ready for Hashcat cracking. All while keeping a log of converted files and BSSID’s to eliminate duplicates in the future. Pwnagetty is currently in BETA.

Pwnagetty beta has been released, all seems working on my end using MacOS but I’d like some of you to test it if you can and provide feedback.

If you like, give it a star :star: .

I’ll be happy to answer any questions you have.

Github here.
Follow me on Twitter.



So far it works. It does download everything to my machine and etc. The only thing I noticed and this may be because my pwnagotchi, not sure, but of my 3 folders created by Pwnagetty, pmkid, hccapx, and pcap, everything only gets thrown into my pcap folder. I’m not 100% sure if this converting the files or not sicne it grabs all of the files under the “/home/pi/handshakes” directory. I’m running this on Kubuntu18.04

Hi @th4ntis, it’s possible those PCAP files don’t have complete handshakes or PMKID’s. Check the log of Pwnagetty when you run it. It does try to convert them, and ones without the required data will say, “No PMKID or Handshake Found”.

You can double check this by manually converting them with HCXPCAPTOOL to check.

Where would the log files for that be found?
When I run pwnagetty this is what I get:

Connecting to Pwnagotchi...                                                                  
Downloaded 448 captures...                                                                   
Reading Database...  

then it exits the script.

That’s weird, there should be more happening after that. It should only exit the script after the conversion. Can you confirm your HCXPCAPTOOL and AIRCRACK-NG are working correctly?

Yes, I have hcxpcaptool and aircrack-ng installed and working on both my host machine and the pwnagotchi.
Aircrack Version - 1.5.2 on Pwnagotchi / 1.2 on host machine
HCXPCAPTOOL - 6.0 on both machines
node - 10.15.2 on Pwnagotchi / 13.7.0 on host machine

Hmm I’m not too sure then, because all the script does it run those commands.

Can you try run these manually on some pcaps and let me know if it works.

hcxpcaptool -z file.pmkid file.pcap
hcxpcaptool -o file.hccapx file.pcap

I assume these are supposed to be run from the pwnagotchi itself or the host machine? Either way I have the tools on both the pwnagotchi and the host machine.

Both have worked. -z file.pmkid says:

summary output file(s):
5 PMKID(s) written to file.pmkid

-o file.hccapx says:

summary output file(s):
1 handshake(s) written to file.hccapx
message pair M32E2...............: 1

Yep everything needs to be run on the Host machine, including Pwnagetty.

Ok so that seems fine. What outputs when you try.

aircrack-ng file.pcap

Opening file_b42a0eb52e46.pcap
Read 166 packets.

   #  BSSID              ESSID                     Encryption

   1  B4:2A:0E:B5:2E:46  FILE                     WPA (1 handshake)

Choosing first network as target.

Opening FILE_b42a0eb52e46.pcap
Please specify a dictionary (option -w).

Quitting aircrack-ng...

When running this from the Pi though, it does say “WPA (0 handshake, with PMKID)” instead

At this point I’m lost because it seems to be getting stuck just before it starts converting, but those commands appear to be running fine on your host.

The last thing I can think of is maybe you have a corrupted PCAP file somewhere on the Pwnagotchi.

To further test I would make sure I backup all the PCAP’s from the Pwnagotchi to your host, then delete all the PCAPs off your pwnagotchi, and add 1 Pcap back into the Pwngotchi handshakes directory.

Try running Pwnagetty then and see if it downloads that one PCAP and process it. If it doesn’t, that might be the corrupt file, try another PCAP.

If it still doesn’t work then, then I’m lost.

No worries. I’ll try poking around more when my head isn’t trying to murder me with a migraine. I appreciate the help. :slight_smile: I’ll let you know if I run into anything.

1 Like

test the commands on the host machine.

and first update your old aircrack 1.2 from 15 Apr 2018, we are in 2020!

The command downloads the files from the machine and I assume the command are supposed to be run from the host machine.

Yeah, I’ve been meaning to update it, just haven’t gotten around to it yet, xD