Help with special character rule
#1
I'm having issues with adding symbols like ~ } _ to the end of passwords with rules

Skipping invalid or unsupported rule in file rules/DEADFILE2.rule on line 10300: $)

Do you need to use a different command to add special characters?
Reply
#2
what did you try ? it would make sense to at least mention how you tried it etc ?

see https://hashcat.net/wiki/doku.php?id=rule_based_attack

for instance to append the "a" character, you would use a rile file:

Code:
$a

please make sure to use a rule file (except for -j/-k), otherwise your shell might try to interpret some characters
Reply
#3
(05-13-2020, 02:12 PM)philsmd Wrote: what did you try ? it would make sense to at least mention how you tried it etc ?

see https://hashcat.net/wiki/doku.php?id=rule_based_attack

for instance to append the "a" character, you would use a rile file:

Code:
$a

please make sure to use a rule file (except for -j/-k), otherwise your shell might try to interpret some characters

I just used...
$)

It works for characters like a
$a

But if you use symbols like ) it throws an error
Reply
#4
Do you mean if I want to put the ) symbol on the end I need to use
-k)

Or do I use
-k '$)'
Reply
#5
I don't quite get what you are trying to do and what your command looks like. Why don't you just show us what you currently try and we will explain what is wrong ! That way it would be much easier.

normally rules are just specified as a path to the rule file, with the -r command line option:
Code:
hashcat -m 0 -a 0 -w 3 -r my.rules hash.txt dict.txt

the "my.rules" is a path to the rule files, it could for instance also be rules/best64.rule (or on windows: -r rules\best64.rule).

That is how you normally use rules, see https://hashcat.net/wiki/doku.php?id=rule_based_attack
Reply
#6
(05-13-2020, 06:39 PM)philsmd Wrote: I don't quite get what you are trying to do and what your command looks like. Why don't you just show us what you currently try and we will explain what is wrong ! That way it would be much easier.

normally rules are just specified as a path to the rule file, with the -r command line option:
Code:
hashcat -m 0 -a 0 -w 3 -r my.rules hash.txt dict.txt

the "my.rules" is a path to the rule files, it could for instance also be rules/best64.rule (or on windows: -r rules\best64.rule).

That is how you normally use rules, see https://hashcat.net/wiki/doku.php?id=rule_based_attack

Sure, I have created my own rules, most of them are working. It's just the ones that add different symbols to the end that are not working.

This is my command
hashcat64.exe -m2500 -w4 -r rules/DEADFILE.rule logs.hccapx rockyou.txt

In DEADFILE.rule some of the rules for adding symbols are
$@
$)

For those two rules I want it to add the @ symbol on the end of the passwords ad run it again, and then add the ) symbol to the end and run it again.

Rules like
$1
$a

They work fine, they add a "1" and the "a", to the end, but its not working with symbols
Reply
#7
I'm pretty sure that is some problem with your specific rule file (malformed, corrupted).


just try it yourself... open a text editor, insert the dollar symbol and the closing bracket, store it and try this rule file.

It works as expected.

I guess that there is some special character within your rule file, maybe not a "normal byte", but a wide-char, utf16 character etc etc etc...
the char after the rule must be a single byte... if you want to add 2 bytes, you need to add both individually, e.g.

For instance if you really want to add this utf8 character that uses multi-bytes ❳ (in hex 0xe29db3)
my.rule
Code:
$\xe2 $\x9d $\xb3

Code:
echo -n test | hashcat --stdout -r my.rule
test❳
Reply
#8
(05-14-2020, 02:14 PM)philsmd Wrote: I'm pretty sure that is some problem with your specific rule file (malformed, corrupted).


just try it yourself... open a text editor, insert the dollar symbol and the closing bracket, store it and try this rule file.

It works as expected.

I guess that there is some special character within your rule file, maybe not a "normal byte", but a wide-char, utf16 character etc etc etc...
the char after the rule must be a single byte... if you want to add 2 bytes, you need to add both individually, e.g.

For instance if you really want to add this utf8 character that uses multi-bytes ❳ (in hex 0xe29db3)
my.rule
Code:
$\xe2 $\x9d $\xb3

Code:
echo -n test | hashcat --stdout -r my.rule
test❳

Thank you so much for your help, your a genious.

One of my rules was
d u ${

It was a tab inbetween them instead of a space, and some of them had spaces on the end
Reply