Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180527101234.GA988@openwall.com>
Date: Sun, 27 May 2018 12:12:34 +0200
From: Solar Designer <solar@...nwall.com>
To: john-users@...ts.openwall.com
Subject: Re: john --make-charset=custom.chr: Can't get the hang of using it. :-(

On Sun, May 27, 2018 at 01:28:13AM +0100, Eric Watson wrote:
> I am struggling with making a suitable mask having tried numerous attempts.
> 
> I am trying to achieve:
> 
> ./john --mask'[*!][Ff]irrstword followed by a known number such as 11334 
> but could also be 43311 followed by [*!][Ss]econdword followed by 11334 
> or 43311' passwd
> 
> The number digits would not change and would always be in the same order 
> following the first and second word so could be treated as a "word".
> 
> The firstwordnumber and secondwordnumber could also be reversed ie.
> 
> ./john --mask'[*!][Ss]econdword followed by 11334 or 43311 
> [*!][Ff]irrstword followed by 11334 or 43311' passwd
> 
> I assume this would need two passes, one for each combination?

If I understood you correctly, it's these 8 masks:

[*!][Ff]irstword11334[*!][Ss]econdword11334
[*!][Ff]irstword11334[*!][Ss]econdword43311
[*!][Ff]irstword43311[*!][Ss]econdword11334
[*!][Ff]irstword43311[*!][Ss]econdword43311
[*!][Ss]econdword11334[*!][Ff]irstword11334
[*!][Ss]econdword11334[*!][Ff]irstword43311
[*!][Ss]econdword43311[*!][Ff]irstword11334
[*!][Ss]econdword43311[*!][Ff]irstword43311

To use them with JtR, you can use this lengthy command-line in bash:

while read mask; do ./john --mask="$mask" passwd; done < masks.txt

or you can do the 8 invocations of JtR manually, substituting the
different masks in there (if so, use single quotes around the masks to
prevent the shell's processing of special characters in there).

You can also choose to optimize for fewer masks, given that the number
of different candidate passwords to test is low anyway (let the computer
waste some time, instead of wasting your own time):

./john --mask='[*!][Ff]irstword[14][13]3[31][41][*!][Ss]econdword[14][13]3[31][41]' passwd
./john --mask='[*!][Ss]econdword[14][13]3[31][41][*!][Ff]irstword[14][13]3[31][41]' passwd

This will test a total of 8192 candidate passwords instead of only 128,
but either is a low number for a computer.

Alexander

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.