wireless pentesting full process with example
Wireless penetration testing using Kali Linux is a systematic process that moves from passive observation to active exploitation. Kali is the industry-standard OS for this because it comes pre-loaded with the Aircrack-ng suite, Reaver, and Hashcat.
1. Preparation: Enabling Monitor Mode
By default, wireless cards are in "Managed" mode (connecting to one AP). To pentest, you must switch to Monitor Mode to see all traffic in the air.
Check Hardware:
airmon-ngEnable Monitor Mode:
airmon-ng start wlan0This creates a virtual interface, usually named
wlan0mon.
2. Reconnaissance (Sniffing the Air)
You need to identify the target BSSID (MAC address) and the Channel (CH) it’s operating on.
Command:
airodump-ng wlan0monObservation: Look for the target network's ESSID and take note of the BSSID and Channel. Also, ensure there is at least one active client (Station) connected; otherwise, you can't capture a handshake.
3. Targeted Capture
Now, focus your "sniffer" on the specific target channel and BSSID to capture the cryptographic handshake.
Command:
airodump-ng -c [channel] --bssid [target_MAC] -w [filename] wlan0monPurpose: This tells Kali to ignore all other traffic and save data from the target network into a file.
4. Forced De-authentication (The Kick)
To capture a handshake, a user must log in. If they are already logged in, you can "kick" them off so their device automatically reconnects.
Command:
aireplay-ng -0 5 -a [BSSID] -c [Client_MAC] wlan0monThe Result: The
-0flag sends 5 de-auth packets. When the client reconnects,airodump-ng(still running in the other terminal) will flash a message in the top right: "WPA Handshake: [BSSID]".
5. Cracking the Password (The Example)
Once you have the .cap file containing the handshake, the attack moves offline. You are no longer interacting with the network; you are guessing the password against the captured hash.
Using Aircrack-ng (CPU Cracking)
aircrack-ng -w /usr/share/wordlists/rockyou.txt capture-01.cap
Using Hashcat (GPU Cracking - Much Faster)
Convert the
.capfile to a.hc22000format (using online converters orhcxpcapngtool).Command:
hashcat -m 22000 capture.hc22000 /usr/share/wordlists/rockyou.txt
6. Post-Exploitation & Reporting
After gaining the PSK (Pre-Shared Key), you connect to the network to test for:
Internal Vulnerabilities: Are the routers' admin panels using default credentials?
Isolation: Can "Guest" users see "Corporate" devices? (VLAN hopping).
Example Scenario: "The Coffee Shop Test"
Scope: You have permission to test "Cafe_Wifi".
Discovery: You find "Cafe_Wifi" on Channel 6, BSSID
AA:BB:CC:11:22:33.Client: You see a laptop (
DD:EE:FF:44:55:66) browsing.Attack: You run a de-auth. The laptop reconnects instantly. Kali says "WPA Handshake captured."
Success: You run the
rockyou.txtwordlist. Within 2 minutes, it finds the key:espresso123.Fix: You advise the owner to change the password to something complex and disable WPS.
Warning: Wireless pentesting without written authorization is illegal. Always use a dedicated lab or your own hardware for practice.
Comments
Post a Comment