Hashcat Mask Attack
#1
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?
Reply
#2
Off the top of my head...

-1 123456789 -2 0123456789- -3 abcdABCD0123456789- -4 abcdABCD0123456789 ?1?2?3?4?4?4?4?4?4(etc)
Reply
#3
(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.
Reply
#4
the hashcat way of storing mask is hashcat mask files (hcmask):
https://hashcat.net/wiki/doku.php?id=mas...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
Reply
#5
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?
Reply
#6
(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.
Reply
#7
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
Reply
#8
(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
Reply
#9
Have you tried something similar to what you've mentioned before?
Reply