hashcat Forum
Mask-Attack - 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: Mask-Attack (/thread-10444.html)



Mask-Attack - Degus22 - 11-06-2021

Hey guys,

so I am trying to crack my Apple Secure Notes hash, for explanation reasons I fabricated this one:
$ASN$*1*20000*d6ca2e9ae031d385b5fa1583652a7216*c6d6b20ff9c659b908a38e68a2a3c9c103b3c8af3256185e:Admin

I have created the following files:
charset1.hcchr
Content:
Code:
abdehimnoz123


and


my1.hcmask
content:
Code:
?b
?b?b
?b?b?b
?b?b?b?b
?b?b?b?b?b
?b?b?b?b?b?b
?b?b?b?b?b?b?b
?b?b?b?b?b?b?b?b
?b?b?b?b?b?b?b?b?
?b?b?b?b?b?b?b?b?b?b
?b?b?b?b?b?b?b?b?b?b?b
?b?b?b?b?b?b?b?b?b?b?b?b


and I try to run them all together like this:
Code:
.\hashcat.exe -m 16200 -a 3 -w 3 -1 .\charsets\charset1.hcchr  .\hash.txt .\masks\my1.hcmask

With the code I try to accomplish, for every ?b it replaces a letter from my charset.

The Problem is, the charset is not beeing utilised. So Hashcat takes the "?b" tries every possiblity of ?b as stated in the manuel.

Does anybody know, how I can code it, so it only takes my charset?

Thanks in advance for the help

Regards,
Degus22


RE: Mask-Attack - slyexe - 11-06-2021

You're not far off, but your using hashcats predefined character set rather than using your custom character set. 

So you've already defined -1 as your charset1.hcchr file so that will be what you will need to put into your hcmask file rather than ?b

my1.hcmask
Code:
?1
?1?1
?1?1?1
etc..

You can also accomplish this by using increments (-i) and defining minimum and maximum attack lengths.

Code:
hashcat.exe -m 16200 -w 3 -a 3 -i --increment-min 1 --increment-max 12 -1 abdehimnoz123 .\hash.txt ?1?1?1?1?1?1?1?1?1?1?1?1

This will attempt your custom character set from 1 character long to 12 characters long.


RE: Mask-Attack - Degus22 - 11-06-2021

(11-06-2021, 03:11 AM)slyexe Wrote: You're not far off, but your using hashcats predefined character set rather than using your custom character set. 

So you've already defined -1 as your charset1.hcchr file so that will be what you will need to put into your hcmask file rather than ?b

my1.hcmask
Code:
?1
?1?1
?1?1?1
etc..

You can also accomplish this by using increments (-i) and defining minimum and maximum attack lengths.

Code:
hashcat.exe -m 16200 -w 3 -a 3 -i --increment-min 1 --increment-max 12 -1 abdehimnoz123 .\hash.txt ?1?1?1?1?1?1?1?1?1?1?1?1

This will attempt your custom character set from 1 character long to 12 characters long.

Hey Slyexe

Thanks for your reply

I've replaced the mask with ?1 but now it doesnt seem to get the Custom-charset.
When I try to run this:
Code:
.\hashcat.exe -m 16200 -a 3 -w 3 -1 abdehimnoz123 .\hash.txt .\masks\my1.hcmask

I get te following errors:

Code:
Custom-charset 1 is undefined.

I've also tried to put the charset in a file like this:
Code:
.\hashcat.exe -m 16200 -a 3 -w 3 -1 .\charsets\charset1.hcchr .\hash.txt .\masks\my1.hcmask
but with no different result.

Do you have any idea how I can get rid of the error?

Kind Regards,
Degus22


RE: Mask-Attack - Degus22 - 11-06-2021

I've found the followin URLs:

https://hashcat.net/wiki/doku.php?id=frequently_asked_questions#what_is_a_hashcat_mask_file
and
https://hashcat.net/wiki/doku.php?id=mask_attack#hashcat_mask_files

but they didnt really help me.

After reading those articles I have the feeling, I have to set the charset inside of the hcmask file.
Does anybody know how to do that?

Regards,
Degus22


RE: Mask-Attack - royce - 11-08-2021

The links you listed illustrate how to do that. It's comma-separated and order-dependent, so these are equivalent:

cmdline:
-1 ?l?u ?1?1?1

file:
?l?u,?1?1?1

... and:

cmdline:
-1 ?l?u -2 ?u?d ?1?2?2

file:
?l?u,?u?d,?1?2?2

... etc.


RE: Mask-Attack - Snoopy - 11-09-2021

i think the problem is, if you use maskfiles, you have to define your charset INSIDE this file, so a proper solution would be

my1.hcmask:
abdehimnoz123,?1?1?1?1?1?1?1?1?1?1?1?1

.\hashcat.exe -m 16200 -a 3 -w 3 --increment .\hash.txt .\masks\my1.hcmask

EDIT:
sry for double post


RE: Mask-Attack - Degus22 - 11-10-2021

(11-08-2021, 08:45 AM)royce Wrote: The links you listed illustrate how to do that. It's comma-separated and order-dependent, so these are equivalent:

cmdline:
-1 ?l?u ?1?1?1

file:
?l?u,?1?1?1

... and:

cmdline:
-1 ?l?u -2 ?u?d ?1?2?2

file:
?l?u,?u?d,?1?2?2

... etc.
Thanks for your reply
I understand that part, but I still dont know how to integrate my custom charset.

(11-09-2021, 07:15 PM)Snoopy Wrote: i think the problem is, if you use maskfiles, you have to define your charset INSIDE this file, so a proper solution would be

my1.hcmask:
abdehimnoz123,?1?1?1?1?1?1?1?1?1?1?1?1

.\hashcat.exe -m 16200 -a 3 -w 3 --increment .\hash.txt .\masks\my1.hcmask

EDIT:
sry for double post

THANK YOU SOOO MUCH

It finally worked Big Grin

You are my knight in shining armor

I'm glad you "double posted" even though you didnt Tongue


RE: Mask-Attack - Snoopy - 11-11-2021

you can add up to 4 custom charsets (like on cli) but seperated in maskfile by , and also you can combine them with build in e.g.

charset 1 = abdehimnoz
charset 2 = 123

abdehimnoz,123,?1?1?1?1?1?1?1?1?1?2?2?2?a


RE: Mask-Attack - waqas366 - 11-12-2021

i want to crack my RAR5 hashes, i m also new to Hashcat my password is like " Abcdef@36666# 

length is undefined and i dont know when i set my RAR password what was the length but one thing i sure is its a mixed alpha numeric with special chracters, more than 10 character length....

someone guide me what will be full command to use a charset like this one

abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789«space»!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~

is there any possibility to use a charset like this one....

or how can i use mask attack
any suggestion or information highly appreciated.

best regards