Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55B25077.6080408@gmail.com>
Date: Fri, 24 Jul 2015 16:49:27 +0200
From: Marek Wrzosek <marek.wrzosek@...il.com>
To: john-users@...ts.openwall.com
Subject: Re: Using regex with wordlist (or loopback) and rules

W dniu 24.07.2015 o 16:36, Marek Wrzosek pisze:
> W dniu 24.07.2015 o 16:19, Marek Wrzosek pisze:
>> W dniu 24.07.2015 o 00:55, Frank Dittrich pisze:
>>> Hi Marek,
>>>
>>> On 07/23/2015 07:30 PM, Marek Wrzosek wrote:
>>>> Rules are not working with wordlist/loopback when regex is in use. Is it
>>>> by design or not?
>>>
>>> May be you should post enough information for others to reproduce your
>>> problem.
>>> I can use --rules and --regex without any obvious problems.
>>>
>>>
>>> (bleeding-jumbo)run $ cat pw
>>> abc
>>> def
>>> 1234
>>> (bleeding-jumbo)run $ head -n 5 john.local.conf
>>> [List.Rules:fdtest]
>>> r
>>> f
>>> d
>>>
>>> (bleeding-jumbo)run $ ./john --wordlist=pw --rules=fdtest --stdout
>>> --regex="\0-\0"
>>> cba-cba
>>> fed-fed
>>> 4321-4321
>>> abccba-abccba
>>> deffed-deffed
>>> 12344321-12344321
>>> abcabc-abcabc
>>> defdef-defdef
>>> 12341234-12341234
>>> 9p 0:00:00:00 100.00% (2015-07-24 00:46) 69.23p/s 12341234-12341234
>>> (bleeding-jumbo)run $ ./john --wordlist=pw --rules=nt --stdout
>>> --regex="\0-\0"
>>> abc-abc
>>> def-def
>>> 1234-1234
>>> Abc-Abc
>>> Def-Def
>>> aBc-aBc
>>> dEf-dEf
>>> ABc-ABc
>>> DEf-DEf
>>> abC-abC
>>> deF-deF
>>> aBC-aBC
>>> dEF-dEF
>>> AbC-AbC
>>> DeF-DeF
>>> ABC-ABC
>>> DEF-DEF
>>> 17p 0:00:00:00 100.00% (2015-07-24 00:47) 113.3p/s DEF-DEF
>>> (bleeding-jumbo)run $ ./john --list=build-info
>>> Version: 1.8.0.6-jumbo-1-520-gbdd0bd2
>>> Build: linux-gnu 64-bit AVX-ac
>>> SIMD: AVX, interleaving: MD4:3 MD5:3 SHA1:1 SHA256:1 SHA512:1
>>> $JOHN is ./
>>> Format interface version: 13
>>> Max. number of reported tunable costs: 3
>>> Rec file version: REC4
>>> Charset file version: CHR3
>>> CHARSET_MIN: 1 (0x01)
>>> CHARSET_MAX: 255 (0xff)
>>> CHARSET_LENGTH: 24
>>> Max. Markov mode level: 400
>>> Max. Markov mode password length: 30
>>> gcc version: 5.1.1
>>> GNU libc version: 2.21 (loaded: 2.21)
>>> Crypto library: OpenSSL
>>> OpenSSL library version: 0100010bf
>>> OpenSSL 1.0.1k-fips 8 Jan 2015
>>> GMP library version: 6.0.0
>>> Regex library version: 1.2	(loaded: 1.2.6)
>>> File locking: fcntl()
>>> fseek(): fseek
>>> ftell(): ftell
>>> fopen(): fopen
>>> memmem(): System's
>>>
>>>
>>> As you can see, I used the 1.2.6 branch of rexgen (since Jan fixed some
>>> memleak issues in that branch).
>>>
>>> But my rexgen was build end of June, with this commit as the lastest commit:
>>> commit fb85f570011b249cf6f0351756e9495d4d0e4161
>>> Author: Jan Starke <jan.starke@...foebd.org>
>>> Date:   Tue Jun 23 22:25:54 2015 +0200
>>>
>>>     add return value to CaseIterator::next()
>>>
>>>
>>> Frank
>>>
>> I've pulled the newest bleeding-jumbo from github and I can't reproduce
>> this now, maybe it was fine back then... I'm using librexgen 1.2.5 and
>> now it suffers memory leak when cracking md5 hashes (--fork is only
>> speeding up that process). To use 1.2.6 I need to run 'git checkout
>> 1.2.6' before running install.sh, right?
>>
> After:
> $ git checkout 1.2.6
> $ cd src
> $ ./install.sh
> inside rexgen dir.
> 
> And then rebuilding john ends up with this:
> $ make -sj4
> regex.c: In function ‘do_regex_crack_as_rules’:
> regex.c:111:2: error: unknown type name ‘charset’
> regex.c:111:21: error: ‘CHARSET_UTF8’ undeclared (first use in this
> function)
> regex.c:111:21: note: each undeclared identifier is reported only once
> for each function it appears in
> regex.c:165:2: warning: passing argument 3 of ‘c_regex_iterator_cb’
> makes pointer from integer without a cast [enabled by default]
> In file included from regex.h:36:0,
>                  from regex.c:12:
> /usr/local/include/librexgen/c/iterator.h:40:16: note: expected
> ‘callback_fp’ but argument is of type ‘int’
> regex.c:165:2: error: too many arguments to function ‘c_regex_iterator_cb’
> In file included from regex.h:36:0,
>                  from regex.c:12:
> /usr/local/include/librexgen/c/iterator.h:40:16: note: declared here
> regex.c:172:3: warning: implicit declaration of function
> ‘c_simplestring_to_binary_string’ [-Wimplicit-function-declaration]
> regex.c: In function ‘do_regex_crack’:
> regex.c:190:2: error: unknown type name ‘charset’
> regex.c:190:21: error: ‘CHARSET_UTF8’ undeclared (first use in this
> function)
> regex.c:203:2: warning: passing argument 3 of ‘c_regex_iterator_cb’
> makes pointer from integer without a cast [enabled by default]
> In file included from regex.h:36:0,
>                  from regex.c:12:
> /usr/local/include/librexgen/c/iterator.h:40:16: note: expected
> ‘callback_fp’ but argument is of type ‘int’
> regex.c:203:2: error: too many arguments to function ‘c_regex_iterator_cb’
> In file included from regex.h:36:0,
>                  from regex.c:12:
> /usr/local/include/librexgen/c/iterator.h:40:16: note: declared here
> make[1]: *** [regex.o] Błąd 1
> make[1]: *** Oczekiwanie na niezakończone zadania....
> make: *** [default] Błąd 2
> 
> What am I doing wrong?
> 
After 'git checkout master' and rebuilding everything (even removing
header files from /usr/local/include/librexgen before running
install.sh) I can't even build john with librexgen 1.2.5.
$ make -sj4
/usr/bin/ar: creating aes.a
regex.o: In function `do_regex_crack_as_rules':
/home/marek/poligon/john-bleeding/JohnTheRipper/src/regex.c:172:
undefined reference to `c_simplestring_to_binary_string'
regex.o: In function `do_regex_crack':
/home/marek/poligon/john-bleeding/JohnTheRipper/src/regex.c:210:
undefined reference to `c_simplestring_to_binary_string'
collect2: error: ld returned 1 exit status
make[1]: *** [../run/john] Błąd 1
make: *** [default] Błąd 2

-- 
Marek Wrzosek
marek.wrzosek@...il.com

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.