Posts: 63
Threads: 10
Joined: Nov 2017
Should something like this work?
Code:
./hashcat -O -w3 -a6 dict.txt ?a?a?a?a -i --stdout | ./hashcat -O -w3 -m0 -a7 ?a?a -i 'hash'
Trying to accomplish having a dict.txt:
cat
dog
etc
And I want to add ?a?a to beginning and ?a?a?a?a to end of the wordlist
Posts: 930
Threads: 4
Joined: Jan 2015
Assuming the syntax is correct, that would indeed work - it would be slower than a direct on-GPU implementation, but a good compromise solution.
~
Posts: 2,301
Threads: 11
Joined: Jul 2010
12-20-2017, 01:03 PM
(This post was last modified: 12-20-2017, 01:03 PM by undeath.)
I remember only a0 supporting stdin mode. Not sure if this has changed.
Posts: 63
Threads: 10
Joined: Nov 2017
12-20-2017, 03:57 PM
(This post was last modified: 12-20-2017, 04:29 PM by walterlacka.)
(12-20-2017, 01:03 PM)undeath Wrote: I remember only a0 supporting stdin mode. Not sure if this has changed.
I think you're right:
Code:
./hashcat -O -w3 -a6 dict.txt ?a?a?a?a --stdout | ./hashcat -O -w3 -m0 -a7 ?a?a 'hash'
Gives:
Code:
Hash '?a?a': Line-length exception
No hashes loaded.
But this works:
Code:
./hashcat -O -w3 -a6 dict.txt ?a?a?a?a --stdout | ./hashcat -O -w3 -m0 -a0 'hash'
So, I was thinking I could create my own rule file using
mp '^?a^?a' > new.rules, then issue this command:
Code:
./hashcat -O -w3 -a6 dict.txt ?a?a?a?a --stdout | ./hashcat -O -w3 -m0 -a0 'hash' -r ./new.rules
But when I use this technique, my speed goes down dramatically. Is there a way to implement this whole thing on GPU instead of using stdin?
Posts: 930
Threads: 4
Joined: Jan 2015
No - stdout leaves the hashcat process entirely, and there is no in-hashcat method for this today (other than, perhaps, generating a *very* large list of masks using maskprocessor:
Simplified PoC:
Code:
$ mp64 ?lhello?a | head
ahello
ahello!
ahello"
ahello#
ahello$
ahello%
ahello&
ahello'
ahello(
ahello)
~
Posts: 63
Threads: 10
Joined: Nov 2017
The dict I want to use is only 2184 words… so I did this:
Code:
./hashcat -O -w3 -a7 ?a?a dict.txt --stdout > prependaa.txt
./maskprocessor-0.73/mp64.app '$?a$?a$?a$?a' > appendaaaa.rule
But that created 81450625 rules, and when running this command:
./hashcat -O -w3 -a0 ‘hash’ prependaa.txt -r ./appendaaaa.rule
I got this error:
Code:
* Device #2: Not enough allocatable device memory for this attack.
Then I tried with just device 3 and got the same error:
Code:
* Device #3: Not enough allocatable device memory for this attack.
So then I thought I would "reverse" the above by appending ?a?a?a?a to the end of the dictionary, and prepending the ?a?a to a rules file - which would give us less rules and I was hopeful I would have enough device memory at that point. Problem with this is that the dict.txt file got WAY too big with the ?a?a?a?a at the end of it.
Any other ideas/suggestions?
Posts: 930
Threads: 4
Joined: Jan 2015
I think that you've got all of the possible pieces already, and you just need to arrange them with the trade-off that works best for you. It looks like appending or prepending ?a?a with rules as the final step is a good balance.
~