hashcat Forum
Hashcat + wlangenpmkocl how to convert back to plaintext ? - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Support (https://hashcat.net/forum/forum-3.html)
+--- Forum: hashcat (https://hashcat.net/forum/forum-45.html)
+--- Thread: Hashcat + wlangenpmkocl how to convert back to plaintext ? (/thread-9893.html)

Pages: 1 2 3 4 5


RE: Hashcat + wlangenpmkocl how to convert back to plaintext ? - ZerBea - 02-22-2021

Idea behind wlangenpmkocl.
target:
different NETWORKs using the same ESSID (eg.: home)
NETWORK often change PSK, but never the ESSID

In both cases, we must run hashcat 2500/16800/22000 more or less often on the same wordlist to recover the PSK (if it is inside the list). Every time we do this, we have to pay the price for PBKDF2
To avoid this:
hashcat -m 22000 hash.22000 word.list

we're calculating a PMK list (PMK : PSK) for that ESSID and have to pay the price for PBKDF2, too:
wlangenpmkocl -> hashcat -m 22001 hash.22000 pmk.list
If hashcat found a pmk we search for this finding in wlangenpmkocl list and get the PSK


Now we get a different (new) NETWORK, running the same ESSID or an existing NETWORK changed the PSK, but not the ESSID.
If we run hashcat we have to pay the price for PBKDF2 again (and again, and again, ...)
hashcat -m 22000 hash.22000 word.list

If we use the already calculated PMK list, we can do this a thousand times faster, because there is no PBKDF2 bill, we have to pay:
hashcat -m 22001 hash.22000 pmk.list
The pmk.list is our Rainbow Table and we know the PSK for every calculated PMK.

BTW:
Internal, hashcat is doing exactly the same. Take a look at hashcat's potfile and you'll see all components of PBKDF2:
PMK * ESSID : PSK

Please remember:
ESSID + PSK -> PMK
ESSID + PMK -> PSK

The same applies to hcxhashtool, if you apply a PMK:
Code:
--pmk=<PMK>                  : plain master key to test
                               no nonce error corrections

Or to hcxpcapngtool, to detect a PMKID/EAPOL message calculated using a zeroed PMK:
Code:
EAPOL (from zeroed PMK)..................: 2
PMKID (from zeroed PMK)..................: 11

Your experience is highly appreciated. If you discover something new, or something that is still missing, please let me know. I'll try to add it to hcxtools.


RE: Hashcat + wlangenpmkocl how to convert back to plaintext ? - pr0ph3t - 02-22-2021

(02-22-2021, 01:13 PM)ZerBea Wrote: For sure a mask on a PMK will work, in case you hav 90% of the PMK.
Example:
$ wlangenpmk -e hashcat_net -p hashcat1

essid (networkname)....: hashcat_net
password...............: hashcat1
plainmasterkey (SHA1)..: 9cff1131859ffd9255a3bd412db53d3a576c41910cff9bf8165176b3fd6fdbf0

If you run hashcat with this mask
9cff1131859ffd9255a3bd412db53d3a576c41910cff9bf8165176b3fd6fdb?h?h
it will verify the PMK.
Please note my wording: I didn't write it cracked the network or it recovered the PSK.

Now take a look at the result of PMKDF2 if you change a character within the ESSID
$ wlangenpmk -e hashcat-net -p hashcat1

essid (networkname)....: hashcat-net
password...............: hashcat1
plainmasterkey (SHA1)..: da4976c8e0e045d3f3e48e3213953cde92f6ac2e0b75b5dde88d4177e924251a

No chance to run this simple mask to verify the PMK.

Now we change a character of the PSK:
$ wlangenpmk -e hashcat_net -p hashcat2

essid (networkname)....: hashcat_net
password...............: hashcat2
plainmasterkey (SHA1)..: 332f14d711b5be5b5b8dcce42c36a0b452502cab0d7db1b5a4ef7ac9d7ec90b3

our simple mask will fail, too.

In every case you must do "slow" PBKDF2:
ESSID + PSK -> PMK
ESSID + PMK -> PSK

And if you discover a new PMK, ESSID + PMK -> PSK is mandatory.


hash mode comparison table:
2500 -> 22000
2501 -> 22001
16800 -> 22000
16801 -> 22001

2500 & 16800 -> 22000 reuse of PBKDF2
2501 & 16801 -> 22001

Mostly I don't use masks, rules or big wordlists found in www.
hcxdumptool/hcxtools and hashcat (or JtR) is more than enough for me.

I recommend not to convert hccapx to 22000, because you don't know nothing about the quality of the hccxcap file.
It is much better to recapture and to convert them directly to 22000.

Which tools do you use for capturing and converting?

Hey there,

Ok need to re-read this a few times to fully understand.

Meanwhile my current workflow is as follows (forgive the noobishness I know I should be doing it manually and will when I attempt the method you show above).

Ran wifite, let it capture the handshake automatically.
Ran /usr/share/hashcat-utils/cap2hccapx.bin INPUTFILE.cap OUTPUTFILE.hccapx

Meanwhile, the workhorse building the BIG-WPA-1 wordlist to PMK, (40hrs)
sudo wlangenpmkocl -e "Name Of The AP(spaces on purpose)" -i BIG-WPA-LIST-1 -A OUTPUT.pmk

Then moved to the cracking RIG:
hashcat -a 6 -m 2501 -w 4 "ANALYZE ME\TARGET.hccapx" dict\BIG-WPA-LIST-1.pmk masks\rockyou-1-60.hcmask

gazillion quadrillion keys every few seconds being sequenced but STILL not finding my password grrr. Now we need to focus on rule creation and custom wordlist I think le sigh.

Or start from scratch using your method and try again then branch off

EDIT: Just answered my earlier question about the order of candidates in collision attacks: Just discovered Markov Chains. Something special here.. Can I use Markov Chains in a hybrid attack ? (a 6). I'm wondering what fascinating things this would do to a wordlist


RE: Hashcat + wlangenpmkocl how to convert back to plaintext ? - ZerBea - 02-23-2021

Running wlangenpmkocl as super user (sudo) is not a good idea and absolutely not necessary.
Option -A is a good idea, because you'll get the PMK and the PSK. In combination with the ESSID you have all parts of the PBKDF2 algo.

Using different kinds of rules and masks (also in hybrid mode) is a very good idea on word lists, but not on a PMK list.

I'm doing this by:
capture traffic -> hcxdumptool
convert hash and data of PROBEREQUESTs -> hcxpcapngtool (-o -E)
get raw word list from hcxpcapngtool -E -> hcxeiutool -s
feeding hashcat with hcxeiutool -s output
sort the list and run hashcat task on hash and wordlist

commands:
Code:
$ sudo hcxdumptool -i interface -o dump.pcapng --enable_status=1
for some hours
$ hcxpcapngtool -E trafficwords -o hash.22000 dump.pcapng
$ hcxeiutool -i trafficwords -s raw.list
$ hashcat --stdout -r "hcxessid.rule" cs.list | sort | uniq > word.list
$ hashcat -m 22000 --nonce-error-corrections=0 hash.22000 word.list

nonce-error-corrections=0 because I trust in hcxdumptool/hcxpcapngtool and expect no packet loss.

NC is explained here:
https://hashcat.net/forum/thread-6361.html
and referenced here, too:
https://github.com/s3inlc/hashtopolis/issues/679#issuecomment-783516615

BTW:
Here you can find the successor of wifite:
https://github.com/kimocoder/wifite2


RE: Hashcat + wlangenpmkocl how to convert back to plaintext ? - pr0ph3t - 02-23-2021

(02-23-2021, 01:30 AM)ZerBea Wrote: Running wlangenpmkocl as super user (sudo) is not a good idea and absolutely not necessary.
Option -A is a good idea, because you'll get the PMK and the PSK. In combination with the ESSID you have all parts of the PBKDF2 algo.

Using different kinds of rules and masks (also in hybrid mode) is a very good idea on word lists, but not on a PMK list.

I'm doing this by:
capture traffic -> hcxdumptool
convert hash and data of PROBEREQUESTs -> hcxpcapngtool (-o -E)
get raw word list from hcxpcapngtool -E -> hcxeiutool -s
feeding hashcat with hcxeiutool -s output
sort the list and run hashcat task on hash and wordlist

commands:
Code:
$ sudo hcxdumptool -i interface -o dump.pcapng --enable_status=1
for some hours
$ hcxpcapngtool -E trafficwords -o hash.22000 dump.pcapng
$ hcxeiutool -i trafficwords -s raw.list
$ hashcat --stdout -r "hcxessid.rule" cs.list | sort | uniq > word.list
$ hashcat -m 22000 --nonce-error-corrections=0 hash.22000 word.list

nonce-error-corrections=0 because I trust in hcxdumptool/hcxpcapngtool and expect no packet loss.

NC is explained here:
https://hashcat.net/forum/thread-6361.html
and referenced here, too:
https://github.com/s3inlc/hashtopolis/issues/679#issuecomment-783516615

BTW:
Here you can find the successor of wifite:
https://github.com/kimocoder/wifite2

ahhhhhhh f******** lol You just reminded me I forgot to cat/cut no wonder I'm not finding anything goddamnit. UGHHHHH.
Gonna slice up the PMK and try again.

cat PMK-FILE | cut -d ':' -f 1 > HASHCATOUTPUT.pmk

Laugh it's ok.

EDIT: Once I finish this experiment I'm trying your method from the step before as well we're gonna try the 22k with this. Let's see what happens when the cat cut's done. Ugh hope this doesn't take as long to build as the pmk. Oh that wasn't so bad 15 minutes to cat cut. Now I'm really gonna make you laugh. Is there a way to make CUT command use multiple CPU ? GPU doesn't seem necessary I think the editing is well within acceptable time frame.


RE: Hashcat + wlangenpmkocl how to convert back to plaintext ? - ZerBea - 02-23-2021

I don't think cut is multi threaded.

BTW:
Running cut -d ':' -f 1 e.g. within a script isn't a good idea, because the delimiter could be different (if an ESSID is included):
PMK * ESSID : PSK
PMK : PSK
In every case, the PMK is first and 64 hex characters in size, so -c -64 is more universal.


RE: Hashcat + wlangenpmkocl how to convert back to plaintext ? - pr0ph3t - 02-23-2021

(02-23-2021, 10:13 AM)ZerBea Wrote: I don't think cut is multi threaded.

BTW:
Running cut -d ':' -f 1 e.g. within a script isn't a good idea, because the delimiter could be different (if an ESSID is included):
PMK * ESSID : PSK
PMK : PSK
In every case, the PMK is first and 64 hex characters in size, so -c -64 is more universal.

hmm lost you there so what should the cut command be ? Also why are you saying running within a script ? I'm not feeding the list directly btw I created a new wordlist out of the cut and then ran hashcat on that. The way wlangen made the PMK was PMKTongueSK so if you remove everything after the : you're good no ? Or should I not be making assumptions like that ?


RE: Hashcat + wlangenpmkocl how to convert back to plaintext ? - ZerBea - 02-23-2021

I thought your're running your command within a script or an alias. If not, your command is ok.

Mostly I use scripts or alias to save me unnecessary work (when using different source files):
hashcat.potfile include the PMKs of recovered PSKs. So why not adding them to the big PMK list. You have payed the price (PBKDF2 for them already. This format is "PMK * ESSID : PSK" and cut -d ':' -f1 will not work on it.


RE: Hashcat + wlangenpmkocl how to convert back to plaintext ? - pr0ph3t - 02-23-2021

(02-23-2021, 04:17 PM)ZerBea Wrote: I thought your're running your command within a script or an alias. If not, your command is ok.

Mostly I use scripts or alias to save me unnecessary work (when using different source files):
hashcat.potfile include the PMKs of recovered PSKs. So why not adding them to the big PMK list. You have payed the price (PBKDF2 for them already. This format is "PMK * ESSID : PSK" and cut -d ':' -f1 will not work on it.

Oh yeah for mode 22k but 2501 it worked if you check back at the beginning of the thread. I need to make a recap for us I've asked so many questions and it's become convoluted. Once I get out of my meetings going to re-read the whole thread absorb properly and lay out, going to start from the beginning this time properly. I have a feeling the books I've been reading are using deprecated methods.

Also no not doing in script just typing out the commands. Am I allowed to post books here ? I thought they were pretty good. Not sure about copyright issues though

Also before starting again, I've installed the recommendations for wifite2 but I'm wondering about modwifi. Is the only way to run it as a VM ? I'm running The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali) native on my laptop it's dedicated to linux there's no windows. I suppose I can spin up the VM in The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali) but I'm assuming they would rather you just burn to a usb and boot live yeah ? So my question is, is it worth it or can I substitute with other tools ? (I know wifite2 doesn't require it just wondering)


RE: Hashcat + wlangenpmkocl how to convert back to plaintext ? - ZerBea - 02-23-2021

Unfortunately, I can't answer questions
related to K A L I, because I don't use K A L I,
related to a VM, because I don't use a VM,
related to third party scripts (wifite2, handshaker, ...), because I don't use them.

I think, posting a title of a book doesn't violate the rules.
My recommendation is:
https://www.oreilly.com/library/view/80211-wireless-networks/0596100523/


RE: Hashcat + wlangenpmkocl how to convert back to plaintext ? - pr0ph3t - 02-23-2021

(02-23-2021, 07:05 PM)ZerBea Wrote: Unfortunately, I can't answer questions
related to K A L I, because I don't use K A L I,
related to a VM, because I don't use a VM,
related to third party scripts (wifite2, handshaker, ...), because I don't use them.

I think, posting a title of a book doesn't violate the rules.
My recommendation is:
https://www.oreilly.com/library/view/80211-wireless-networks/0596100523/

Well.. The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali).. I mean it's just the base I've modified it so much at this point it doesn't resemble anything like its base.

That gnome disk utility is a godsend. I take an entire disk image every couple days.

Still reading over everything and compiling notes before I begin from scratch. Meanwhile, amongst many other the primary books I'm referencing are:

- Mastering K A L I Linux for Advanced Penetration Testing - 2nd Edition [EPUB] - Starting that 'Attacking WPA/WPA2 section'

- Mastering Wireless Penetration Testing for Highly Secured Environments [EPUB]

- Hash Crack Password Cracking Manual v3 b - Joshua Picolet

(z-lib.org) 10 books a day, free. awesome place I'm sure most of you know it. I'll look up the book you referenced there and check it out.. 2005 though it's a little dated no ? I guess it's solid fundamentals though (which I obviously need)

EDIT: After some basic analysis seems like MODWIFI can be substituted with recon-ng or websploit frameworks. So there you go no need to spin up VMs and eat your cores up. Sigh I need a datacenter.