[GH-ISSUE #1009] dynamic_17: TS error with ./jtrts.pl -q -type full -random -seed=987180 -passthru="--fork=2" #608

Closed
opened 2026-10-14 03:15:15 +07:00 by bsakaguchi · 10 comments
Owner

Originally created by @frank-dittrich on GitHub (Jan 7, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1009

This is with latest commit, commit e99a574ce6

Author: jfoug <jfoug@cox.net>
Date:   Wed Jan 7 15:30:39 2015 -0600

    phpass: cut/paste coding bug
(master)test $ ./jtrts.pl -random -seed=987180 -q -type dynamic_17
-------------------------------------------------------------------------------
- JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014.  By, Jim Fougeron & others
- Testing:  John the Ripper password cracker, version 1.8.0.2-jumbo-1-bleeding_omp [linux-gnu 64-bit AVX2-autoconf]
--------------------------------------------------------------------------------
form=dynamic_17                   guesses: 1497 -show=1497 0:00:00:16 DONE : Expected count(s) (1500)  [!!!FAILED!!!]
Some tests had Errors. Performed 1 tests.  1 errors                      
Time used was 30 seconds
(master)test $ ./jtrts.pl -random -seed=987180 -q -type PHPass    
-------------------------------------------------------------------------------
- JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014.  By, Jim Fougeron & others
- Testing:  John the Ripper password cracker, version 1.8.0.2-jumbo-1-bleeding_omp [linux-gnu 64-bit AVX2-autoconf]
--------------------------------------------------------------------------------
form=PHPass                       guesses: 1492 -show=1492 0:00:00:16 DONE : Expected count(s) (1500)  [!!!FAILED!!!]
Some tests had Errors. Performed 1 tests.  1 errors                      
Time used was 30 seconds
Originally created by @frank-dittrich on GitHub (Jan 7, 2015). Original GitHub issue: https://github.com/openwall/john/issues/1009 This is with latest commit, commit e99a574ce67085484142a6a9a16abea087dcf281 ``` Author: jfoug <jfoug@cox.net> Date: Wed Jan 7 15:30:39 2015 -0600 phpass: cut/paste coding bug ``` ``` (master)test $ ./jtrts.pl -random -seed=987180 -q -type dynamic_17 ------------------------------------------------------------------------------- - JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014. By, Jim Fougeron & others - Testing: John the Ripper password cracker, version 1.8.0.2-jumbo-1-bleeding_omp [linux-gnu 64-bit AVX2-autoconf] -------------------------------------------------------------------------------- form=dynamic_17 guesses: 1497 -show=1497 0:00:00:16 DONE : Expected count(s) (1500) [!!!FAILED!!!] Some tests had Errors. Performed 1 tests. 1 errors Time used was 30 seconds (master)test $ ./jtrts.pl -random -seed=987180 -q -type PHPass ------------------------------------------------------------------------------- - JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014. By, Jim Fougeron & others - Testing: John the Ripper password cracker, version 1.8.0.2-jumbo-1-bleeding_omp [linux-gnu 64-bit AVX2-autoconf] -------------------------------------------------------------------------------- form=PHPass guesses: 1492 -show=1492 0:00:00:16 DONE : Expected count(s) (1500) [!!!FAILED!!!] Some tests had Errors. Performed 1 tests. 1 errors Time used was 30 seconds ```
bsakaguchi 2026-10-14 03:15:15 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@jfoug commented on GitHub (Jan 7, 2015):

The format is failing. All hashes that fail end with 2 periods.

$ ../run/john -pot=./tst.pot phpass_tst.in --show=left
Warning: detected hash type "phpass", but the string is also recognized as "phpass-opencl"
Use the "--format=phpass-opencl" option to force loading these as that type instead
u26-PHPass:$P$9ZfZssgWN/IHiMUHULJ5EkgpM2qxC..
u49-PHPass:$P$9A2rm4Cnq/PGA9eFEs.xezTy7er7N..
u3-PHPass:$P$9PEBbtJHDMUpBbr9A0t/Ewpp4UyLD..
u27-PHPass:$P$9ocl3nbwTVU/ITR5t1B528DHeITHX..
u59-PHPass:$P$93RgLhzSy.AcLAmboGWME3tsunt3y..
u37-PHPass:$P$9olnm8hlF2/gfJ2enfGIFJyxyMn2G..
u54-PHPass:$P$9zTUywThIJW79A1WBdNrGBVvsAUPj..
u95-PHPass:$P$92I48kOgJZWFrwUyHupOgug7O4tTe..

1492 password hashes cracked, 8 left

This may also be due to the change to the binary() function in dynamic.

<!-- gh-comment-id:69102188 --> @jfoug commented on GitHub (Jan 7, 2015): The format is failing. All hashes that fail end with 2 periods. ``` $ ../run/john -pot=./tst.pot phpass_tst.in --show=left Warning: detected hash type "phpass", but the string is also recognized as "phpass-opencl" Use the "--format=phpass-opencl" option to force loading these as that type instead u26-PHPass:$P$9ZfZssgWN/IHiMUHULJ5EkgpM2qxC.. u49-PHPass:$P$9A2rm4Cnq/PGA9eFEs.xezTy7er7N.. u3-PHPass:$P$9PEBbtJHDMUpBbr9A0t/Ewpp4UyLD.. u27-PHPass:$P$9ocl3nbwTVU/ITR5t1B528DHeITHX.. u59-PHPass:$P$93RgLhzSy.AcLAmboGWME3tsunt3y.. u37-PHPass:$P$9olnm8hlF2/gfJ2enfGIFJyxyMn2G.. u54-PHPass:$P$9zTUywThIJW79A1WBdNrGBVvsAUPj.. u95-PHPass:$P$92I48kOgJZWFrwUyHupOgug7O4tTe.. 1492 password hashes cracked, 8 left ``` This may also be due to the change to the binary() function in dynamic.
Author
Owner

@jfoug commented on GitHub (Jan 7, 2015):

It was the change to dynamic function binary_b64() I switched it from a hard coded load, to a call into base64_convert. Obviously there is a bug in that code, when trailing ... on the end of the input are seen.

<!-- gh-comment-id:69103467 --> @jfoug commented on GitHub (Jan 7, 2015): It was the change to dynamic function binary_b64() I switched it from a hard coded load, to a call into base64_convert. Obviously there is a bug in that code, when trailing ... on the end of the input are seen.
Author
Owner

@frank-dittrich commented on GitHub (Jan 7, 2015):

Should one of those hashes be added to the self tests, so that you easier notice when you break it?
Or is it more likely that next time you break it in a different way? ;)

<!-- gh-comment-id:69104012 --> @frank-dittrich commented on GitHub (Jan 7, 2015): Should one of those hashes be added to the self tests, so that you easier notice when you break it? Or is it more likely that next time you break it in a different way? ;)
Author
Owner

@jfoug commented on GitHub (Jan 7, 2015):

I certainly can add one. I have 'found' a work around, but I need to make sure I get base64_convert code fixed. I 'auto' strip off '.' chars. Part of the problem is getting this crap in canonical format. Sometimes these hashes are padded to even boundarys (i.e. '=' or '.' are padded to odd sized hashes). Other times, these are truncated.

In this case, the '.' are actually needed. If I memset the buffer before running the call to base64_convert, I get proper results. BUT it should get correct results, even without the memset. That is an ugly constraint to place on the origination code.

<!-- gh-comment-id:69104833 --> @jfoug commented on GitHub (Jan 7, 2015): I certainly can add one. I have 'found' a work around, but I need to make sure I get base64_convert code fixed. I 'auto' strip off '.' chars. Part of the problem is getting this crap in canonical format. Sometimes these hashes are padded to even boundarys (i.e. '=' or '.' are padded to odd sized hashes). Other times, these are truncated. In this case, the '.' are actually needed. If I memset the buffer before running the call to base64_convert, I get proper results. BUT it should get correct results, even without the memset. That is an ugly constraint to place on the origination code.
Author
Owner

@jfoug commented on GitHub (Jan 7, 2015):

One big difference between mime and crypt base64, is mime uses a character that is totally OUT of play, the = character for padding. However, for crypt, padding is done with a valid character (the 6-bit 0 character which is the '.' ) It makes knowing the 'proper' thing to do, a little harder.

<!-- gh-comment-id:69105117 --> @jfoug commented on GitHub (Jan 7, 2015): One big difference between mime and crypt base64, is mime uses a character that is totally OUT of play, the = character for padding. However, for crypt, padding is done with a valid character (the 6-bit 0 character which is the '.' ) It makes knowing the 'proper' thing to do, a little harder.
Author
Owner

@jfoug commented on GitHub (Jan 7, 2015):

This 'has' to be made to work, and does not:

$ ../run/base64conv -i hex -o crypt 000000
000000  -->  ....

$ ../run/base64conv -o hex -i crypt ....
....  -->  00
<!-- gh-comment-id:69106104 --> @jfoug commented on GitHub (Jan 7, 2015): This 'has' to be made to work, and does not: ``` $ ../run/base64conv -i hex -o crypt 000000 000000 --> .... $ ../run/base64conv -o hex -i crypt .... .... --> 00 ```
Author
Owner

@jfoug commented on GitHub (Jan 7, 2015):

Ok, i have a change, and now I get this:

$ ../run/base64conv -i hex -o crypt 00000000
00000000  -->  ......

$ ../run/base64conv -o hex -i crypt ......
......  -->  00000000

BUT, I want to run the full base64 test suite I have. I know I have made changes before, and things had serious problems on the TS. Also, I need to get some of these 'goodies' into my TS.

<!-- gh-comment-id:69106907 --> @jfoug commented on GitHub (Jan 7, 2015): Ok, i have a change, and now I get this: ``` $ ../run/base64conv -i hex -o crypt 00000000 00000000 --> ...... $ ../run/base64conv -o hex -i crypt ...... ...... --> 00000000 ``` BUT, I want to run the full base64 test suite I have. I know I have made changes before, and things had serious problems on the TS. Also, I need to get some of these 'goodies' into my TS.
Author
Owner

@jfoug commented on GitHub (Jan 7, 2015):

I have added the base64 TS script to the jtrts project.

Also, I added 'null' data checking to the script. With the changes I have made, the TS still is happy, AND the NULL test is working properly. I will be checking in things shortly.

<!-- gh-comment-id:69109809 --> @jfoug commented on GitHub (Jan 7, 2015): I have added the base64 TS script to the jtrts project. Also, I added 'null' data checking to the script. With the changes I have made, the TS still is happy, AND the NULL test is working properly. I will be checking in things shortly.
Author
Owner

@jfoug commented on GitHub (Jan 7, 2015):

Please do your magic against 3b96c50

It passes jtr self test, it passes the base64_conv self test and dyna_17/phpass is still happy (as is the new dynamic_1032, which the switch into base64_conv was originally done for).

<!-- gh-comment-id:69110485 --> @jfoug commented on GitHub (Jan 7, 2015): Please do your magic against 3b96c50 It passes jtr self test, it passes the base64_conv self test and dyna_17/phpass is still happy (as is the new dynamic_1032, which the switch into base64_conv was originally done for).
Author
Owner

@jfoug commented on GitHub (Jan 7, 2015):

@frank-dittrich if you think this is fixed, then close this task. I am out for a while.

<!-- gh-comment-id:69110700 --> @jfoug commented on GitHub (Jan 7, 2015): @frank-dittrich if you think this is fixed, then close this task. I am out for a while.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#608
No description provided.