[GH-ISSUE #2225] mscash-utf8 format problems #1483

Closed
opened 2026-10-15 04:18:27 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @frank-dittrich on GitHub (Aug 19, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/2225

Originally assigned to: @frank-dittrich on GitHub.

Sometimes this format fails the ./jtrts.pl tests, sonetimes not.

  (master)test $ for i in `seq 1 10` ; do ./jtrts.pl -q -stoponerror mscash-utf8; done
-------------------------------------------------------------------------------
- JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014.  By, Jim Fougeron & others
- Testing:  John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac]
--------------------------------------------------------------------------------
form=mscash-utf8                  guesses:    0 -show=   0 N/A N/A : Expected count(s) (1500)  [!!!FAILED2!!! ret_val=256 exited, return code 1]
Self test failed (Could not find salt in db - salt() return inconsistent?)
grep: tst-.log: No such file or directory
-------------------------------------------------------------------------------
- JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014.  By, Jim Fougeron & others
- Testing:  John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac]
--------------------------------------------------------------------------------
form=mscash-utf8                  guesses:    0 -show=   0 N/A N/A : Expected count(s) (1500)  [!!!FAILED2!!! ret_val=256 exited, return code 1]
Self test failed (Could not find salt in db - salt() return inconsistent?)
grep: tst-.log: No such file or directory
-------------------------------------------------------------------------------
- JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014.  By, Jim Fougeron & others
- Testing:  John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac]
--------------------------------------------------------------------------------
All tests passed without error.  Performed 1 tests.  Time used was 1 seconds            
-------------------------------------------------------------------------------
- JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014.  By, Jim Fougeron & others
- Testing:  John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac]
--------------------------------------------------------------------------------
All tests passed without error.  Performed 1 tests.  Time used was 1 seconds            
-------------------------------------------------------------------------------
- JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014.  By, Jim Fougeron & others
- Testing:  John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac]
--------------------------------------------------------------------------------
.pot CHK:mscash-utf8              guesses:    0 -show=   0 N/A N/A : Expected count(s) (1500)  [!!!FAILED4!!!   ret_val=0]  (0 val-pwd  1 inval-pwd)
grep: tst-.log: No such file or directory
-------------------------------------------------------------------------------
- JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014.  By, Jim Fougeron & others
- Testing:  John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac]
--------------------------------------------------------------------------------
.pot CHK:mscash-utf8              guesses:    0 -show=   0 N/A N/A : Expected count(s) (1500)  [!!!FAILED4!!!   ret_val=0]  (0 val-pwd  1 inval-pwd)
grep: tst-.log: No such file or directory
-------------------------------------------------------------------------------
- JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014.  By, Jim Fougeron & others
- Testing:  John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac]
--------------------------------------------------------------------------------
All tests passed without error.  Performed 1 tests.  Time used was 1 seconds            
-------------------------------------------------------------------------------
- JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014.  By, Jim Fougeron & others
- Testing:  John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac]
--------------------------------------------------------------------------------
All tests passed without error.  Performed 1 tests.  Time used was 1 seconds            
-------------------------------------------------------------------------------
- JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014.  By, Jim Fougeron & others
- Testing:  John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac]
--------------------------------------------------------------------------------
.pot CHK:mscash-utf8              guesses:    0 -show=   0 N/A N/A : Expected count(s) (1500)  [!!!FAILED4!!!   ret_val=0]  (0 val-pwd  1 inval-pwd)
grep: tst-.log: No such file or directory
-------------------------------------------------------------------------------
- JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014.  By, Jim Fougeron & others
- Testing:  John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac]
--------------------------------------------------------------------------------
.pot CHK:mscash-utf8              guesses:    0 -show=   0 N/A N/A : Expected count(s) (1500)  [!!!FAILED4!!!   ret_val=0]  (0 val-pwd  1 inval-pwd)
grep: tst-.log: No such file or directory

If it fails, it is probably due to

$ rm tst-.pot ; ../run/john -ses=tst-  -nolog -pot=tst-.pot mscash_tst_utf8.in --wordlist=pw-utf8.dic -form=mscash -encoding=utf8 -internal-codepage=utf8; echo $?
Loaded 1500 password hashes with 39 different salts (mscash, MS Cache Hash (DCC) [MD4 32/64])
mscash1: One or more hashes rejected due to salt length limitation
Self test failed (Could not find salt in db - salt() return inconsistent?)
1

Sometimes the self test fails, sometimes it doesn't.

(master)test $ ../run/john --list=build-info 
Version: 1.8.0.6-jumbo-1-2498-gf4352ad
Build: linux-gnu 64-bit AVX-ac
SIMD: AVX, interleaving: MD4:3 MD5:3 SHA1:1 SHA256:1 SHA512:1
$JOHN is ../run/
Format interface version: 14
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
SALT_HASH_SIZE: 1048576
Max. Markov mode level: 400
Max. Markov mode password length: 30
gcc version: 6.1.1
GNU libc version: 2.23 (loaded: 2.23)
Crypto library: OpenSSL
OpenSSL library version: 01000208f
OpenSSL 1.0.2h-fips  3 May 2016
GMP library version: 6.1.1
File locking: fcntl()
fseek(): fseek
ftell(): ftell
fopen(): fopen
memmem(): System's
Originally created by @frank-dittrich on GitHub (Aug 19, 2016). Original GitHub issue: https://github.com/openwall/john/issues/2225 Originally assigned to: @frank-dittrich on GitHub. Sometimes this format fails the ./jtrts.pl tests, sonetimes not. ``` (master)test $ for i in `seq 1 10` ; do ./jtrts.pl -q -stoponerror mscash-utf8; done ------------------------------------------------------------------------------- - JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014. By, Jim Fougeron & others - Testing: John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac] -------------------------------------------------------------------------------- form=mscash-utf8 guesses: 0 -show= 0 N/A N/A : Expected count(s) (1500) [!!!FAILED2!!! ret_val=256 exited, return code 1] Self test failed (Could not find salt in db - salt() return inconsistent?) grep: tst-.log: No such file or directory ------------------------------------------------------------------------------- - JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014. By, Jim Fougeron & others - Testing: John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac] -------------------------------------------------------------------------------- form=mscash-utf8 guesses: 0 -show= 0 N/A N/A : Expected count(s) (1500) [!!!FAILED2!!! ret_val=256 exited, return code 1] Self test failed (Could not find salt in db - salt() return inconsistent?) grep: tst-.log: No such file or directory ------------------------------------------------------------------------------- - JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014. By, Jim Fougeron & others - Testing: John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac] -------------------------------------------------------------------------------- All tests passed without error. Performed 1 tests. Time used was 1 seconds ------------------------------------------------------------------------------- - JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014. By, Jim Fougeron & others - Testing: John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac] -------------------------------------------------------------------------------- All tests passed without error. Performed 1 tests. Time used was 1 seconds ------------------------------------------------------------------------------- - JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014. By, Jim Fougeron & others - Testing: John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac] -------------------------------------------------------------------------------- .pot CHK:mscash-utf8 guesses: 0 -show= 0 N/A N/A : Expected count(s) (1500) [!!!FAILED4!!! ret_val=0] (0 val-pwd 1 inval-pwd) grep: tst-.log: No such file or directory ------------------------------------------------------------------------------- - JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014. By, Jim Fougeron & others - Testing: John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac] -------------------------------------------------------------------------------- .pot CHK:mscash-utf8 guesses: 0 -show= 0 N/A N/A : Expected count(s) (1500) [!!!FAILED4!!! ret_val=0] (0 val-pwd 1 inval-pwd) grep: tst-.log: No such file or directory ------------------------------------------------------------------------------- - JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014. By, Jim Fougeron & others - Testing: John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac] -------------------------------------------------------------------------------- All tests passed without error. Performed 1 tests. Time used was 1 seconds ------------------------------------------------------------------------------- - JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014. By, Jim Fougeron & others - Testing: John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac] -------------------------------------------------------------------------------- All tests passed without error. Performed 1 tests. Time used was 1 seconds ------------------------------------------------------------------------------- - JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014. By, Jim Fougeron & others - Testing: John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac] -------------------------------------------------------------------------------- .pot CHK:mscash-utf8 guesses: 0 -show= 0 N/A N/A : Expected count(s) (1500) [!!!FAILED4!!! ret_val=0] (0 val-pwd 1 inval-pwd) grep: tst-.log: No such file or directory ------------------------------------------------------------------------------- - JtR-TestSuite (jtrts). Version 1.13, Dec 21, 2014. By, Jim Fougeron & others - Testing: John the Ripper 1.8.0.6-jumbo-1-2498-gf4352ad [linux-gnu 64-bit AVX-ac] -------------------------------------------------------------------------------- .pot CHK:mscash-utf8 guesses: 0 -show= 0 N/A N/A : Expected count(s) (1500) [!!!FAILED4!!! ret_val=0] (0 val-pwd 1 inval-pwd) grep: tst-.log: No such file or directory ``` If it fails, it is probably due to ``` $ rm tst-.pot ; ../run/john -ses=tst- -nolog -pot=tst-.pot mscash_tst_utf8.in --wordlist=pw-utf8.dic -form=mscash -encoding=utf8 -internal-codepage=utf8; echo $? Loaded 1500 password hashes with 39 different salts (mscash, MS Cache Hash (DCC) [MD4 32/64]) mscash1: One or more hashes rejected due to salt length limitation Self test failed (Could not find salt in db - salt() return inconsistent?) 1 ``` Sometimes the self test fails, sometimes it doesn't. ``` (master)test $ ../run/john --list=build-info Version: 1.8.0.6-jumbo-1-2498-gf4352ad Build: linux-gnu 64-bit AVX-ac SIMD: AVX, interleaving: MD4:3 MD5:3 SHA1:1 SHA256:1 SHA512:1 $JOHN is ../run/ Format interface version: 14 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 SALT_HASH_SIZE: 1048576 Max. Markov mode level: 400 Max. Markov mode password length: 30 gcc version: 6.1.1 GNU libc version: 2.23 (loaded: 2.23) Crypto library: OpenSSL OpenSSL library version: 01000208f OpenSSL 1.0.2h-fips 3 May 2016 GMP library version: 6.1.1 File locking: fcntl() fseek(): fseek ftell(): ftell fopen(): fopen memmem(): System's ```
Author
Owner

@frank-dittrich commented on GitHub (Aug 19, 2016):

With -passthru=--skip-self-tests added, the test suite doesn't find any errors.

<!-- gh-comment-id:240994861 --> @frank-dittrich commented on GitHub (Aug 19, 2016): With `-passthru=--skip-self-tests` added, the test suite doesn't find any errors.
Author
Owner

@jfoug commented on GitHub (Aug 21, 2016):

I think the bug was we were using the wrong length for tag_length (using DCC2 not M$). Thus any user name < 5 was failing in utf8 checking mode, since it was getting a negative number!

<!-- gh-comment-id:241283938 --> @jfoug commented on GitHub (Aug 21, 2016): I think the bug was we were using the wrong length for tag_length (using $DCC2$ not M$). Thus any user name < 5 was failing in utf8 checking mode, since it was getting a negative number!
Author
Owner

@jfoug commented on GitHub (Aug 21, 2016):

This bug was originally hidden, until I got TAG2_LENGTH 'fixed'. Then this bug showed up.

<!-- gh-comment-id:241283991 --> @jfoug commented on GitHub (Aug 21, 2016): This bug was originally hidden, until I got TAG2_LENGTH 'fixed'. Then this bug showed up.
Author
Owner

@frank-dittrich commented on GitHub (Aug 21, 2016):

fixed, thanks.

<!-- gh-comment-id:241289534 --> @frank-dittrich commented on GitHub (Aug 21, 2016): fixed, thanks.
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#1483
No description provided.