[GH-ISSUE #2115] LUKS not working #1412

Open
opened 2026-10-15 04:16:00 +07:00 by bsakaguchi · 5 comments
Owner

Originally created by @FAlbanni on GitHub (Apr 13, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/2115

Originally assigned to: @jfoug on GitHub.

I want to "crack" my own passphrase of my Ubuntu 15.10 standard whole disk encryption disk.

Here is what I do:

sudo cryptsetup luksHeaderBackup --header-backup-file header /dev/sdb1
Then to get the hash from the header I do:
luks2john header
Now I get a "dump" binary file and a hash printed to the stdout.

I save the printed hash by copy&paste into a new file calling it "hash"

Then I do:
john --wordlist=Dic -enc=utf8 hash

And I get this output:

WARNING, LUKS format hash representation will change in future releases,
see doc/README.LUKS
Loaded 1 password hash (LUKS [PBKDF2-SHA1 256/256 AVX2 8x])
Will run 4 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:00 DONE (2016-04-12 23:29) 0g/s 40.38p/s 40.38c/s 40.38C/s test1..test5
Session completed

Inside the "Dic" file I have my real passphrase but JTR cannot "crack" it, however it completes the process successfully.

"Dic" file looks like this

test1
test2
myRealPassphrase
test4
test5

Originally created by @FAlbanni on GitHub (Apr 13, 2016). Original GitHub issue: https://github.com/openwall/john/issues/2115 Originally assigned to: @jfoug on GitHub. I want to "crack" my own passphrase of my Ubuntu 15.10 standard whole disk encryption disk. Here is what I do: `sudo cryptsetup luksHeaderBackup --header-backup-file header /dev/sdb1` Then to get the hash from the header I do: `luks2john header` Now I get a "dump" binary file and a hash printed to the stdout. I save the printed hash by copy&paste into a new file calling it "hash" Then I do: `john --wordlist=Dic -enc=utf8 hash` And I get this output: > WARNING, LUKS format hash representation will change in future releases, > see doc/README.LUKS > Loaded 1 password hash (LUKS [PBKDF2-SHA1 256/256 AVX2 8x]) > Will run 4 OpenMP threads > Press 'q' or Ctrl-C to abort, almost any other key for status > 0g 0:00:00:00 DONE (2016-04-12 23:29) 0g/s 40.38p/s 40.38c/s 40.38C/s test1..test5 > Session completed Inside the "Dic" file I have my real passphrase but JTR cannot "crack" it, however it completes the process successfully. "Dic" file looks like this > test1 > test2 > myRealPassphrase > test4 > test5
Author
Owner

@kholia commented on GitHub (Apr 16, 2016):

https://www.kernel.org/pub/linux/utils/cryptsetup/v1.7/cryptsetup-1.7.1.tar.xz

https://www.kernel.org/pub/linux/utils/cryptsetup/v1.7/v1.7.0-ReleaseNotes

"Default hash function is now SHA256 (used in key derivation function and anti-forensic splitter)."

static const char *bkdfs[] = {
    "sha1", "sha256", "sha512", "ripemd160", "whirlpool", NULL
};

luk2john.c needs to reject (and finally support) such new non-hashes.

<!-- gh-comment-id:210762649 --> @kholia commented on GitHub (Apr 16, 2016): https://www.kernel.org/pub/linux/utils/cryptsetup/v1.7/cryptsetup-1.7.1.tar.xz https://www.kernel.org/pub/linux/utils/cryptsetup/v1.7/v1.7.0-ReleaseNotes "Default hash function is now SHA256 (used in key derivation function and anti-forensic splitter)." ``` static const char *bkdfs[] = { "sha1", "sha256", "sha512", "ripemd160", "whirlpool", NULL }; ``` luk2john.c needs to reject (and finally support) such new non-hashes.
Author
Owner

@kholia commented on GitHub (Apr 16, 2016):

This bug was confirmed on Lubuntu 16.04. Also confirmed that this bug is not a regression.

<!-- gh-comment-id:210762785 --> @kholia commented on GitHub (Apr 16, 2016): This bug was confirmed on Lubuntu 16.04. Also confirmed that this bug is not a regression.
Author
Owner

@kholia commented on GitHub (Apr 16, 2016):

This problem is partially mitigated in commit c0979124f0.

<!-- gh-comment-id:210774310 --> @kholia commented on GitHub (Apr 16, 2016): This problem is partially mitigated in commit c0979124f00ca1f0f5dfa122b4a5c9305a6cb3fc.
Author
Owner

@FAlbanni commented on GitHub (Apr 16, 2016):

Hope you guys can soon support this types of "hashes". Maybe this can help, here is a working project https://github.com/glv2/bruteforce-luks that was able to crack my passphrase; Worth to mention too this is extremely slow since I believe they use cryptsetup lib to test passphrase by passphrase until finding a match; Maybe you guys could implement something similar but smarter in JtR. Anyway, thank you very much for this awesome software.

<!-- gh-comment-id:210921554 --> @FAlbanni commented on GitHub (Apr 16, 2016): Hope you guys can soon support this types of "hashes". Maybe this can help, here is a working project https://github.com/glv2/bruteforce-luks that was able to crack my passphrase; Worth to mention too this is extremely slow since I believe they use cryptsetup lib to test passphrase by passphrase until finding a match; Maybe you guys could implement something similar but smarter in JtR. Anyway, thank you very much for this awesome software.
Author
Owner

@jfoug commented on GitHub (Jul 29, 2016):

I am going to give this a go (this and bug #2169).

Since pbkdf2-sha256 and xts-plain64 are the default, then they should get handled.

<!-- gh-comment-id:236236048 --> @jfoug commented on GitHub (Jul 29, 2016): I am going to give this a go (this and bug #2169). Since pbkdf2-sha256 and xts-plain64 are the default, then they should get handled.
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#1412
No description provided.