hashcat Forum
Hashcat Mask Attack - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Misc (https://hashcat.net/forum/forum-15.html)
+--- Forum: General Talk (https://hashcat.net/forum/forum-33.html)
+--- Thread: Hashcat Mask Attack (/thread-9266.html)



Hashcat Mask Attack - FPTHHrw6mKhNZwL6 - 05-28-2020

Hi,

I need hashcat to use a specific mask attack, how can I make/use specific charsets that I have made up?

1st Character
1-9

2nd Character
0-9, -

3rd Character
-, abcd, ABCD, 0-9

4th Character - 23rd Character
abcd
ABCD
0-9

Experts can you help?


RE: Hashcat Mask Attack - womble - 05-29-2020

Off the top of my head...

-1 123456789 -2 0123456789- -3 abcdABCD0123456789- -4 abcdABCD0123456789 ?1?2?3?4?4?4?4?4?4(etc)


RE: Hashcat Mask Attack - FPTHHrw6mKhNZwL6 - 05-29-2020

(05-29-2020, 04:10 AM)womble Wrote: Off the top of my head...

-1 123456789 -2 0123456789- -3 abcdABCD0123456789- -4 abcdABCD0123456789 ?1?2?3?4?4?4?4?4?4(etc)

Is there any way I can save this to a file instead of entering manually?

Thanks for the reply.

How you explained that was pretty great.


RE: Hashcat Mask Attack - philsmd - 05-29-2020

the hashcat way of storing mask is hashcat mask files (hcmask):
https://hashcat.net/wiki/doku.php?id=mask_attack#hashcat_mask_files

my.hcmask:
Code:
123456789,?d-,abcdABCD?d,?3-,?1?2?4?3?3?3?3?3?3

but any operating system has native ways of doing some shell scripting:
bash/sh scripts on unix (linux + macOS etc), batch files on windows etc

it's up to you if you want to store the whole command or only the mask in a .hcmask file

hcmask file can be run in the same way you run normal mask:
Code:
hashcat -m 0 -a 3 -w 3 -O hashes.txt my.hcmask



RE: Hashcat Mask Attack - FPTHHrw6mKhNZwL6 - 05-30-2020

Is there a way of limiting the results of the second character based on the results of the first character?

For instance, with my example, the first two characters are only numbers from 1-25.

So, if first character is 1, then the following characters could be 234567890.

Now, if the first character was a 2, then I would only want 012345 to be the options.

Is this possible?


RE: Hashcat Mask Attack - slyexe - 05-30-2020

(05-30-2020, 01:33 AM)FPTHHrw6mKhNZwL6 Wrote: Is there a way of limiting the results of the second character based on the results of the first character?

For instance, with my example, the first two characters are only numbers from 1-25.

So, if first character is 1, then the following characters could be 234567890.

Now, if the first character was a 2, then I would only want 012345 to be the options.

Is this possible?

No, there is no way of determining a single character value of a hash. It will only crack if it discovers the proper passphrase.


RE: Hashcat Mask Attack - philsmd - 05-30-2020

for these numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25
you could just write several different mask like this:
Code:
123456789,?1
1?d
012345,2?1

so the first one without the zero (0), the second one from 10 to 19 and the last one only from 20 to 25

the problem with too small mask could be that you loose performance/acceleration, but this depends a lot on the hash type/algorithm


RE: Hashcat Mask Attack - FPTHHrw6mKhNZwL6 - 06-10-2020

(05-30-2020, 07:30 AM)philsmd Wrote: for these numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25
you could just write several different mask like this:
Code:
123456789,?1
1?d
012345,2?1

so the first one without the zero (0), the second one from 10 to 19 and the last one only from 20 to 25

the problem with too small mask could be that you loose performance/acceleration, but this depends a lot on the hash type/algorithm

Thanks will try! I hope it works


RE: Hashcat Mask Attack - FPTHHrw6mKhNZwL6 - 06-23-2020

Have you tried something similar to what you've mentioned before?