![](/uploads/1/2/5/7/125758771/276899684.jpg)
by hash3liZer . 10 August 2018
WPA – WiFi Protected Access (WPA) is improved and more secured security protocol which arrived with lots of improvements in encryption and authentication methods of WEP. WPA2 PSK – It is short of Wi-Fi Protected Access 2 – Pre-Shared Key which is the latest and most powerful encryption method used in WiFi networks right now. Aug 07, 2018 A new strategy has been found that easily obtains the Pairwise Master Key Identifier (PMKID) from a WPA/WPA2-secured router, which can be used to quickly crack the router's wireless password.
Lately, a new pattern is discovered in WPA/WPA2 protocols to crack the WPA key passphrase which uses an alternative key to that of 4-way handshake. This new attack uses an identifier key named PMKID in place of MIC which is supplied in the first packet of 4-way handshake. So, this new technique made the WPA cracking more effective and easier than ever before.
The 4-way handshake is in itself dependent on it's 4 frames to compute the hashed key. So, in order to crack the WPA/WPA2 key, we require a complete WPA handshake to crack the password. But with this vulnerability discovered by Jen Steube we are no longer dependent on deauthentication frames, clients etc. Now, we are better able to crack the key by initiating an authentication process with the access point. Let's see.
Here's how the Pairwise Master Key ID (PMKID) is computed. Basically, it's the concatenation of PMK key, PMK secret key, MAC of AP and MAC of STA.
While in this case, the computing process is rather simple. The former method of cracking requires a valid handshake, comprised of at least the first two EAPOL messages to compute the MIC code which then has to be matched at second or fourth frame (relatively different concepts). Here's the python version of the previous method:
Prerequisities
Let's make it up. You would need a Kali Machine and wireless Card that supports packet injection and monitor mode. Tested with Alpha from TP-Link, worked fine. A vulnerable WPA2 router. Here's a picture of EAPOL from a vulnerable router:
STEP 1
Setup environment.
Put your wireless card in monitor mode:
Next thing is, we need some tools from github. The list is:
- hashcat >= 4.2.0
- hcxtools
- hcxdumptool
Installation:
Update the environment first and install the dependencies:
If you are on Kali, hastcat would already be in repository packages. You would need to first uninstall it and then install the latest version from github:
Then make sure, you have the version >= 4.2.0 by using the command:
Now, clone hcxtools from github and compile the binaries:
Then at last, clone hcxdumptool and compile the binaries:
STEP 2
Get the PMKID
This step is about collecting the PMKID. Compile a list of your targets. Scan your area with airodump:
Now, create a list of your targets by writing the MAC address of target to a file:
![Wpa Wpa](/uploads/1/2/5/7/125758771/392968801.jpg)
Then start hcxdumptool:
This will try to make the AP transmit the first EAPOL frame which then will be used to acquire the PMKID from the RSN element layer. Just keep it running until you get the message that PMKID is captured. Here's what it would look like:
STEP 3
Get the PMKID hash
As of now, we have the captured file. Now, we need to extract the PMKID hash from the capturefile.cap. Use hcxpcaptool for this:
Output:
Now, check the added hashes:
STEP 4
Crack the Code
We have the PMKID hash. All we need now is to crack it down using hashcat. Now, run the hashcat with the following syntax:
This would start cracking the password. A successful attack would go like this:
Conclusion
WPA key passphrase can be cracked using PMKID which is located in the first packet of 4-way handshake. The first packet of 4-way handshake is basically sent by the WiFi or Access Point which contains some random keys to encrypt data and also contains the required PMKID key. A user just have to initiate a connection with the Access Point which in turn will sent the first EAPOL message to the client and the client just have to sniff that and start the cracking process.
![](/uploads/1/2/5/7/125758771/276899684.jpg)