How to Crack a Wifi
Last updated
Last updated
This tutorial demonstrates how to crack a Wi-Fi network using a wireless adapter in monitor mode and the aircrack-ng
suite. Created by @bst04.
Understanding the protocols used in Wi-Fi networks is essential:
WEP (Wired Equivalent Privacy): An obsolete protocol with significant security flaws.
WPA (Wi-Fi Protected Access): Improved security over WEP but still vulnerable to weak passwords.
WPA2: More secure than WPA, using AES/PSK encryption. Still susceptible to brute-force attacks if weak passwords are used.
WPA3: The latest standard with enhanced protection against brute-force attacks. However, not all networks have adopted it yet.
TKIP (Temporal Key Integrity Protocol): Legacy encryption with dynamic keys per packet; vulnerable to brute-force attacks.
AES (Advanced Encryption Standard): A secure symmetric encryption method widely used in modern Wi-Fi networks.
PSK (Pre-Shared Key): Commonly used for home networks, where a shared key is used for authentication. Vulnerable to brute-force attacks if the password is weak.
Before proceeding, ensure you have the following:
Aircrack-ng Suite: Installed on your system.
Wireless Adapter Compatible with Monitor Mode: Ensure your adapter supports packet injection and monitor mode.
If you're not using Kali Linux, you'll need to install the aircrack-ng
suite. Run the following command in your terminal:
Note: If you're using Kali Linux, aircrack-ng
is pre-installed.
To capture packets from the target network, your wireless adapter must be in monitor mode. First, identify your wireless interface by running:
Once you know the interface name (e.g., wlan0
), enable monitor mode:
Example:
If your interface is wlan0
, run:
This will create a new interface, typically named wlan0mon
.
Use airodump-ng
to scan for nearby Wi-Fi networks:
Example:
If your monitor mode interface is wlan0mon
, run:
This will display a list of available networks, including their BSSID (MAC address), channel, and encryption type. Note down the details of the target network.
Focus on the target network by capturing its handshake. Use the following command:
Example:
If the target network is on channel 6 with BSSID 00:11:22:33:44:55
, run:
Leave this process running until the handshake is captured. You can verify the capture by checking the output file (capture-01.cap
).
To speed up the handshake capture, deauthenticate connected clients using aireplay-ng
:
Example:
If the station (connected device) is 66:77:88:99:AA:BB
, run:
Once you have the handshake file, use aircrack-ng
to attempt cracking the password. Provide a wordlist for brute-forcing:
Example:
If your wordlist is rockyou.txt
and the handshake file is capture-01.cap
, run:
The tool will try each password in the wordlist until it finds a match or exhausts the list.
Use a Strong Wordlist: Tools like hashcat
or online resources provide comprehensive wordlists.
Optimize Your Wireless Adapter: Ensure your adapter is compatible with packet injection and has good signal reception.
Be Patient: Cracking strong passwords may take time, depending on the complexity and length of the passphrase.
By following these steps, you can learn how to crack a Wi-Fi network using aircrack-ng
. Remember to use this knowledge responsibly and within legal boundaries. Happy learning!