[GH-ISSUE #2305] Possible --user and --salt problems #1540

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

Originally created by @magnumripper on GitHub (Oct 12, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/2305

I believe we have some fairly new problems with eg. --user and --salt. I'm not sure about the details nor the cause. We need to test things.

IIRC I've seen segfaults or weird output with things like "--show --user=xx" and plain cracking with "--user=xx" or "--salt=n".

Originally created by @magnumripper on GitHub (Oct 12, 2016). Original GitHub issue: https://github.com/openwall/john/issues/2305 I believe we have some fairly new problems with eg. --user and --salt. I'm not sure about the details nor the cause. We need to test things. IIRC I've seen segfaults or weird output with things like "--show --user=xx" and plain cracking with "--user=xx" or "--salt=n".
Author
Owner

@magnumripper commented on GitHub (Oct 12, 2016):

The problem(s) may be limited to gpu-side compare (gpu-side mask) formats:

$ ../run/john scraped.sam -form:nt-opencl -mask:?a
Device 2: GeForce GT 650M
Using default input encoding: UTF-8
Loaded 5294 password hashes with no different salts (nt-opencl, NT [MD4 OpenCL])
Remaining 5287 password hashes with no different salts
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:02  0g/s 37.69p/s 37.69c/s 199311C/s #
Session completed

$ ../run/john scraped.sam -form:nt -mask:?a -user:500
Using default input encoding: UTF-8
Loaded 28 password hashes with no different salts (NT [MD4 128/128 AVX 4x3])
Remaining 23 password hashes with no different salts
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:00 N/A 0g/s 9500p/s 9500c/s 218500C/s "..|
Session completed

$ ../run/john scraped.sam -form:nt-opencl -mask:?a -user:500
Device 2: GeForce GT 650M
Using default input encoding: UTF-8
Loaded 28 password hashes with no different salts (nt-opencl, NT [MD4 OpenCL])
Remaining 23 password hashes with no different salts
Segmentation fault: 11
<!-- gh-comment-id:253183697 --> @magnumripper commented on GitHub (Oct 12, 2016): The problem(s) may be limited to gpu-side compare (gpu-side mask) formats: ``` $ ../run/john scraped.sam -form:nt-opencl -mask:?a Device 2: GeForce GT 650M Using default input encoding: UTF-8 Loaded 5294 password hashes with no different salts (nt-opencl, NT [MD4 OpenCL]) Remaining 5287 password hashes with no different salts Press 'q' or Ctrl-C to abort, almost any other key for status 0g 0:00:00:02 0g/s 37.69p/s 37.69c/s 199311C/s # Session completed $ ../run/john scraped.sam -form:nt -mask:?a -user:500 Using default input encoding: UTF-8 Loaded 28 password hashes with no different salts (NT [MD4 128/128 AVX 4x3]) Remaining 23 password hashes with no different salts Press 'q' or Ctrl-C to abort, almost any other key for status 0g 0:00:00:00 N/A 0g/s 9500p/s 9500c/s 218500C/s "..| Session completed $ ../run/john scraped.sam -form:nt-opencl -mask:?a -user:500 Device 2: GeForce GT 650M Using default input encoding: UTF-8 Loaded 28 password hashes with no different salts (nt-opencl, NT [MD4 OpenCL]) Remaining 23 password hashes with no different salts Segmentation fault: 11 ```
Author
Owner

@magnumripper commented on GitHub (Oct 12, 2016):

Loaded 28 password hashes with no different salts (nt-opencl, NT [MD4 OpenCL])
Remaining 23 password hashes with no different salts
Process 936 stopped
* thread #1: tid = 0x5434, 0x00000001002075d3 john`reset(db=0x000000010320e150) + 147 at opencl_nt_fmt_plug.c:576, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x44)
    frame #0: 0x00000001002075d3 john`reset(db=0x000000010320e150) + 147 at opencl_nt_fmt_plug.c:576
   573          initialized = 1;
   574      }
   575  
-> 576      num_loaded_hashes = db->salts->count;
   577      ocl_hc_128_prepare_table(db->salts);
   578      init_kernel(num_loaded_hashes, ocl_hc_128_select_bitmap(num_loaded_hashes));
   579  
(lldb) print db
(db_main *) $0 = 0x000000010320e150
(lldb) print db->salts
(db_salt *) $1 = 0x0000000000000000
<!-- gh-comment-id:253184987 --> @magnumripper commented on GitHub (Oct 12, 2016): ``` Loaded 28 password hashes with no different salts (nt-opencl, NT [MD4 OpenCL]) Remaining 23 password hashes with no different salts Process 936 stopped * thread #1: tid = 0x5434, 0x00000001002075d3 john`reset(db=0x000000010320e150) + 147 at opencl_nt_fmt_plug.c:576, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x44) frame #0: 0x00000001002075d3 john`reset(db=0x000000010320e150) + 147 at opencl_nt_fmt_plug.c:576 573 initialized = 1; 574 } 575 -> 576 num_loaded_hashes = db->salts->count; 577 ocl_hc_128_prepare_table(db->salts); 578 init_kernel(num_loaded_hashes, ocl_hc_128_select_bitmap(num_loaded_hashes)); 579 (lldb) print db (db_main *) $0 = 0x000000010320e150 (lldb) print db->salts (db_salt *) $1 = 0x0000000000000000 ```
Author
Owner

@magnumripper commented on GitHub (Oct 12, 2016):

We're still using test db?

(lldb) print db->real
(db_main *) $2 = 0x000000010079c160
(lldb) print db->real->salts
(db_salt *) $3 = 0x000000010136d3f0
(lldb) print db->real->salts->count
(int) $4 = 23
(lldb) bt
* thread #1: tid = 0x5434, 0x00000001002075d3 john`reset(db=0x000000010320e150) + 147 at opencl_nt_fmt_plug.c:576, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x44)
  * frame #0: 0x00000001002075d3 john`reset(db=0x000000010320e150) + 147 at opencl_nt_fmt_plug.c:576
    frame #1: 0x00000001002db7a0 john`fmt_self_test(format=0x0000000100593580, db=0x000000010320e150) + 880 at formats.c:487
    frame #2: 0x00000001002e6860 john`john_run + 376 at john.c:1624
    frame #3: 0x00000001002e7535 john`main(argc=5, argv=0x00007fff5fbffa00) + 1153 at john.c:1980
    frame #4: 0x00007fffe0bbd255 libdyld.dylib`start + 1
<!-- gh-comment-id:253185184 --> @magnumripper commented on GitHub (Oct 12, 2016): We're still using test db? ``` (lldb) print db->real (db_main *) $2 = 0x000000010079c160 (lldb) print db->real->salts (db_salt *) $3 = 0x000000010136d3f0 (lldb) print db->real->salts->count (int) $4 = 23 ``` ``` (lldb) bt * thread #1: tid = 0x5434, 0x00000001002075d3 john`reset(db=0x000000010320e150) + 147 at opencl_nt_fmt_plug.c:576, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x44) * frame #0: 0x00000001002075d3 john`reset(db=0x000000010320e150) + 147 at opencl_nt_fmt_plug.c:576 frame #1: 0x00000001002db7a0 john`fmt_self_test(format=0x0000000100593580, db=0x000000010320e150) + 880 at formats.c:487 frame #2: 0x00000001002e6860 john`john_run + 376 at john.c:1624 frame #3: 0x00000001002e7535 john`main(argc=5, argv=0x00007fff5fbffa00) + 1153 at john.c:1980 frame #4: 0x00007fffe0bbd255 libdyld.dylib`start + 1 ```
Author
Owner

@magnumripper commented on GitHub (Oct 12, 2016):

Aha... The cause is illustrated with bumped verbosity:

$ ../run/john scraped.sam -form:nt-opencl -mask:?a -user:500 -v:5
initUnicode(UNICODE, UTF-8/ISO-8859-1)
UTF-8 -> UTF-8 -> UTF-8
Device 2: GeForce GT 650M
Using default input encoding: UTF-8
Loaded 28 password hashes with no different salts (nt-opencl, NT [MD4 OpenCL])
Remaining 23 password hashes with no different salts
Loaded 0 hashes with 0 different salts to test db from test vectors    <------ !!!
Segmentation fault: 11

The "-user:500" is used even when populating the test_db. We end up with an empty database.

<!-- gh-comment-id:253186419 --> @magnumripper commented on GitHub (Oct 12, 2016): Aha... The cause is illustrated with bumped verbosity: ``` $ ../run/john scraped.sam -form:nt-opencl -mask:?a -user:500 -v:5 initUnicode(UNICODE, UTF-8/ISO-8859-1) UTF-8 -> UTF-8 -> UTF-8 Device 2: GeForce GT 650M Using default input encoding: UTF-8 Loaded 28 password hashes with no different salts (nt-opencl, NT [MD4 OpenCL]) Remaining 23 password hashes with no different salts Loaded 0 hashes with 0 different salts to test db from test vectors <------ !!! Segmentation fault: 11 ``` The "-user:500" is used even when populating the test_db. We end up with an empty database.
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#1540
No description provided.