Cracking Protected Files
Overview
Encrypted files can contain sensitive information
Common in corporate environments (GDPR compliance)
Often use AES-256 symmetric encryption
Can be cracked with right wordlists and tools
Hunting for Encrypted Files
Common File Extensions
# Search for common encrypted file types
for ext in $(echo ".xls .xls* .xltx .od* .doc .doc* .pdf .pot .pot* .pp*")
do
echo -e "\nFile extension: " $ext
find / -name *$ext 2>/dev/null | grep -v "lib\|fonts\|share\|core"
doneCommon Protected File Types
.docx, .xlsx, .pptx - Microsoft Office documents
.pdf - Adobe PDF documents
.zip, .rar, .7z - Compressed archives
.kdbx - KeePass databases
.p12, .pfx - Certificate files
.ssh keys - SSH private keys
.gpg - GPG encrypted files
Finding SSH Keys
Search for SSH Private Keys
Check if SSH Key is Encrypted
File Cracking Tools
Available 2john Tools
Cracking SSH Keys
Extract and Crack SSH Key
With Hashcat
Cracking Office Documents
Microsoft Office Files
With Hashcat
Cracking PDF Files
Extract and Crack PDF
With Hashcat
Cracking Archive Files
ZIP Archives
RAR Archives
7-Zip Archives
Other Protected Files
KeePass Databases
GPG Files
Common Hashcat Hash Modes
PDF 1.4-1.6
10400
PDF (Portable Document Format)
PDF 1.7 Level 3
10500
PDF 1.7 Level 3 (Acrobat 9)
MS Office 2007
9400
Office 2007
MS Office 2010
9500
Office 2010
MS Office 2013
9600
Office 2013
ZIP
13600
WinZip
RAR3
12500
RAR3-hp
7-Zip
11600
7-Zip
KeePass
13400
KeePass 1 (AES/Twofish)
SSH Private Key
22931
RSA/DSA/EC/OPENSSH
Tips for Success
Use targeted wordlists - Include company names, dates, common passwords
Try common patterns - company123, Company2024!, etc.
Check file metadata - May contain hints about creator/purpose
Multiple attack methods - Dictionary, rules, mask attacks
Be patient - Some files take significant time to crack
Check for weak passwords - Many users still use simple passwords
Corporate patterns - Often follow predictable formats
Cracking Protected Archives
ZIP Files (Extended)
OpenSSL Encrypted GZIP Files
BitLocker Encrypted Drives
Mounting BitLocker Drives
Windows
Double-click the .vhd file
Double-click the BitLocker volume
Enter the cracked password
Linux/macOS
Practical BitLocker Example
Complete workflow for cracking and mounting a BitLocker VHD:
Key Points:
Use
losetup --allto verify loop device assignmentBitLocker partitions are usually
p1orp2(e.g.,/dev/loop0p1)The
dislocker-fileis created in the first mount pointAlways unmount and detach loop devices when finished
Common Archive Types
.zip - ZIP archives
.rar - RAR archives
.7z - 7-Zip archives
.tar.gz - Tarball with gzip
.tar.bz2 - Tarball with bzip2
.vhd/.vhdx - Virtual Hard Disk (often BitLocker)
.vmdk - VMware Virtual Disk
.truecrypt - TrueCrypt volumes
.luks - Linux Unified Key Setup
Additional Archive Hash Modes
BitLocker
bitlocker2john
22100
TrueCrypt
truecrypt_volume2john
6211
LUKS
luks2john
14600
VMware VMDK
vmware2john
20300
Automation Script Example
Last updated