[GH-ISSUE #2144] unable to crack HASHBYTES SHA1 hashes #1434

Closed
opened 2026-10-15 04:16:58 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @blshkv on GitHub (May 23, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/2144

Hi,

I'm trying to crack test hashes with known passwords published at the following URL:
https://msdn.microsoft.com/en-sg/library/ms174415.aspx

test1:0e7aab0b4ff0fd2dfb4f0233e2ee7a26cd08f173
test2:f643a82f948defb922b12e50b950cee130a934d6

I've converted them into low case and run the following:
john ms_hashes_sha1_low --format=Raw-SHA1 --wordlist=./wordlist.txt

I've tried to convert my dictionary to a different encoding (utf16, utf16le etc, based on http://weblogs.sqlteam.com/mladenp/archive/2009/04/28/Comparing-SQL-Server-HASHBYTES-function-and-.Net-hashing.aspx) without any success either.

Could you help to figure it out please?

/usr/sbin/john --list=build-info
Version: 1.8.0-jumbo-1 MPI + OMP
Build: linux-gnu 64-bit AVX-autoconf
Arch: 64-bit LE
System-wide exec: /usr/libexec/john
System-wide home: /etc/john
Private home: ~/.john
$JOHN is /etc/john/
Format interface version: 12
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
Compiler version: 4.9.3
gcc version: 4.9.3
OpenSSL library version: 01000208f
OpenSSL 1.0.2h  3 May 2016
GMP library version: 6.0.0
fseek(): fseek
ftell(): ftell
fopen(): fopen
memmem(): System's
Originally created by @blshkv on GitHub (May 23, 2016). Original GitHub issue: https://github.com/openwall/john/issues/2144 Hi, I'm trying to crack test hashes with known passwords published at the following URL: https://msdn.microsoft.com/en-sg/library/ms174415.aspx ``` test1:0e7aab0b4ff0fd2dfb4f0233e2ee7a26cd08f173 test2:f643a82f948defb922b12e50b950cee130a934d6 ``` I've converted them into low case and run the following: john ms_hashes_sha1_low --format=Raw-SHA1 --wordlist=./wordlist.txt I've tried to convert my dictionary to a different encoding (utf16, utf16le etc, based on http://weblogs.sqlteam.com/mladenp/archive/2009/04/28/Comparing-SQL-Server-HASHBYTES-function-and-.Net-hashing.aspx) without any success either. Could you help to figure it out please? ``` /usr/sbin/john --list=build-info Version: 1.8.0-jumbo-1 MPI + OMP Build: linux-gnu 64-bit AVX-autoconf Arch: 64-bit LE System-wide exec: /usr/libexec/john System-wide home: /etc/john Private home: ~/.john $JOHN is /etc/john/ Format interface version: 12 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 Compiler version: 4.9.3 gcc version: 4.9.3 OpenSSL library version: 01000208f OpenSSL 1.0.2h 3 May 2016 GMP library version: 6.0.0 fseek(): fseek ftell(): ftell fopen(): fopen memmem(): System's ```
Author
Owner

@magnumripper commented on GitHub (May 25, 2016):

What you get is actually SHA1(utf16($p)) and we have it as dynamic_1400.

$ ../run/john 2144.in --form:dynamic_1400 -w:2144.lst 
Using default input encoding: UTF-8
Loaded 2 password hashes with no different salts (dynamic_1400 [sha1(utf16($p)) (Microsoft CREDHIST) 128/128 AVX 4x1])
Warning: no OpenMP support for this hash type, consider --fork=8
Press 'q' or Ctrl-C to abort, almost any other key for status
This is test 2.  (test2)
This is a test.  (test1)
2g 0:00:00:00 DONE (2016-05-25 19:43) 200.0g/s 200.0p/s 200.0c/s 400.0C/s This is a test...This is test 2.
Use the "--show" option to display all of the cracked passwords reliably
Session completed
<!-- gh-comment-id:221651928 --> @magnumripper commented on GitHub (May 25, 2016): What you get is actually `SHA1(utf16($p))` and we have it as dynamic_1400. ``` $ ../run/john 2144.in --form:dynamic_1400 -w:2144.lst Using default input encoding: UTF-8 Loaded 2 password hashes with no different salts (dynamic_1400 [sha1(utf16($p)) (Microsoft CREDHIST) 128/128 AVX 4x1]) Warning: no OpenMP support for this hash type, consider --fork=8 Press 'q' or Ctrl-C to abort, almost any other key for status This is test 2. (test2) This is a test. (test1) 2g 0:00:00:00 DONE (2016-05-25 19:43) 200.0g/s 200.0p/s 200.0c/s 400.0C/s This is a test...This is test 2. Use the "--show" option to display all of the cracked passwords reliably Session completed ```
Author
Owner

@blshkv commented on GitHub (May 26, 2016):

Thank you, that helped a lot!

<!-- gh-comment-id:221854610 --> @blshkv commented on GitHub (May 26, 2016): Thank you, that helped a lot!
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#1434
No description provided.