Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150822182220.GA10612@openwall.com>
Date: Sat, 22 Aug 2015 21:22:20 +0300
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: testing every index (Re: more robustness)

On Sun, Aug 23, 2015 at 12:00:19AM +0800, Kai Zhao wrote:
> There are 3 formats have fatal errors: "cmp_exact() unexpected success"
> 
> 1. AFS
> 
> static struct fmt_tests tests[] = {
> 0        {"$K4$e35e9294ecef926d,0123", "U*U*U*U*"},
> 1        {"$K4$64c7c2aedccd70d6,0123456789", "U*U***U*"},
> 2        {"$K4$d9e985b36268f168,01234567", "U*U***U"},
> 3        {"$K4$b9615786dfb53297,longcellname", "longpassword"},
> 4        {"$K4$a8dc8aeaa2c48a97,", ""},
> 5        {"$K4$dfda85c7619183a2,XXXXXXXX", "XXXXXXXX"},
> 6        {"$K4$e3e59de6f1d5eaf4,cell", "password355"},
> 7        {"$K4$b02cc24aefbc865b,", "thisisaverylongpassword"},
>           {NULL}
> };
> 
> When testing the 4th test vector, "" is correct password, but
> the cmp_exact()  returns 1 when incorrect password is
> "XXXXXXXX" which is the 5th plaintext.
> 
> Both "" and "XXXXXXXX" are the correct passwords ?

I didn't expect this, but it seems so.  As a test (and only as a test),
I've just tried adding FMT_NOT_EXACT to this format, and using it to
crack that password.  Here's what I am getting:

[solar@...er run]$ cat pw
$K4$a8dc8aeaa2c48a97,
[solar@...er run]$ ./john pw
Using default input encoding: UTF-8
Loaded 1 password hash (AFS, Kerberos AFS [DES 48/64 4K])
Warning: no OpenMP support for this hash type, consider --fork=32
Note: This format may emit false positives, so it will keep trying even after
finding a possible candidate.
Press 'q' or Ctrl-C to abort, almost any other key for status
                 (?)
XXXXXX           (?)
XXXXXXXX         (?)
XXXX             (?)
XXX              (?)
                 (?)
X                (?)

(interrupted here).  And also:

[solar@...er run]$ ./john -ext=repeats pw
Warning: external mode 'repeats' can't be resumed if aborted
Using default input encoding: UTF-8
Loaded 1 password hash (AFS, Kerberos AFS [DES 48/64 4K])
Warning: no OpenMP support for this hash type, consider --fork=32
Note: This format may emit false positives, so it will keep trying even after
finding a possible candidate.
Press 'q' or Ctrl-C to abort, almost any other key for status
X                (?)
ь                 (?)
XX               (?)
ьь                (?)
XXX              (?)
ььь                (?)
XXXX             (?)
ьььь               (?)
XXXXX            (?)
ььььь               (?)
XXXXXX           (?)
ьььььь              (?)
XXXXXXX          (?)
ььььььь              (?)
XXXXXXXX         (?)
ьььььььь             (?)
16g 0:00:00:00 DONE (2015-08-22 21:15) 59.25g/s 103703p/s 103703c/s 103703C/s ══
═════════════════════════════════════════════════════════════..ЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪ
ЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪЪ
Session completed

So it looks like any repeats of 'X' (which is '\x58') or '\xd8', up to
length 8, produce the same hash as the empty string does.

If you re-order the test vectors, e.g. swap 5 and 7, will this hide this
unusual property from your current test?  If so, maybe do that (even
though it's very nice your test let us know of this property now).

Thanks,

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.