Custom brute-force attack
#1
I have this attack:
hashcat -a 3 -m 0 "hash.txt" ?a?a?a?a?a?a?a?a?a

But I don't want to test these masks. First, I want to convert them to MD5, then take only the first 20 characters and finally add at the beggining //.

For exemple, for ?a?a?a?a?a?a?a?a?a123456789:
    First: MD5 (123456789) -----> 25f9e794323b453885f5181f1b624d0b
    Then: 20 first characters -----> 25f9e794323b453885f5
    Finally: Add // -----> //25f9e794323b453885f5, this I want to test to crack the password, no the mask 123456789

Create a dictionary is not not an option, to big...

So, ¿How I can proceed? I reviewed the documentation but I didn't find how to do it.

Thank you.
Reply
#2
I suppose, this custom attack will require custom module.

Fortunately, hashcat has md5(md5($pass)) module with accessible sources. You can take it as a basis, make some changes and use modified one.
Reply
#3
(09-13-2022, 10:07 AM)nick8606 Wrote: I suppose, this custom attack will require custom module.

Fortunately, hashcat has md5(md5($pass)) module with accessible sources. You can take it as a basis, make some changes and use modified one.

I don't know nothing about custom modules. ¿There's some link?

Thank you.
Reply
#4
This cannot be done by hashcat, as mentioned it would require additional scripting. Hashcats purpose is to reverse hashes to their plaintext and not the other way around. 

You can always use hashcat's mask as a pipe to whatever script you want to make using --stdout. This will print all the results but you would need to run that thru md5 encryption and alter it as you require.
Reply
#5
(09-14-2022, 12:16 AM)slyexe Wrote: This cannot be done by hashcat, as mentioned it would require additional scripting. Hashcats purpose is to reverse hashes to their plaintext and not the other way around. 

You can always use hashcat's mask as a pipe to whatever script you want to make using --stdout. This will print all the results but you would need to run that thru md5 encryption and alter it as you require.

How can I run Hashcat with additional scripting?
Reply
#6
mika09, you can start from Hashcat Plugin Development Guide.
Reply