Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new WPA/WPA2 attack - PMKID #1937

Closed
kimocoder opened this issue Aug 4, 2018 · 11 comments
Closed

Implement new WPA/WPA2 attack - PMKID #1937

kimocoder opened this issue Aug 4, 2018 · 11 comments

Comments

@kimocoder
Copy link
Contributor

More information may be found at https://hashcat.net/forum/thread-7717.html
Which include a write-up on the matter.

@kimocoder kimocoder changed the title New WPA2 cracking method [feature request] New WPA2 PSK cracking method [feature request] Aug 4, 2018
@binarymaster
Copy link

binarymaster commented Aug 4, 2018

Please specify the exact new method name, so others wouldn't open duplicate issues.

@kimocoder kimocoder changed the title New WPA2 PSK cracking method [feature request] New WPA2 PSK cracking method using PMKID - [feature request] Aug 4, 2018
@aircrack-ng aircrack-ng changed the title New WPA2 PSK cracking method using PMKID - [feature request] Implement new WPA/WPA2 attack - PMKID Aug 4, 2018
@kcdtv
Copy link

kcdtv commented Aug 9, 2018

Maybe in a first time simply add a new option in aircrack-ng where the user would have to enter manually the two macs and the PMKID (which can be gathered very easly - and fast - with wpa_supplicant) . The only thing that i don't have clear is what is the "PMK name" in the formula:
PMKID = HMAC-SHA1-128(PMK, "PMK Name" | MAC_AP | MAC_STA)
Than you can see how to implement that cleverly in the whole suite. A key point would be to be able to get to the first EAPOL in monitor mode. Maybe with a new option in aireplay-ng or an extra tag used with option -1?

@aircrack-ng
Copy link
Owner

aircrack-ng commented Aug 9, 2018

BSSID is already an option, so there would only be a need for STA which could be also useful for regular cracking where there are handshakes from different stations.

Alternatively, it can be fed the first EAPOL packet that should contain all the information needed.

@kimocoder
Copy link
Contributor Author

PMKID attack has been included in wifite2.
The release tag is here

@jbenden
Copy link
Collaborator

jbenden commented Sep 20, 2018

Could someone post a capture file to be used in unit-testing this new feature? I also request that the correct results of each component of the formula (for the unit-test file) be included, too.

Thanks,
-Joe

@ZerBea
Copy link

ZerBea commented Sep 20, 2018

testfile.zip
Attached test file. This file is from the old darkircop web site.

$ hcxpcaptool -z test.16800 test.pcap
start reading from test.pcap
summary:
file name....................: test.pcap
file type....................: pcap 2.4
file hardware information....: unknown
file os information..........: unknown
file application information.: unknown
network type.................: DLT_IEEE802_11 (105)
endianess....................: little endian
read errors..................: flawless
packets inside...............: 2
skipped packets..............: 0
packets with FCS.............: 0
warning......................: zero value timestamps detected
beacons (with ESSID inside)..: 1
EAPOL packets................: 1
EAPOL PMKIDs.................: 1

1 PMKID(s) written to test.16800

warning......................: zero value timestamps detected
Means that it was cleaned by wpaclean.
Please think about an improvement of wpaclean. Many users still use wpaclean, so it would be nice, if you add original timestamps.

BTW:
PMKID support is a great improvement for aircrack-ng suite!
If you have some more questions, feel free to contact me.

@ZerBea
Copy link

ZerBea commented Sep 20, 2018

This is the second part. It's a simple code example to calculate the PMKID using libcrypto:
pmkidtest.c.zip
gcc pmkidtest.c -o pmkidtest -lcrypto
Result is the calculated PMKID for the PMK of the test.pcap.
The HMAC function is the same that you use to calculate the MIC for a WPA2 EAPOL.
So calculating a PSK from a PMKID is a little bit faster than calculating the PSK from EAPOL,
because we do not need PKE and PTK.

@ZerBea
Copy link

ZerBea commented Sep 21, 2018

If you decide to implement an active attack vector (aireplay-ng, besside-ng), do not trust in the RSN-IE of the beacon. Instead do a proberequest and clone the RSN-IE from the probersponse for you your association. Write proberesponse, authentication (request/response), associationrequest, associationresponse and M1 to the cap file (besside-ng). That will make life easier for online hash crackers.
Also RSN-IE doesn't have a fixed len and some ap's deliver a zeroed PMKID on the first connect attempt.

@Merfi745
Copy link

Hello. dump axis BSSID: 28-10-7B-94-BB-29
pmkid pcapng: http://rgho.st/6ZrWQqLzM
pass: 15211521

@ZerBea
Copy link

ZerBea commented Sep 22, 2018

@Merfi745.
Good example. Can also be used for this feature request:
#1912

@jbenden
Copy link
Collaborator

jbenden commented Sep 22, 2018

Currently running all local tests.

Big thanks for the help with this one!

-Joe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants