Please note, this is a STATIC archive of website hashcat.net from October 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.

hashcat Forum

Full Version: Possible to do attack mode 6 and 7 on same attack
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Assuming the syntax is correct, that would indeed work - it would be slower than a direct on-GPU implementation, but a good compromise solution.
I remember only a0 supporting stdin mode. Not sure if this has changed.
(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?
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)
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?
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.