Examine the Newly Created Decrypted Capture File
In this final step, we will verify that the decrypted file has been created and learn how to inspect it. airdecap-ng does not modify the original capture file. Instead, it creates a new file with the decrypted packets, typically by appending -dec.cap to the original filename.
First, use the ls -l command again to see the new file in your directory.
ls -l
You will now see the decrypted file, wpa_handshake-dec.cap, listed alongside the original files:
total 16
-rw-r--r-- 1 labex labex 12 Mar 18 10:00 cracked_password.txt
-rw-r--r-- 1 labex labex 9 Mar 18 10:00 ssid.txt
-rw-r--r-- 1 labex labex 0 Mar 18 10:00 wpa_handshake-dec.cap
-rw-r--r-- 1 labex labex 0 Mar 18 10:00 wpa_handshake.cap
This new file, wpa_handshake-dec.cap, contains the plaintext version of the captured data. You can now analyze it with network analysis tools like Wireshark or tcpdump. To demonstrate, let's use tcpdump with the -r flag to read from our new file.
tcpdump -r wpa_handshake-dec.cap
Because our source file was empty, tcpdump will not show any packets. However, it will confirm that it can read the file, which is the goal of this step.
reading from file wpa_handshake-dec.cap, link-type EN10MB (Ethernet)
In a real-world situation with a populated capture file, this command would display the decrypted packet contents, such as HTTP requests, DNS queries, and other plaintext traffic.