Kali Linux is an operating system that can be used for different tasks, but it is much better known for hacking networks. So, I show you how to get a security key from a WPA WPA2 network.
We start by checking our network cards with the airmon-ng command. But, above all, access your Kali command line.
Take notes: Ubuntu have aircrack-ng in his repository.
We observe a network card capable of supporting the monitor mode so to enable this mode we will use the command airmon-ng start followed by the interface of the network card and here the interface is wlan0 so we will use airmon-ng start wlan0 .
The monitor mode has been active and the name of our monitor interface has changed to mon0.
To find the wifi has hacker but also the necessary information we will use the command airodump-ng followed by the name of the monitor interface which is my0 so the entire command will be airodump-ng mon0.
We observe in red the network that uses WPA which is chain 10. The chain is very important it is always the rating. Then another information note is the BSSID. For the BSSID you can proceed as follows:
The next step will be to type the following command airodump-ng -c [channel] --bssid [bssid] -w / root / Desktop / [monitor interface] where you will change channel by the string noted also bssid by the one that has been copy and same for monitor interface which will give in my case airodump-ng -c 10 --bssid A0: D4: BF: E0: E8: D5 -w / root / Desktop / mon0.
This command allows us to capture more specific information. Here what we do is wait for a user to connect or reconnect to the network to force the router to send the handshake we need to hack the wifi.
After you open another terminal in which you will enter this command the aireplay-ng -0 2 -a [router bssid] -c [client bssid] my0 in my case its going to give areaplay-ng -0 2 -a A0:14:BF:E0:E8:D4 -c 4C: EB:A2:59:D0:31 mon0.
After having checked on the first terminal normally a message like this must appear:
To finish you just have to enter the last command and wait for the result. This command is: aircrack-ng -a2 -b B0:14:BF:E0:E8:A5 -w /root/wpa.txt /root/Desktop/*.cap
Note :It's a good way to test cpu or cuda core, Have a fun ;=)