Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150815172729.GA14916@openwall.com>
Date: Sat, 15 Aug 2015 20:27:29 +0300
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: dynamic expressions with constants

Hi Jim,

At first, I couldn't get dynamic expressions with constants to work:

[solar@...er run]$ echo -n --qwerty--1234567890-- | sha1sum 
70359e59386b86ac0063855401cc1eb0584392e9  -
[solar@...er run]$ cat pw
70359e59386b86ac0063855401cc1eb0584392e9$qwerty
[solar@...er run]$ echo 1234567890 | ./john --stdin --format=dynamic='sha1($c1.$s.$c1.$p.$c1),$c1=--' pw
Using default input encoding: UTF-8
Loaded 1 password hash (dynamic=sha1($c1.$s.$c1.$p.$c1) [128/128 AVX 4x1])
Warning: no OpenMP support for this hash type, consider --fork=32
Press Ctrl-C to abort, or send SIGUSR1 to john process for status
0g 0:00:00:00  0g/s 9.090p/s 9.090c/s 9.090C/s 1234567890
Session completed

A bug?  Also:

[solar@...er run]$ echo 1234567890 | ./john --stdin --format=dynamic='sha1($c1.$s.$c1.$p.$c1),$c1=-' pw
Error, a 'blank' constant is not valid.   Line: Const1=
Error parsing section [List.Generic:dynamic_6000]
Error in line 0 file is (null)
Error invalid format dynamic_6000 dynamic=sha1($c1.$s.$c1.$p.$c1): Append Constant function called, but NO constants in the format
Segmentation fault

Looks like the shortest accepted constant string is 2 chars.

And, wow:

[solar@...er run]$ echo 1234567890 | ./john --stdin --format=dynamic='sha1($c1.$s.$c1.$p.$c1),$c1=---' pw
Using default input encoding: UTF-8
Loaded 1 password hash (dynamic=sha1($c1.$s.$c1.$p.$c1) [128/128 AVX 4x1])
Warning: no OpenMP support for this hash type, consider --fork=32
Press Ctrl-C to abort, or send SIGUSR1 to john process for status
1234567890       (?)
1g 0:00:00:00  5.882g/s 5.882p/s 5.882c/s 5.882C/s 1234567890
Use the "--show" option to display all of the cracked passwords reliably
Session completed

And even:

[solar@...er run]$ echo 1234567890 | ./john --stdin --format=dynamic='sha1($c1.$s.$c1.$p.$c1),$c1=x--' pw
Using default input encoding: UTF-8
Loaded 1 password hash (dynamic=sha1($c1.$s.$c1.$p.$c1) [128/128 AVX 4x1])
Warning: no OpenMP support for this hash type, consider --fork=32
Press Ctrl-C to abort, or send SIGUSR1 to john process for status
1234567890       (?)
1g 0:00:00:00  5.882g/s 5.882p/s 5.882c/s 5.882C/s 1234567890
Use the "--show" option to display all of the cracked passwords reliably
Session completed

Looks like the first character of the constant is skipped.

BTW, is there a way to have the dynamic expressions compiler output a
dynamic mode definition, such as for use with existing binary builds of
older jumbo?

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.