Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to live-decrypt WPA/WPA2-PSK using tcpdump?

Here my Problem:

If I am connected to a network (so I know the WPA/WPA2-PSK), I´d like to be able to decrypt the traffic I capture from other devices in the network. (If WEP is used, tcpdump does this automatically).

As far as I know, WPA uses something like a session key for each client in the WiFi - but I know this is possible - so I´m wondering HOW to do this. (If this is not possibile with tcpdump, how to do this "by hand"?)

Thanks for any help!

like image 909
koch.trier Avatar asked Jun 01 '11 21:06

koch.trier


People also ask

Can Wireshark decrypt WPA2?

Wireshark can decrypt WEP and WPA/WPA2 in pre-shared (or personal) mode. WPA/WPA2 enterprise mode decryption works also since Wireshark 2.0, with some limitations. You can add decryption keys using Wireshark's 802.11 preferences or by using the wireless toolbar. Up to 64 keys are supported.

Is WPA2-PSK encrypted?

WPA2-PSK requires a router with a passphrase, with a length between 8 to 63 characters, to encrypt the data in the network. It uses a technology named TKIP, i.e., Temporal Key Integrity Protocol, that requires network SSID and the passphrase to generate unique encryption keys for each wireless client.

What is WPA2 handshake?

Our main attack is against the 4-way handshake of the WPA2 protocol. This handshake is executed when a client wants to join a protected Wi-Fi network, and is used to confirm that both the client and access point possess the correct credentials (e.g. the pre-shared password of the network).


2 Answers

I've written a small, open source, application that does exactly this.

like image 103
mfontanini Avatar answered Oct 23 '22 10:10

mfontanini


If you capture the traffic with tcpdump and can save it to file you should be able to use Wireshark to decrypt it on a PC/Mac. You need to catch the association traffic and the four-way handshake and configure Wireshark with the PSK.

like image 44
Per Knytt Avatar answered Oct 23 '22 09:10

Per Knytt