Capturing WPA Handshakes with Airodump-ng
With monitor mode enabled on your wireless interface, the next step is to capture a WPA handshake using the airodump-ng
tool within the Kali Linux container. A WPA handshake is a set of packets exchanged when a device connects to a Wi-Fi network, and capturing it allows us to attempt cracking the password in later steps.
For beginners, understand that a WPA handshake doesn't contain the password directly but includes encrypted data that can be analyzed offline to guess the password. This process is ethical only in a controlled lab environment or with explicit permission on real networks. In this lab, we will simulate capturing a handshake in a safe setting.
Since you are already in the Kali Linux container's shell (automatically connected upon opening the terminal), let's start capturing wireless traffic. Run the following command and press Enter to begin monitoring all nearby networks on the wlan0mon
interface:
airodump-ng wlan0mon
The expected output will display a live table of nearby Wi-Fi networks, showing details like BSSID
(access point MAC address), ESSID
(network name), CH
(channel), and encryption type. It might look like this:
CH 6 ][ Elapsed: 1 min ][ 2023-10-01 12:00
BSSID PWR Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID
00:14:22:AB:CD:EF -30 10 5 0 6 54 WPA2 CCMP PSK TestNetwork
Let this run for a few seconds to observe the networks, then stop it by pressing Ctrl+C
. For this lab, assume you have identified a target network with the ESSID
TestNetwork
, BSSID
00:14:22:AB:CD:EF
, and operating on channel 6
.
Now, focus on capturing traffic for this specific network to obtain the WPA handshake. Run the following command and press Enter to target the network and save the captured data to a file named handshake
in the /root
directory:
airodump-ng --bssid 00:14:22:AB:CD:EF --channel 6 -w /root/handshake wlan0mon
In this command, --bssid
specifies the target network's MAC address, --channel
sets the channel to listen on, and -w /root/handshake
saves the data to a file. The expected output will show traffic specific to the target network. If a handshake is captured, you might see [ WPA handshake: 00:14:22:AB:CD:EF ]
at the top right of the output. For this lab, assume a handshake is captured after a few seconds. Stop the capture by pressing Ctrl+C
.
Verify that the capture file was saved by listing the contents of the /root
directory. Run the following command and press Enter:
ls -l /root
The expected output should include a file named handshake-01.cap
(or similar), like this:
-rw-r--r-- 1 root root 12345 Oct 1 12:05 handshake-01.cap
This confirms the captured data is saved. You have now successfully captured a WPA handshake, which will be used in the next step to attempt cracking the WPA key. Ensure the file exists before proceeding.