802.11 decryption: Long running captures
Problem
Decrypting 802.11 packets using Wireshark is a beaten to death topic, I myself had written [1] more than a decade ago, so, nothing new there. It relies on having the security handshake (4-way handshake) configured (mainly for Nonces's: ANonce and SNonce) and PSK/Passphrase setup in the Decryption Keys widget.
But let's say you are running a SnS (Stress and Stability) test which is typically an overnight test, and to decrypt the packets for debugging you need to start right from the initial association which would be a very large capture. And if you only have a partial capture of the issue then standard decryption won't work. This article is about addressing this problem.
Solution
Apart from PSK/Passphrase, Wireshark also support importing TK (Temporal Key: Not to be confused with transient key), this removes the dependency of having a security handshake in the capture.
Now how do we get the TK for the initial capture, Wireshark stores the full SA (Security Association) internally along with the TK, but it doesn't have any way to export the TK information, I have raised a feature request for this [2]. If I get time I myself might work on that.
Till the feature is implemented, we can use aircrack-ng to get the TK from the initial handshake pcap.
Procedure
TK Extraction
领英推荐
Transient Key : 9F E2 1C A5 6D 2B 3F 89 1A E3 F1 5D C4 27 8E 5A
D8 43 7C 92 1B 0F 6E C8 99 46 5A 3B 92 71 DF 3F
3E 91 B5 6F 48 2C 95 A1 B3 1E C2 4F 0D 8A 1F 4D
75 B6 AB 3C 09 F2 4D 21 54 8E 9F 73 D5 3C 60 77
I was trying to find alternatives to this something like PSK calculator in [4], but couldn't find anything, please comment below if you find any such tools.
TK usage
Limitations
#802.11 #wpa #wpa2 #ptk #gtk #handshake #stressattack #stabilitytesting #aircrackng #networksecurity #wireshark
References
System & Network Engineer | InfoSec Trainer | DevOps | Open Source
10 个月I haven't tested but I'm assuming extracting the handshake (and a few other necessary frames), then concatenating it with the PCAP being analyzed (handshake first, then PCAP being analyzed) should work as well
Wi-Fi Consulting->engineer = self.employed
10 个月Forgot to add the performance limitation, #2 is now added.