Discussion:
[john-users] Convert JtR rules to HashCat format
Matt Weir
2018-08-13 15:08:25 UTC
Permalink
Is there a way to output JtR rules when they have had their
preprocessor rules expanded? The goal is to convert JtR rules to a
format that Hashcat can understand.

I see that it looks like bartavelle did something similar already:
https://github.com/bartavelle/manglingrules, but I was wondering if
that functionality was already in JtR.

Background:

I really like using JtR's preprocessor rules when creating rules by
hand. Aka I can do things like:

A0'test[0-9][0-9]' to pre-pend "test" + 2 digits to all dictionary
words. Hashcat doesn't support that, so to make use of that you need
to expand the rule out into 100 different rules. Also pre-pending
strings gets weird since you have to do them in reverse. Aka
pre-pending "test" would be:

^t^s^e^t

There's times though that I like using Hashcat, so I'm looking for the
ability to easily convert between my JtR rules to something hashcat
can use.


Cheers,
Matt
magnum
2018-08-13 17:40:59 UTC
Permalink
Post by Matt Weir
Is there a way to output JtR rules when they have had their
preprocessor rules expanded? The goal is to convert JtR rules to a
format that Hashcat can understand.
Perhaps not quite what you were looking for, but they will be output in
the log file.

Input rule:
$[0-5]

From log file:
0:00:00:00 - 6 preprocessed word mangling rules
0:00:00:00 - Rule #1: '$0' accepted
0:00:00:00 - Rule #2: '$1' accepted
0:00:00:00 - Rule #3: '$2' accepted
0:00:00:00 - Rule #4: '$3' accepted
0:00:00:00 - Rule #5: '$4' accepted
0:00:00:00 - Rule #6: '$5' accepted

magnum

Loading...