New attack on WPA/WPA2 using PMKID - Printable Version +- hashcat Forum (https://hashcat.net/forum) +-- Forum: Misc (https://hashcat.net/forum/forum-15.html) +--- Forum: User Contributions (https://hashcat.net/forum/forum-25.html) +--- Thread: New attack on WPA/WPA2 using PMKID (/thread-7717.html) |
New attack on WPA/WPA2 using PMKID - atom - 08-04-2018 In this writeup, I'll describe a new technique to crack WPA PSK (Pre-Shared Key) passwords. In order to make use of this new attack you need the following tools: This attack was discovered accidentally while looking for new ways to attack the new WPA3 security standard. WPA3 will be much harder to attack because of its modern key establishment protocol called "Simultaneous Authentication of Equals" (SAE). The main difference from existing attacks is that in this attack, capture of a full EAPOL 4-way handshake is not required. The new attack is performed on the RSN IE (Robust Security Network Information Element) of a single EAPOL frame. At this time, we do not know for which vendors or for how many routers this technique will work, but we think it will work against all 802.11i/p/q/r networks with roaming functions enabled (most modern routers). The main advantages of this attack are as follow:
Attack details: The RSN IE is an optional field that can be found in 802.11 management frames. One of the RSN capabilities is the PMKID. The PMKID is computed by using HMAC-SHA1 where the key is the PMK and the data part is the concatenation of a fixed string label "PMK Name", the access point's MAC address and the station's MAC address. Code: PMKID = HMAC-SHA1-128(PMK, "PMK Name" | MAC_AP | MAC_STA) Since the PMK is the same as in a regular EAPOL 4-way handshake this is an ideal attacking vector. We receive all the data we need in the first EAPOL frame from the AP. How to reproduce: 1. Run hcxdumptool to request the PMKID from the AP and to dump the recieved frame to a file (in pcapng format). Code: $ ./hcxdumptool -o test.pcapng -i wlp39s0f3u4u5 --enable_status Output: Quote:start capturing (stop with ctrl+c) If an AP recieves our association request packet and supports sending PMKID we will see a message "FOUND PMKID" after a moment: Quote:[13:29:57 - 011] 89acf0e761f4 -> 4604ba734d4e <ESSID> [ASSOCIATIONREQUEST, SEQUENCE 4] Note: Based on the noise on the wifi channel it can take some time to recieve the PMKID. We recommend running hcxdumptool up to 10 minutes before aborting. 2. Run hcxpcaptool to convert the captured data from pcapng format to a hash format accepted by hashcat. Code: $ ./hcxpcaptool -z test.16800 test.pcapng Output: Quote:start reading from test.pcapng The content of the written file will look like this: Quote:2582a8281bf9d4308d6f5731d0e61c61*4604ba734d4e*89acf0e761f4*ed487162465a774bfba60eb603a39f3a The columns are the following (all hex encoded):
Note: While not required it is recommended to use options -E -I and -U with hcxpcaptool. We can use these files to feed hashcat. They typically produce good results.
Code: $ ./hcxpcaptool -E essidlist -I identitylist -U usernamelist -z test.16800 test.pcapng 3. Run hashcat to crack it. Basically we can attack this hash as any other hash type. The hash-mode that we need to use is 16800. Code: $ ./hashcat -m 16800 test.16800 -a 3 -w 3 '?l?l?l?l?l?lt!' Output: Quote:hashcat (v4.2.0) starting... There's also support for hash-mode 16801, which allows skipping the computation of the PMK - which is the computation that makes cracking WPA so slow. Pre-computing PMK can be useful in cases where you are on site and you cannot transfer a hash to a remote cracking rig because of an NDA. The goal is to run hashcat on your notebook which you can bring to the site. The mode 16801 expects a list of pre-computed PMKs, as hex encoded strings of length 64, as the input wordlist. To pre-compute the PMKs you can use the hcxkeys tool. The hcxkeys tools require the ESSID, so you need to ask for the ESSID from your client in advance. RE: New attack on WPA/WPA using PMKID - hash93 - 08-04-2018 Exciting! Where are these routers located, businesses or homes? RE: New attack on WPA/WPA using PMKID - BeanBagKing - 08-05-2018 This looks amazing. When trying to target a specific AP (making sure I only hit mine, not my neighbors), I'm trying to use --filtermode=2 and --filterlist=filter.txt. filter.txt consists of a single line containing my AP's address in the form "05D2BA2B8CD". This consistently returns segmentation fault. Remove just the --filterlist and everything appears to work fine, though I'm not sure how filtermode=2 works with no list, but it runs. The exact line is: root@notka1i:~/Desktop/PMKID# hcxdumptool -o test.pcapng -i wlan0 --enable_status --filtermode=2 --filterlist=filter.txt I've tried several variants (e.g. --filterlist ./filter.txt, full path, etc.) with the same results. Am I using these flags correctly? That is, both in the intended manner (to target a specific AP) and not doing something stupid with the syntax to create a segfault? Trying it out now against Ubiquity gear and it doesn't seem to work. I'm not sure yet if this is my fault, or if Ubiquity isn't vulnerable, or if my AP settings just don't allow this (not roaming). Working on setting up a wireless lab next to try out a few older all-in-one router/AP's. Edit: No issues capturing PMKID from an old Netgear WNR1000v3 I had laying around. Still not getting anything from the Ubiquity. Thanks again for the work you guys do! RE: New attack on WPA/WPA using PMKID - ZerBea - 08-05-2018 Thanks for reporting this issue. I fixed it with the last commit. We tried to use filterlist entries on the first outgoing broadcast packet. Since there are no incomming packets at this moment, we run into a seg fault. RE: New attack on WPA/WPA2 using PMKID - soxrok2212 - 08-05-2018 Great work and thank you to all those involved! RE: New attack on WPA/WPA2 using PMKID - kcdtv - 08-05-2018 I just registered to congrats you for this excellent discovery and to thank you for sharing it with the entire community in this "open source & full disclosure" spirit. I was pretty depressed to end my vacacions, but now i am pretty exited to come back to dig into that. RE: New attack on WPA/WPA2 using PMKID - ZerBea - 08-06-2018 If you want to use hcxdumptool to caputure wlan traffic, please note that your WiFi adapter must support this. Not all drivers support this. This is a list of chipsets, known as working "out of the box" on latest Linux kernels (>= 4.14) Supported and recommended cipsets: USB ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter USB ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter USB ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter USB ID 0bda:8187 Realtek Semiconductor Corp. RTL8187 Wireless Adapter USB ID 0bda:8189 Realtek Semiconductor Corp. RTL8187B Wireless 802.11g 54Mbps Network Adapter To help other users to find a working adapter, please report your favourite adapters here: TENDA W311U+ my favourite adapter LOGILINK WL0151 my second favourite adapter ALLNET ALL-WA0150N nice for portable operations Alfa AWUS036H working, but too much power consumption Alfa AWUS036NH working, but too much power consumption Please keep in mind: Some VENDORs change the chipset, but keep the same product name. Make sure, that a supported chipset is inside! RE: New attack on WPA/WPA2 using PMKID - awdmesh - 08-06-2018 Signed up just to say thanks as this will be a great tool/method for my lab exercises. Just some feedback - I messed around all day with a T2U Tp-link adapter until I realized it wasn't working correctly. Once I booted up my laptop with The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali) and used the internal NIC I was able to see the probes/responses etc. I was able to get the PMKID from a Linksys E2500 v3 running TomatoUSB. Ran hashcat against it and got the 12345678 password. I still have a Netgear wnr834B running dd-wrt to test (can also test factory firmware) and a newer Linksys EA8300 to test. Just curious - can you somehow run a word list against the PMKID? RE: New attack on WPA/WPA2 using PMKID - undeath - 08-06-2018 (08-06-2018, 01:43 PM)awdmesh Wrote: Just curious - can you somehow run a word list against the PMKID? hashcat usage for this hash mode is the same as for every other mode. RE: New attack on WPA/WPA2 using PMKID - lint - 08-06-2018 From what it seems, this is going to be huge! The question I think a lot people will ask: Is this attack viable (future) on non-PSK networks? I tried at my own (radius/wpa-enterprise) network, just to check, and as expected it failed miserably. |