Decrypting WPA Traffic with Airdecap-ng and Wireshark
Once the WPA/WPA2 passphrase is recovered, captured traffic can be decrypted offline. The capture must contain the 4-way handshake for the session you want to decrypt — the handshake establishes the per-session PTK that encrypts data frames. Any traffic captured before the handshake cannot be decrypted even with the PSK. This is why capturing the handshake alongside the data traffic from the beginning of a session is important.
Decrypt with airdecap-ng
airdecap-ng strips the 802.11 headers and decrypts WPA/WPA2 data frames using the recovered passphrase:
Total number of packets read 9841 Total number of packets written 6203 Total number of WEP data packets 0 Total number of WPA data packets 6203 Number of plaintext data packets 0 Number of decrypted WEP packets 0 Number of decrypted WPA packets 5891
-p specifies the passphrase. -e specifies the SSID — required because the PMK is derived from both the passphrase and the SSID. The output file is handshake-01-dec.cap containing decrypted Layer 3 and above frames as standard Ethernet encapsulation readable by any tool.
If decrypted WPA packets shows 0 despite a correct passphrase, the capture may not contain the handshake for the session being decrypted. The handshake must precede the data frames in the same capture file.
Filter to a Specific Client
To decrypt only the traffic for a specific client MAC:
-b filters decryption to frames associated with the specified BSSID. Useful when the capture contains traffic from multiple APs.
Decrypt Inline in Wireshark
Wireshark can decrypt WPA traffic on the fly without producing a separate decrypted file. Go to Edit > Preferences > Protocols > IEEE 802.11 > Decryption keys and add a new entry. Select type wpa-pwd and enter the passphrase and SSID separated by a colon:
In Wireshark the decryption key format is:
After adding the key, reload the capture with Ctrl+Shift+R. Wireshark decrypts data frames inline and the full protocol stack becomes visible in the packet details. Filter on http, dns, or ftp to quickly identify plaintext traffic of interest.
Extract Credentials from the Decrypted Capture
Once decrypted, use tshark to extract credentials and interesting data from the decrypted file:
Combine Capture Files
If the handshake was captured in one file and subsequent data traffic in another, merge them before decrypting:
References
-
Aircrack-ng — airdecap-ng documentationwww.aircrack-ng.org/doku.php?id=airdecap-ng (opens in new tab)
WPA decryption flags, SSID requirement, and output file reference
-
Wireshark Wiki — How to decrypt 802.11wiki.wireshark.org/HowToDecrypt802.11 (opens in new tab)
WPA decryption key format and preferences configuration
Was this helpful?
Your feedback helps improve this page.