[GH-ISSUE #655] krb5pa-sha1 should unify hashes in split() #313

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

Originally created by @frank-dittrich on GitHub (Jun 20, 2014).
Original GitHub issue: https://github.com/openwall/john/issues/655

(bleeding-jumbo)run $ ./john --format=krb5pa-sha1 --list=format-tests |cut -f 4 > krb5pa-sha1.pw
(bleeding-jumbo)run $ ./john --format=krb5pa-sha1 --list=format-tests |cut -f 3 > krb5pa-sha1.hashes
(bleeding-jumbo)run $ ./john --format=krb5pa-sha1 krb5pa-sha1.hashes --wordlist=krb5pa-sha1.pw
Loaded 7 password hashes with 6 different salts (krb5pa-sha1, Kerberos 5 AS-REQ Pre-Auth etype 17/18 [8x SSE2])
Will run 4 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
password@12345678 (?)
password@12345678 (?)
openwall         (?)
password@123     (?)
openwall         (?)
openwall         (?)
openwall         (?)
7g 0:00:00:00 DONE (2014-06-20 13:35) 175.0g/s 100.0p/s 600.0c/s 700.0C/s openwall..openwall
Use the "--show" option to display all of the cracked passwords reliably
Session completed
(bleeding-jumbo)run $ ./john --format=krb5pa-sha1 krb5pa-sha1.hashes --wordlist=krb5pa-sha1.pw
Loaded 7 password hashes with 6 different salts (krb5pa-sha1, Kerberos 5 AS-REQ Pre-Auth etype 17/18 [8x SSE2])
Remaining 1 password hash
Will run 4 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
password@12345678 (?)
1g 0:00:00:00 DONE (2014-06-20 13:36) 100.0g/s 400.0p/s 400.0c/s 400.0C/s openwall..openwall
Use the "--show" option to display all of the cracked passwords reliably
Session completed
(bleeding-jumbo)run $ grep password@12345678 john.pot 
$krb5pa$18$aduser$AD.EXAMPLE.COM$AD.EXAMPLE.COMaduser$f94f755a8b4493d925094a4eb1cec630ac40411a14c9733a853516fe426637d9daefdedc0567e2bb5a83d4f89a0ad1a4b178662b6106c0ff:password@12345678
$krb5pa$18$aduser$AD.EXAMPLE.COM$$f94f755a8b4493d925094a4eb1cec630ac40411a14c9733a853516fe426637d9daefdedc0567e2bb5a83d4f89a0ad1a4b178662b6106c0ff:password@12345678
Originally created by @frank-dittrich on GitHub (Jun 20, 2014). Original GitHub issue: https://github.com/openwall/john/issues/655 ``` (bleeding-jumbo)run $ ./john --format=krb5pa-sha1 --list=format-tests |cut -f 4 > krb5pa-sha1.pw (bleeding-jumbo)run $ ./john --format=krb5pa-sha1 --list=format-tests |cut -f 3 > krb5pa-sha1.hashes (bleeding-jumbo)run $ ./john --format=krb5pa-sha1 krb5pa-sha1.hashes --wordlist=krb5pa-sha1.pw Loaded 7 password hashes with 6 different salts (krb5pa-sha1, Kerberos 5 AS-REQ Pre-Auth etype 17/18 [8x SSE2]) Will run 4 OpenMP threads Press 'q' or Ctrl-C to abort, almost any other key for status password@12345678 (?) password@12345678 (?) openwall (?) password@123 (?) openwall (?) openwall (?) openwall (?) 7g 0:00:00:00 DONE (2014-06-20 13:35) 175.0g/s 100.0p/s 600.0c/s 700.0C/s openwall..openwall Use the "--show" option to display all of the cracked passwords reliably Session completed (bleeding-jumbo)run $ ./john --format=krb5pa-sha1 krb5pa-sha1.hashes --wordlist=krb5pa-sha1.pw Loaded 7 password hashes with 6 different salts (krb5pa-sha1, Kerberos 5 AS-REQ Pre-Auth etype 17/18 [8x SSE2]) Remaining 1 password hash Will run 4 OpenMP threads Press 'q' or Ctrl-C to abort, almost any other key for status password@12345678 (?) 1g 0:00:00:00 DONE (2014-06-20 13:36) 100.0g/s 400.0p/s 400.0c/s 400.0C/s openwall..openwall Use the "--show" option to display all of the cracked passwords reliably Session completed (bleeding-jumbo)run $ grep password@12345678 john.pot $krb5pa$18$aduser$AD.EXAMPLE.COM$AD.EXAMPLE.COMaduser$f94f755a8b4493d925094a4eb1cec630ac40411a14c9733a853516fe426637d9daefdedc0567e2bb5a83d4f89a0ad1a4b178662b6106c0ff:password@12345678 $krb5pa$18$aduser$AD.EXAMPLE.COM$$f94f755a8b4493d925094a4eb1cec630ac40411a14c9733a853516fe426637d9daefdedc0567e2bb5a83d4f89a0ad1a4b178662b6106c0ff:password@12345678 ```
bsakaguchi 2026-10-14 03:00:51 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@frank-dittrich commented on GitHub (Jun 20, 2014):

krb5pa-sha1-opencl probalby needs the same fix.

<!-- gh-comment-id:46669733 --> @frank-dittrich commented on GitHub (Jun 20, 2014): krb5pa-sha1-opencl probalby needs the same fix.
Author
Owner

@magnumripper commented on GitHub (Jun 22, 2014):

Input format is 'user:$krb5pa$etype$user$realm$salt$timestamp+checksum' according to comments. This is a problem already: What if field[0] does not match the 'user' within the ciphertext? Should we fail valid() then? Well we can't because valid() can't see that.

<!-- gh-comment-id:46769091 --> @magnumripper commented on GitHub (Jun 22, 2014): Input format is 'user:$krb5pa$etype$user$realm$salt$timestamp+checksum' according to comments. This is a problem already: What if field[0] does not match the 'user' within the ciphertext? Should we fail valid() then? Well we can't because valid() can't see that.
Author
Owner

@frank-dittrich commented on GitHub (Jun 26, 2014):

Apparently, you have to run krbpa2john.py anyway, so I would just assume that user is correct.
sap2john.pl also incorporates the user name into the hash, and the format ignores the user name in the separate field. I would keep it that way.

Since the "$mskrb5$" had been used in the past, can't we just replace "$mskrb5$" with "$krb5pa$" and treat "$mskrb5$" as invalid?

<!-- gh-comment-id:47221616 --> @frank-dittrich commented on GitHub (Jun 26, 2014): Apparently, you have to run krbpa2john.py anyway, so I would just assume that $user$ is correct. sap2john.pl also incorporates the user name into the hash, and the format ignores the user name in the separate field. I would keep it that way. Since the "$mskrb5$" had been used in the past, can't we just replace "$mskrb5$" with "$krb5pa$" and treat "$mskrb5$" as invalid?
Author
Owner

@magnumripper commented on GitHub (Jun 26, 2014):

A user may have "$mskrb5$" entries in her pot file, and we should keep recognizing them. A rewrite can't be done in prepare() - we need to accept both types in valid() and rewrite the hashes in split().

This also have the side effect we will continue to support "$mskrb5$" in input files.

<!-- gh-comment-id:47265196 --> @magnumripper commented on GitHub (Jun 26, 2014): A user may have "$mskrb5$" entries in her pot file, and we should keep recognizing them. A rewrite can't be done in prepare() - we need to accept both types in valid() and rewrite the hashes in split(). This also have the side effect we will continue to support "$mskrb5$" in input files.
Author
Owner

@frank-dittrich commented on GitHub (Jun 26, 2014):

You just dropped krb5-23 format, because these hashes are just NT hashes.
A user might have hashes prefixed with krb23 in the .pot file which are not recognized as valid NT hashes. If you want to continue supporting mskrb5, you should also change NT format to accept krb23.
(I admit there's a difference. While krb5-23 has been added in unstable, phps existed in 1.7.9-jumbo-7.)

<!-- gh-comment-id:47283146 --> @frank-dittrich commented on GitHub (Jun 26, 2014): You just dropped krb5-23 format, because these hashes are just NT hashes. A user might have hashes prefixed with $krb23$ in the .pot file which are not recognized as valid NT hashes. If you want to continue supporting $mskrb5$, you should also change NT format to accept $krb23$. (I admit there's a difference. While krb5-23 has been added in unstable, phps existed in 1.7.9-jumbo-7.)
Author
Owner

@magnumripper commented on GitHub (Jun 26, 2014):

The key is that krb23 has never been included in any released Jumbo. We could add support for it in NT, but since it was never released I think we shouldn't bother.

<!-- gh-comment-id:47293073 --> @magnumripper commented on GitHub (Jun 26, 2014): The key is that $krb23$ has never been included in any released Jumbo. We could add support for it in NT, but since it was never released I think we shouldn't bother.
Author
Owner

@magnumripper commented on GitHub (Jun 28, 2014):

The mskrb5 discussion did not belong to this format at all.

The problem here is that Dhiru used the same test vector twice, with different formats. There is nothing wrong with the format. I will just delete one of the test vectors and we're cool.

<!-- gh-comment-id:47414179 --> @magnumripper commented on GitHub (Jun 28, 2014): The mskrb5 discussion did not belong to this format at all. The problem here is that Dhiru used the same test vector twice, with different formats. There is nothing wrong with the format. I will just delete one of the test vectors and we're cool.
Author
Owner

@magnumripper commented on GitHub (Jun 28, 2014):

f8ced75 fixes it better. We are now immune to the unused fields because they are cut out in valid. This is the way to go, in several other formats.

<!-- gh-comment-id:47415016 --> @magnumripper commented on GitHub (Jun 28, 2014): f8ced75 fixes it better. We are now immune to the unused fields because they are cut out in valid. This is the way to go, in several other formats.
Author
Owner

@magnumripper commented on GitHub (Jun 28, 2014):

This lead to problems, reopening

<!-- gh-comment-id:47415052 --> @magnumripper commented on GitHub (Jun 28, 2014): This lead to problems, reopening
Author
Owner

@magnumripper commented on GitHub (Jun 28, 2014):

reverted for now

<!-- gh-comment-id:47415466 --> @magnumripper commented on GitHub (Jun 28, 2014): reverted for now
Author
Owner

@magnumripper commented on GitHub (Jun 29, 2014):

Fix re-applied and hopefully working now. We now get 6 loaded out of 7 due to dupe suppression, but --show does not suppress dupe so shows 7 cracked - I am pretty sure that is normal.

<!-- gh-comment-id:47483590 --> @magnumripper commented on GitHub (Jun 29, 2014): Fix re-applied and hopefully working now. We now get 6 loaded out of 7 due to dupe suppression, but --show does not suppress dupe so shows 7 cracked - I am pretty sure that is normal.
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#313
No description provided.