[GH-ISSUE #951] HDAA format will not dupe remove same salts. #552

Closed
opened 2026-10-14 03:12:56 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @jfoug on GitHub (Dec 25, 2014).
Original GitHub issue: https://github.com/openwall/john/issues/951

I have not checked this for sure, BUT looking at this, it allocates an array that holds each of the fields, then allocated into those fields, and that is part of the salt. No way would this detect dupe salts.

This should either be a dyna salt, or better yet, the 12 fields (if needed), should be inline fixed sized char buffers, so the salt logic works properly.

Originally created by @jfoug on GitHub (Dec 25, 2014). Original GitHub issue: https://github.com/openwall/john/issues/951 I have not checked this for sure, BUT looking at this, it allocates an array that holds each of the fields, then allocated into those fields, and that is part of the salt. No way would this detect dupe salts. This should either be a dyna salt, or better yet, the 12 fields (if needed), should be inline fixed sized char buffers, so the salt logic works properly.
bsakaguchi 2026-10-14 03:12:56 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@jfoug commented on GitHub (Dec 26, 2014):

$ cat pw
test
test1
test2
test3
test4
test5

$ cat hdaa_salt_dupe.in
#!comment: Built with pass_gen.pl using RAW mode, 0 to 128 characters dict file=unknown
u0-HDAA:$response$1f229972c55f0f0ab89ebf12337eb8fc$fixed_data$fixed_data$GET$/fixed_data$0000000000000000000000000000000$00000001$11111111111111111111111111111111$auth:0:0:test::
u1-HDAA:$response$d8f6581826d2b74d90155b295411d5de$fixed_data$fixed_data$GET$/fixed_data$0000000000000000000000000000000$00000001$11111111111111111111111111111111$auth:1:0:test1::
u2-HDAA:$response$d631bfb3fdc01fef8abed72b2d39abd7$fixed_data$fixed_data$GET$/fixed_data$0000000000000000000000000000000$00000001$11111111111111111111111111111111$auth:2:0:test2::
u3-HDAA:$response$4b9af418bbd49c83c026ff0ed36816b0$fixed_data$fixed_data$GET$/fixed_data$0000000000000000000000000000000$00000001$11111111111111111111111111111111$auth:3:0:test3::
u4-HDAA:$response$880fdc1172f7225be636d56a7b82fdea$fixed_data$fixed_data$GET$/fixed_data$0000000000000000000000000000000$00000001$11111111111111111111111111111111$auth:4:0:test4::
u5-HDAA:$response$c316502685a8d145d8428e07870b43af$fixed_data$fixed_data$GET$/fixed_data$0000000000000000000000000000000$00000001$11111111111111111111111111111111$auth:5:0:test5::

Before fix:

$ ../run/john hdaa_salt_dupe.in -w=pw -pot=./tst.pot
Loaded 6 password hashes with 6 different salts (hdaa, HTTP Digest access authentication [MD5 128/128 XOP 8x])
Will run 4 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
test5            (u5-HDAA)
test4            (u4-HDAA)
test3            (u3-HDAA)
test2            (u2-HDAA)
test1            (u1-HDAA)
test             (u0-HDAA)
6g 0:00:00:00 DONE (2014-12-26 03:38) 545.4g/s 545.4p/s 3272c/s 3272C/s test..test5
Use the "--show" option to display all of the cracked passwords reliably
Session completed

After fix:

$ rm tst.pot

$ ../run/john hdaa_salt_dupe.in -w=pw -pot=./tst.pot
Loaded 6 password hashes with no different salts (hdaa, HTTP Digest access authentication [MD5 128/128 XOP 8x])
Will run 4 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
test             (u0-HDAA)
test1            (u1-HDAA)
test2            (u2-HDAA)
test3            (u3-HDAA)
test4            (u4-HDAA)
test5            (u5-HDAA)
6g 0:00:00:00 DONE (2014-12-26 03:40) 600.0g/s 600.0p/s 600.0c/s 3600C/s test..test5
Use the "--show" option to display all of the cracked passwords reliably
Session completed

This format was allocating an array of pointers, then allocating a buffer for each of those (each element), and putting that into the salt. NONE of that data was being used. All the data 'used' is pre-computed and put into the 3 fixed sized fields. SO proper salt dupe removal was simply removing that extra stuff from being stored in the salt.

<!-- gh-comment-id:68133692 --> @jfoug commented on GitHub (Dec 26, 2014): ``` $ cat pw test test1 test2 test3 test4 test5 $ cat hdaa_salt_dupe.in #!comment: Built with pass_gen.pl using RAW mode, 0 to 128 characters dict file=unknown u0-HDAA:$response$1f229972c55f0f0ab89ebf12337eb8fc$fixed_data$fixed_data$GET$/fixed_data$0000000000000000000000000000000$00000001$11111111111111111111111111111111$auth:0:0:test:: u1-HDAA:$response$d8f6581826d2b74d90155b295411d5de$fixed_data$fixed_data$GET$/fixed_data$0000000000000000000000000000000$00000001$11111111111111111111111111111111$auth:1:0:test1:: u2-HDAA:$response$d631bfb3fdc01fef8abed72b2d39abd7$fixed_data$fixed_data$GET$/fixed_data$0000000000000000000000000000000$00000001$11111111111111111111111111111111$auth:2:0:test2:: u3-HDAA:$response$4b9af418bbd49c83c026ff0ed36816b0$fixed_data$fixed_data$GET$/fixed_data$0000000000000000000000000000000$00000001$11111111111111111111111111111111$auth:3:0:test3:: u4-HDAA:$response$880fdc1172f7225be636d56a7b82fdea$fixed_data$fixed_data$GET$/fixed_data$0000000000000000000000000000000$00000001$11111111111111111111111111111111$auth:4:0:test4:: u5-HDAA:$response$c316502685a8d145d8428e07870b43af$fixed_data$fixed_data$GET$/fixed_data$0000000000000000000000000000000$00000001$11111111111111111111111111111111$auth:5:0:test5:: ``` Before fix: ``` $ ../run/john hdaa_salt_dupe.in -w=pw -pot=./tst.pot Loaded 6 password hashes with 6 different salts (hdaa, HTTP Digest access authentication [MD5 128/128 XOP 8x]) Will run 4 OpenMP threads Press 'q' or Ctrl-C to abort, almost any other key for status test5 (u5-HDAA) test4 (u4-HDAA) test3 (u3-HDAA) test2 (u2-HDAA) test1 (u1-HDAA) test (u0-HDAA) 6g 0:00:00:00 DONE (2014-12-26 03:38) 545.4g/s 545.4p/s 3272c/s 3272C/s test..test5 Use the "--show" option to display all of the cracked passwords reliably Session completed ``` After fix: ``` $ rm tst.pot $ ../run/john hdaa_salt_dupe.in -w=pw -pot=./tst.pot Loaded 6 password hashes with no different salts (hdaa, HTTP Digest access authentication [MD5 128/128 XOP 8x]) Will run 4 OpenMP threads Press 'q' or Ctrl-C to abort, almost any other key for status test (u0-HDAA) test1 (u1-HDAA) test2 (u2-HDAA) test3 (u3-HDAA) test4 (u4-HDAA) test5 (u5-HDAA) 6g 0:00:00:00 DONE (2014-12-26 03:40) 600.0g/s 600.0p/s 600.0c/s 3600C/s test..test5 Use the "--show" option to display all of the cracked passwords reliably Session completed ``` This format was allocating an array of pointers, then allocating a buffer for each of those (each element), and putting that into the salt. NONE of that data was being used. All the data 'used' is pre-computed and put into the 3 fixed sized fields. SO proper salt dupe removal was simply removing that extra stuff from being stored in the salt.
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#552
No description provided.