Cracking Protective Archives

Cracking zip files

zip2john ZIP.zip > zip.hash
john --wordlist=rockyou.txt zip.hash

Cracking Openssl encrypted files

  • verify what encryption used on file
file GZIP.gzip
  • Use a for loop that attempts to extract the contents directly, succeeding only if the correct password is found
for i in $(cat rockyou.txt);do openssl enc -aes-256-cbc -d -in GZIP.gzip -k $i 2>/dev/null| tar xz;done

Cracking Bitliocker-encrypted drives

 bitlocker2john -i Backup.vhd > backup.hashes
grep "bitlocker$0" backup.hashes > backup.hash
hashcat -a 0 -m 22100 backup.hash /usr/share/wordlists/rockyou.txt

Mounting BitLocker-encrypted drives

sudo apt-get install dislocker
  • Next, we create two folders which we will use to mount the VHD.
sudo mkdir -p /media/bitlocker
sudo mkdir -p /media/bitlockermount
  • We then use losetup to configure the VHD as loop device, decrypt the drive using dislocker, and finally mount the decrypted volume:
sudo losetup -f -P Backup.vhd
sudo dislocker /dev/loop0p2 -u$password -- /media/bitlocker
sudo mount -o loop /media/bitlocker/dislocker-file /media/bitlockermount
  • we can now browse the files:
cd /media/bitlockermount/ && ls -la