![]() |
hcxtools - solution for capturing wlan traffic and conversion to hashcat formats - 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: hcxtools - solution for capturing wlan traffic and conversion to hashcat formats (/thread-6661.html) |
RE: hcxtools - solution for capturing wlan traffic and conversion to hashcat formats - ZerBea - 11-04-2021 Good point, thanks. Main purpose of info option is to show detailed information of the content of a hash file before hash cat is feed with it. Due to many, many filter options, the evaluation is going to be complex and I lost the overview. By latest commit, all filter options are disabled in combination with info options and --help is updated: Code: --info=<file> : output detailed information about content of hash file Using regex is not planed, because it is yet another dependency. #include <regex.h> RE: hcxtools - solution for capturing wlan traffic and conversion to hashcat formats - oayz - 11-04-2021 Super, thanks! RE: hcxtools - solution for capturing wlan traffic and conversion to hashcat formats - oayz - 11-04-2021 Sorry, can't stop complaining about this "list" feature. Why ESSID filter only works for "-o"? OK, it doesn't work for "info" why not even for JtR?! total lines read..............: 76 valid hash lines..............: 76 PMKID hash lines..............: 30 EAPOL hash lines..............: 46 EAPOL written.................: 2 EAPOL written to john.........: 46 CMD line: hcxhashtool.exe -i ssid_all.hc22000 -o ssid_new.hc22000 --john=ssid_new.john --essid-list=ssid_new.lst List has only one ESSID. If I use the same ESSID in "----essid=" everything is as expected: total lines read..............: 76 valid hash lines..............: 76 PMKID hash lines..............: 30 EAPOL hash lines..............: 46 filter by ESSID...............: takenoko EAPOL written.................: 2 EAPOL written to john.........: 2 Am I missing intent of the filter? I didn't check the code but shouldn't filter remove ESSIDs from the input and then generate all required outputs? BTW, it would be nice if filter could have inclusive and exclusive options (e.g. to keep or discard listed ESSIDs). Global, not per ESSID RE: hcxtools - solution for capturing wlan traffic and conversion to hashcat formats - ZerBea - 11-04-2021 To speed up filtering, hcxhashtool is running only one stage. Therefore less common filter option combinations which do not make sense are ignored. In that case, it is mandatory to run hcxhashtool a second time (third time, ...) on the output of the task before. Purpose of ESSID filtering is to get benefit of reuse of PBKDF2, which will speed up hashcat. Code: --essid-group Filtering e.g. ESSIDs by occurrence of characters (e.g. x digit, digit, alfa...) doesn't make sense, because it will not speed up hashcat task. BTW: It is mandatory that the user knows what he is doing (analytical competencies): - knowledge of radio technology and electromagnetic-wave engineering (RF power vs. antenna gain vs. range) - detailed knowledge of 802.11 protocol (AUTHENTICATION sequences) - detailed knowledge of key derivation functions (PBKDF2 and HMAC functions) - detailed knowledge of Linux (driver specification, monitor mode, bash) Otherwise the result is always unexpected. e.g. as mentioned here: https://hashcat.net/forum/thread-10441-post-53995.html#pid53995 This applies in particular if you decide to use hcxdumptool/hcxtools, because they are analysis tools. There is no script inside hcxtools that replaces this knowledge. RE: hcxtools - solution for capturing wlan traffic and conversion to hashcat formats - oayz - 11-04-2021 Nah, I'm not trying "filtering by occurrence", I just have huge file of hashes and I want to run attack only on few ESSIDs. JTR file has clear text ESSIDs so I can simply run grep/egrep. HC22000 has ESSID in hex, I guess to properly handle foreign chars. BTW, hcxhashtool takes input as a text which seems to contradict hex intent Anyway I think I need tool to convert HC22000 hash from ESSID_hex to ESSID_text and back. If you are happy with the way filtering is done in hcxhashtool then I'll move on. RE: hcxtools - solution for capturing wlan traffic and conversion to hashcat formats - ZerBea - 11-04-2021 The major reason to use HEX_ASCII within hash lines: "Unlike basic service set identifiers, SSIDs are usually customizable. These SSIDs can be zero to 32 octets (32 bytes) long, and are, for convenience, usually in a natural language, such as English. The 802.11 standards prior to the 2012 edition did not define any particular encoding or representation for SSIDs, which were expected to be treated and handled as an arbitrary sequence of 0–32 octets that are not limited to printable characters. IEEE Std 802.11-2012 defines a flag to express that the SSID is UTF-8-encoded and could contain any Unicode text. Wireless network stacks must still be prepared to handle arbitrary values in the SSID field." Due to my analyses of wpa-sec submissions, I've seen almost everything within SSID IE_TAG. And the script (one liner) you're looking for: Code: $ printf hashline | awk 'BEGIN { FS = "*" } ; { print $6 }' | perl -pe 's/(..)/chr(hex($1))/ge' From hashcat example hashes https://hashcat.net/wiki/doku.php?id=example_hashes Code: $ printf "WPA*01*4d4fe7aac3a2cecab195321ceb99a7d0*fc690c158264*f4747f87f9f4*686173686361742d6573736964***" | awk 'BEGIN { FS = "*" } ; { print $6 }' | perl -pe 's/(..)/chr(hex($1))/ge' or Code: $ whoismac -x 686173686361742d6573736964 or Code: $ whoismac -x `printf "WPA*01*5ce7ebe97a1bbfeb2822ae627b726d5b*27462da350ac*accd10fb464e*686173686361742d6573736964***" | awk 'BEGIN { FS = "*" } ; { print $6 }'` or (if you know the PSK) Code: $ hcxpmktool -i "WPA*01*4d4fe7aac3a2cecab195321ceb99a7d0*fc690c158264*f4747f87f9f4*686173686361742d6573736964***" -p 'hashcat!' or (if you know the PMK) Code: $ hcxpmktool -i "WPA*01*4d4fe7aac3a2cecab195321ceb99a7d0*fc690c158264*f4747f87f9f4*686173686361742d6573736964***" -m 88f43854ae7b1624fc2ab7724859e795130f4843c7535729e819cf92f39535dc or what ever you want. BTW: Magnum (JtR) is involved, too: https://github.com/hashcat/hashcat/issues/1816#issuecomment-446117257 RE: hcxtools - solution for capturing wlan traffic and conversion to hashcat formats - oayz - 11-04-2021 Oh, thanks, I had no doubt there is a way to achieve my goal and in Unix there 1000 ways to skin the cat. Just liked hcxtools much and prefer to use one tool. Cheers! P.S. 1) I'm on windows and using Unix tricks is kind of PITA 2) I only know SSID RE: hcxtools - solution for capturing wlan traffic and conversion to hashcat formats - ZerBea - 11-06-2021 Take care about your terminal settings if you convert ESSID HEX values to ASCII. As far as I know, Windows doesn't like some characters within a terminal session. A very bad example of handling ESSIDs has been described here: https://nakedsecurity.sophos.com/2021/07/12/take-care-dont-get-tricked-by-this-crashtastic-iphone-wi-fi-hack/ RE: hcxtools - solution for capturing wlan traffic and conversion to hashcat formats - v71221 - 12-17-2021 Hi, Zerbea! Could you please answer. Currently (December 2021), which chipsets/adapters are you testing hcxdumptool on? Specifically, which 5GHz dongles are your favorite at the moment? Thanks in advance. P.S. I read your previous posts about your favorite chipsets/adapters. 02-13-2021 https://hashcat.net/forum/thread-6661-post-51653.html#pid51653 hcxdumptool is working on every driver (e.g.: mt76, rt2800usb, ath9k) that is able to run full monitor mode, full packet injection, accept ioctl() system calls and doesn't depend on NETLINK. 02-23-2020 https://hashcat.net/forum/thread-6661-post-47734.html#pid47734 As of today, I only use/test devices running mt76 and rt2800usb driver. 01-21-2020 https://hashcat.net/forum/thread-8899-post-47284.html#pid47284 I suggest to buy an adapter whose driver (native driver within official kernel, e.g.: rt2800usb, mt76) support monitor mode and packet injection. RE: hcxtools - solution for capturing wlan traffic and conversion to hashcat formats - ZerBea - 12-17-2021 Tested devices by ID (Arch Linux, kernel >= 5.10): Code: USB: To get additional information about the ID just do a DuckDuckGo search, e.g.: https://duckduckgo.com/?t=ffab&q=ID+148f%3A7601&ia=web or a device hunt: https://devicehunt.com/view/type/usb/vendor/148F/device/761A My favourite 5GHz adapters: ALFA ALFA Network AWUS036ACM (MT7612U) ASUS AC51 (MT7610U) CSL - 300Mbit USB WLAN (RT5572) In detail: CH 14 limited tx power due to wireless regdomain settings hcxdumptool and hcxlabtool series using the same functions to get device information (I prefer hcxlabtool series due to performance reasons on headless operation). ALFA ALFA Network AWUS036ACM (MT7612U) ID 0e8d:7612 MediaTek Inc. MT7612U 802.11a/b/g/n/ac Wireless Adapter Code: $ sudo hcxlabgetmall -C ASUS AC51 ID 0b05:17d1 ASUSTek Computer, Inc. AC51 802.11a/b/g/n/ac Wireless Adapter [Mediatek MT7610U] Code: $ sudo hcxlabgetmall -C CSL 300MBit ID 148f:5572 Ralink Technology, Corp. RT5572 Wireless Adapter Code: $ sudo hcxlabgetmall -C Please notice: On 5GHz the range is very limited and good antennas are mandatory! Wireless regulatory domain must not be be unset! |