Mask setup

I'm trying to specify a particular mask for brute force. I currently use the following argument:

?u?d ?1?1?1?1?1?1?1?1

8 digits, uppercase only, all numerical

However, I know for a fact the password has a maximum/minimum of 4 upper case letters and 4 numerical. They can be anywhere in this 8 digit sequence.



How can I specify this? Thanks
Just checking but are you doing -1 ?u?d ?1?1?1?1?1?1?1?1

Also there is not a way you can do that. What you have it correct.
Yes it does work fine but it wastes much time trying combinations that have more (or less) then 4 uppercase letters or numbers.

i.e. A0000001 is a big waste of time because I know its not the password format.

I doubt its impossible to accomplish, maybe using a dictionary generator or rules rather then a mask could work maybe. Being able to do so would be a HUGE performance gain.
you can generate all masks for 8 chars upper/num and filter out the ones which do not have 4 upper/num chars.

echo uuuudddd | ./permute.bin | sort -u | sed 's/\(.\)/?\1/g' > masks.hcmask

note: permute.bin from hashcat-utils
Yeah that sounds like a great solution!

I'm in windows environment for now so so installed sed.exe from GnuWin32 but the 's/\(.\)/?\1/g' argument doesn't want to accept the ?

I've tried without success
(sed.exe: -e expression #1, char 8: unknown command: `?'):

sed.exe "/\(.\)/?\1/g"

I'll try to figure it out but suggestions are welcomed Smile
you are missing the starting "s" for the sed command
so obvious! hehe thanks Smile

The masks in the generated file are exactly what I was hoping (little editing to do).

It went from 345 days at best to crack to 12 hours!!! Amazing! I already know the password, lets see if oclhashcat can find it now Smile

Thanks again for the help!
Wait, there's a tool that generates the neccessary masks to target advanced password policies, it's called PACK: