Last active
December 10, 2018 08:56
-
-
Save ridingintraffic/f463838d21dc9bab3f4e6674ab58d4f9 to your computer and use it in GitHub Desktop.
luks and hashcat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ dd if=/dev/urandom of=test bs=1M count=100 | |
$ cryptsetup luksFormat test #use password password | |
$ cryptsetup luksOpen test tmp | |
$ xxd -l 512 /dev/mapper/tmp # is random data at this point | |
$ mkfs.ext4 /dev/mapper/tmp # use the same file system that is used by your system/device | |
$ xxd -l 512 /dev/mapper/tmp # should no longer be random data | |
$ cryptsetup luksClose tmp | |
$ cryptsetup luksDump test | grep "Payload offset" # add 1 to the offset value that comes back | |
$ dd if=test of=luks-header bs=512 count=4097 # grabs header | |
$ echo "password" >>list | |
$ hashcat -m 14600 -a 0 -w 3 luks-header list -o found |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment