Missing Frames and hcxpcapngtool - Printable Version +- hashcat Forum (https://hashcat.net/forum) +-- Forum: Misc (https://hashcat.net/forum/forum-15.html) +--- Forum: General Talk (https://hashcat.net/forum/forum-33.html) +--- Thread: Missing Frames and hcxpcapngtool (/thread-10469.html) |
Missing Frames and hcxpcapngtool - null - 11-20-2021 I am using ESP Hash Monster on a M5Stack Core2 to capture wlan packeks. I can easily capture lots of handshakes (all four messages) and occasionaly a PMKID as well. When I attempt to convert these captures to a Hashcat accepted format using hcxpcapngtool, I always get the message that frames are missing. What exact frames do I need in order to crack a WPA2 PSK? More than the 4-way handshake and/or PMKID? What exactly is meant by the "total/useless/best" output, and how can the PMKID be both useless and best? Yes, these questions are not specifically Hashcat-related and they are newb for sure, so I appreciate a nudge in the right direction, or someone to point out what it is I am obviously missing. I've tried to find answers in the documentation but have come up empty so far. Here is the output from the tool, which includes a four-way handshake, and a PMKID (I think): summary capture file -------------------- file name................................: 0001.pcap version (pcap/cap).......................: 2.4 (very basic format without any additional information) timestamp minimum (GMT)..................: 31.12.1969 19:29:03 timestamp maximum (GMT)..................: 01.01.1970 09:53:18 used capture interfaces..................: 1 link layer header type...................: DLT_IEEE802_11 (105) endianess (capture system)...............: little endian packets inside...........................: 1357 BEACON (total)...........................: 55 WPA encrypted............................: 27 EAPOL messages (total)...................: 1274 EAPOL RSN messages.......................: 1274 ESSID (total unique).....................: 28 EAPOLTIME gap (measured maximum usec)....: 666344089 EAPOL ANONCE error corrections (NC)......: working REPLAYCOUNT gap (suggested NC)...........: 23 EAPOL M1 messages........................: 1061 EAPOL M2 messages........................: 57 EAPOL M3 messages........................: 116 EAPOL M4 messages........................: 40 EAPOL pairs (total)......................: 83 PMKID (total)............................: 1 PMKID (useless)..........................: 1 PMKID (best).............................: 1 Warning: missing frames! This dump file contains no important frames like authentication, association or reassociation. That makes it hard to recover the PSK. Warning: missing frames! This dump file contains no undirected proberequest frames. An undirected proberequest may contain information about the PSK. That makes it hard to recover the PSK. ----- I tried to attach the pcap but the forum doesn't allow them I guess. RE: Missing Frames and hcxpcapngtool - ZerBea - 11-20-2021 The basics: To recover the PSK of a WPA1, WPA2 or WPA2 key version 3 network you need either a 4way handshake (which contain M2 or not zeroed M4 and either a M1 or M3) or a PMKID and the network name ESSID. But there are much more useful frames and information that can help to recover a PSK. hcxpcapngtool is an analysis tool that will take additional information from the dumpfile and parse it to hashcat. That will make it easier to recover the PSK. Unfortunately the tools that you use to attack the target and to dump the traffic to a cap/pcap file do not take care about this! hcxpcapngtool detect this missing frames as well as the missing radio tap information and give you a warning. Please notice: It is only a warning and not an ERROR To get rid of this, I suggest to use hcxdumptool (attack and dump): Code: $ hcxpcapngtool -o test.22000 -E wordlist -I wordlist -U wordlist hcxdumptool.pcapng To make it clear to you what is missing in your dump file, please read this: https://github.com/evilsocket/pwnagotchi/issues/835 and get the example mentioned there: https://github.com/evilsocket/pwnagotchi/files/4328457/nctest.zip now try it: Code: $ hcxpcapngtool -o eapol.22000 -E wordlist test.pcap Do not wonder about the pcap file format. The example was converted from pcapng to pcap so that old school tools (e.g. based on libpcap) are able to handle it. Unfortunately neither cap nor pcap file format is able to store additional comment fields that will help to recover the PSK. RE: Missing Frames and hcxpcapngtool - null - 11-20-2021 Thank you for sending this, I really appreciate the detail. So to make sure I understand: The issue is that the Hash Monster is filtering out certain packets (namely, undirected probe requests) before writing to pcap, and the hxcpcapngtool is looking for those, and other useful frames that aren't being properly captured. Also, the additional info that the tool is looking for can only be stored in pcapng format. Since you rightly pointed out that the output of the Hash Monster is pcap (not pcapng), I ran the capture through the old hcxpcaptool as well: reading from 0001.pcap summary capture file: --------------------- file name........................: 0001.pcap file type........................: pcap 2.4 file hardware information........: unknown capture device vendor information: 000000 file os information..............: unknown file application information.....: unknown (no custom options) network type.....................: DLT_IEEE802_11 (105) endianness.......................: little endian read errors......................: flawless minimum time stamp...............: 01.01.1970 00:29:03 (GMT) maximum time stamp...............: 01.01.1970 14:53:18 (GMT) packets inside...................: 1357 skipped damaged packets..........: 0 packets with GPS NMEA data.......: 0 packets with GPS data (JSON old).: 0 packets with FCS.................: 0 beacons (total)..................: 55 beacons (WPS info inside)........: 4 beacons (MESH-ID inside).........: 2 EAPOL packets (total)............: 1274 EAPOL packets (WPA2).............: 1274 PMKIDs (zeroed and useless)......: 1 PMKIDs (not zeroed - total)......: 1 PMKIDs (WPA2)....................: 2 PMKIDs from access points........: 1 best handshakes (total)..........: 5 (ap-less: 0) best PMKIDs (total)..............: 1 summary output file(s): ----------------------- 0 handshake(s) written to test.pcap ----- I'm still fuzzy on this point: >Unfortunately neither cap nor pcap file format is able to store additional information that will help to recover the PSK. Does this mean that no handshakes or combination of frames captured in pcap format can be used to crack the PSK? Or only that these particular tools want more information to make the process "easier"? Is there a toolchain for taking pcap files, without the additional frames that hxcpcapngtool is looking for, and pass them to Hashcat for cracking? RE: Missing Frames and hcxpcapngtool - ZerBea - 11-20-2021 For sure, hcxpcaptool/hcxpcapngtool take all basic information (BEACON, 4way handshake and/or PMKID) from a cap and pcap file and convert it to a hash file accepted by hashcat. That is old school basics. This new tool chain: hcxdumptool (attack the CLIENT and store additional information in pcapng comment field) -> hcxpcapngtool (evaluate and parse this information using hc22000 file format) -> hashcat (recover the PSK) Additional information that are stored in pcapng comment fields, e.g.: - replay count used for the attack - MACs used for the attack - NONCEs used for the attack - weak candidate PSK Is there a toolchain for taking pcap files, without the additional frames that hxcpcapngtool is looking for, and pass them to Hashcat for cracking? That depend on the tool that you use (which tool do you use?) to attack the target and to dump the traffic to a cap/pcap/pcapng file. It also depend on filtering options that you use. Usually all 802.11 frames can/should be stored in cap, pcap and pcapng file format. Please try the example mentioned above and ask yourself this question: How much time will take hashcat to recover the PSK from the example by brute force method? RE: Missing Frames and hcxpcapngtool - null - 11-20-2021 The Hash monster is simply the tool I am using to capture the handshakes, and output them in the pcaps. From there I am planning to use Hashcat to actually do the brute-forcing/cracking. The project is here: https://github.com/G4lile0/ESP32-WiFi-Hash-Monster RE: Missing Frames and hcxpcapngtool - ZerBea - 11-20-2021 Looks like the WiFi hash monster is filtering some useful 802.11 frames out. How about an issue report on their github? Some examples of useful 802.11 frames (there are much more - take a look at them by tshark or Wireshark): Code: PROBEREQUEST frame BTW1: pwnagotchi and bettercap received already a fix and store this 802.11 frames, now. The same applies to the radio tap header (DLT_IEEE802_11_RADIO). It contain useful information about the quality of the received frame. Code: Frame 1: 255 bytes on wire (2040 bits), 255 bytes captured (2040 bits) on interface wlan0, id 0 BTW2: The hash modes 2500 (hccapx - that include cap2hccapx) and 16800 are outdated: https://hashcat.net/wiki/doku.php?id=cracking_wpawpa2 BTW3: State of the art tools use pcapng format instead of cap/pcap format, e.g. Wireshark/tshark (5.3.2. Output File Formats) https://www.wireshark.org/docs/wsug_html_chunked/ChIOSaveSection.html BTW4: A good starting point to learn 802.11 is here: https://mrncciew.com/2014/10/27/cwap-802-11-probe-requestresponse/ https://mrncciew.com/2014/10/10/802-11-mgmt-authentication-frame/ https://mrncciew.com/2014/10/28/802-11-mgmt-association-reqresponse/ https://mrncciew.com/2014/08/24/cwsp-eap-basics/ Please notice: In contrast to many other hash modes, a successful 802.11 attack always(!) starts on the RF channel. Excessive injecting DEAUTHENTICATION frames is far away from a successful attack. If the attack failed, you waste GPU time and/or hashcat will fail, too. RE: Missing Frames and hcxpcapngtool - CUwindows00 - 11-24-2021 I try to use hcxpcapngtool to convert 50,000 cap handshake 22000 format, the algorithm is very accurate, so far I have not found that the correct password will be missed, not to mention there is a function of NC technology, which can be used with confidence RE: Missing Frames and hcxpcapngtool - ZerBea - 11-24-2021 Unfortunately it's not as good as I'd like it to be. On "crappy" dump files or dump files captured by passive tools or cleaned dump files it may fail. BTW: There is absolutely no need to filter the reception branch or to clean a dump file! What has been lost on reception (or filtered out) is gone for ever. What has not been saved by the dump tool is gone for ever. What has been cleaned by "wpa cleaning tools" is gone for ever. |