Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 12 May 2019 23:25:14 +0300
From: Aleksey Cherepanov <lyosha@...nwall.com>
To: john-users@...ts.openwall.com
Subject: Re: team john-users write-up for CracktheCon contest at CypherCon 2019

Aleksey Cherepanov <lyosha@...nwall.com> writes:
> Duplicate character 3 times for every position, for positions 0-35:
[...]
> Just to demonstrate endless possibilities of rules, there is the same
> rule for positions 0-124, i.e. up to max length (but position 124 is not
> meaningful for duplication):
> $ echo 123 | john --pipe --stdout 2>/dev/null \
>   --rules=': vc0V vccV vd0c vccV vc0c vb0[0Vdc] va[0-9A-V]b >a Xa1a Xa1a'
> 11123
> 12223
> 12333

Minor mistake in this rule: there is 1 position overlap between internal
packs (e.g. 0+V vs V+0), but sequential dupe suppression hides it, so
there are no dupes during hashing.

So the rule should be the following:
--rules=': vc0V vccV vd0c vccV vc0c vb0[0Vdc] va[0-9A-U]b >a Xa1a Xa1a'

The change is 'U' in 'va[0-9A-U]b'.

It covers positions 0-123.


To debug manipulations on variables, I used the following command:
$ python -c "print '_' * 125" | john 2>/dev/null --pipe --stdout \
  --rules=': ... oaA' \
  | perl -pe 's/^(_*)A_*$/length $1/e'

Positions 0-30:  va[0-9A-U]0

Positions 31-61: vb0V va[0-9A-U]b

Merge the ranges using preprocessor:
Positions 0-61:  vb0[0V] va[0-9A-U]b

Positions 62-92: vc0V vccV vd0c vb0d va[0-9A-U]b

Positions 0-92:  vc0V vccV vd0c vb0[0Vd] va[0-9A-U]b

Positions 93-123: vc0V vccV vd0c vccV vc0c vb0c va[0-9A-U]b

Positions 0-123: vc0V vccV vd0c vccV vc0c vb0[0Vdc] va[0-9A-U]b

So there are base values 0, 31, 62 and 93. All base values are computed
in every rule (after preprocessing), but only one value is used. Then
0-30 is added.

Lack of gaps may be checked with the following additional command in the
pipe:
... | perl -ne 'print "failure\n" if $. != $_ + 1'

Thanks!

--
Regards,
Aleksey Cherepanov

Powered by blists - more mailing lists

Your e-mail address:

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