I'm trying to attack LUKS header for an assignment. I have to use john and I need to crack the sha256 hash.
I made a virtual partition using dd to simulate a storage device on Kali. I encrypted it with LUKS1 using PBKDF2 as the PBKDF with force iterations and any other parameter as default.
This is my LUKS command:
cryptsetup luksFormat --type luks1 --pbkdf pbkdf2 --pbkdf-force-iterations 100000 image_file_name.img I try to extract the LUKS header with luks2john into a .txt file:
/usr/bin/luks2john image_file_name.img > txt_file_name.txt but I get the error:
.../(File path) : Only cbc-essiv:sha256 mode is supported. Used mode :b'xts-plain64\x00.......' So I try using the aes-cbc-essiv:sha256 as the cipher:
cryptsetup luksFormat --type luks1 --key-size 256 --cipher aes-cbc-essiv:sha256 --hash sha256 --pbkdf pbkdf2 --pbkdf-force-iterations 100000 image_file_name.img but I get the error:
.../(File path) : Only sha1 hash is supported. Used hash: b'sha256\x00......' I've tried to update John through git and clone it directly, but it still doesn't work.
johnor can you use other tools? Did you try--hash sha1?--hash sha1I did try that and it work completely fine, the hash string from LUKS header made it into the .txt file, but I need to use--hash sha256for this research. And lastly I do need to usejohnas the main tools. @schroederluks2john? That's important because that's what's giving you the error. Do you have to use the settings you used for LUKS? Is the person who gave you this assignment sure that the LUKS settings work for luks2john?johnpackage which I assume must have also included the latestluks2john, I've tried updating usinggitto directly clone from https://github.com/openwall/john and alsoapt update && apt upgrade. For research purpose, Yes I have to use the settings