hashcat Forum
pattern mask - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Support (https://hashcat.net/forum/forum-3.html)
+--- Forum: hashcat (https://hashcat.net/forum/forum-45.html)
+--- Thread: pattern mask (/thread-9140.html)



pattern mask - jokocc - 04-17-2020

hello, I'm newbie in hashcat. im trying to crack a 12 character password. i know that a component in the password is a word 'g00se'. but what i don't know is the position of the word inside the password (maybe on the beginning, middle, or the end). 

how can i make the mask appropriate? 
since it's only 7 more (alpha numeric with special chacter) digits left to crack.

any help would be appreciated, thanks.


RE: pattern mask - undeath - 04-17-2020

You need to create a mask for each possible position of the known part.


RE: pattern mask - jokocc - 04-18-2020

(04-17-2020, 11:40 PM)undeath Wrote: You need to create a mask for each possible position of the known part.
thanks for the reply, will do.

is there any available automation script to do that?


RE: pattern mask - philsmd - 04-18-2020

Well, this is a very specific task (insert a word of length 5, g00se, into a mask of length 12, at each and every position), it's probably much more easier to just write all combination down or use a quick perl (or python or whatever) script.

my.hcmask (hashcat mask file to use with -a 3)
Code:
?l?d?s,?1?1?1?1?1?1?1g00se
?l?d?s,?1?1?1?1?1?1g00se?1
?l?d?s,?1?1?1?1?1g00se?1?1
?l?d?s,?1?1?1?1g00se?1?1?1
?l?d?s,?1?1?1g00se?1?1?1?1
?l?d?s,?1?1g00se?1?1?1?1?1
?l?d?s,?1g00se?1?1?1?1?1?1
?l?d?s,g00se?1?1?1?1?1?1?1

BTW: I'm not sure if you are talking about upper- and lower-case characters... the problem is that the larger the keyspace, the longer it will take and of course it could get infeasible soon, if you are using to much characters at each and every position (therefore it could make sense, as above, to use custom charsets like --custom-charset1 ?l?d?s)

perl:
Code:
perl -e 'my $l = "?1" x 7 . "g00se"; for (my $i = 0; $i < 8; $i++) { print "?l?d?s," . $l . "\n"; $l = substr ($l, 2) . "?1"; }'



RE: pattern mask - jokocc - 04-18-2020

(04-18-2020, 08:19 AM)philsmd Wrote: Well, this is a very specific task (insert a word of length 5, g00se, into a mask of length 12, at each and every position), it's probably much more easier to just write all combination down or use a quick perl (or python or whatever) script.

my.hcmask (hashcat mask file to use with -a 3)
Code:
?l?d?s,?1?1?1?1?1?1?1g00se
?l?d?s,?1?1?1?1?1?1g00se?1
?l?d?s,?1?1?1?1?1g00se?1?1
?l?d?s,?1?1?1?1g00se?1?1?1
?l?d?s,?1?1?1g00se?1?1?1?1
?l?d?s,?1?1g00se?1?1?1?1?1
?l?d?s,?1g00se?1?1?1?1?1?1
?l?d?s,g00se?1?1?1?1?1?1?1

BTW: I'm not sure if you are talking about upper- and lower-case characters... the problem is that the larger the keyspace, the longer it will take and of course it could get infeasible soon, if you are using to much characters at each and every position (therefore it could make sense, as above, to use custom charsets like --custom-charset1 ?l?d?s)

perl:
Code:
perl -e 'my $l = "?1" x 7 . "g00se"; for (my $i = 0; $i < 8; $i++) { print "?l?d?s," . $l . "\n"; $l = substr ($l, 2) . "?1"; }'

thank you very much. yes i'll try the mask and use the code provided if there is a more combination mask in the future.
because my initial question is answered, I consider problem solved.