Page cover

Password Cracking

Hash Analysis

Hashcat
Hash format: MD5 (-m 0)
hashcat -m 0 -a 0 hashes.txt /usr/share/wordlists/rockyou.txt
AES Encryption Cracking

Convert AES file to hashcat format

Download conversion script
curl "https://raw.githubusercontent.com/hashcat/hashcat/master/tools/aescrypt2hashcat.pl" -o aescrypt2hashcat.pl
Extract hash from AES file
perl aescrypt2hashcat.pl backup.zip.aes > hash
Crack with Hashcat
hashcat -m 22400 -a 0 hash /usr/share/wordlists/rockyou.txt

Decrypt the file with the found password

Using pyAesCrypt (Python):
import pyAesCrypt

# Buffer size for file operations (larger = faster for big files)
# 128KB is a good balance between memory usage and speed
bufferSize = 128 * 1024

# The password we cracked
password = "password"

# Decrypt: source.aes -> destination file
pyAesCrypt.decryptFile("file.zip.aes", "file.zip", password, bufferSize)
print("[+] File decrypted successfully")
EOF

Is possible to also use the aescrypt tool:

aescrypt -d -p password file.zip.aes

Last updated