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"
done

Common 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

File Type
Mode
Description

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

  1. Use targeted wordlists - Include company names, dates, common passwords

  2. Try common patterns - company123, Company2024!, etc.

  3. Check file metadata - May contain hints about creator/purpose

  4. Multiple attack methods - Dictionary, rules, mask attacks

  5. Be patient - Some files take significant time to crack

  6. Check for weak passwords - Many users still use simple passwords

  7. Corporate patterns - Often follow predictable formats

Cracking Protected Archives

ZIP Files (Extended)

OpenSSL Encrypted GZIP Files

BitLocker Encrypted Drives

Mounting BitLocker Drives

Windows

  1. Double-click the .vhd file

  2. Double-click the BitLocker volume

  3. Enter the cracked password

Linux/macOS

Practical BitLocker Example

Complete workflow for cracking and mounting a BitLocker VHD:

Key Points:

  • Use losetup --all to verify loop device assignment

  • BitLocker partitions are usually p1 or p2 (e.g., /dev/loop0p1)

  • The dislocker-file is created in the first mount point

  • Always 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

Archive Type
Tool
Hashcat Mode

BitLocker

bitlocker2john

22100

TrueCrypt

truecrypt_volume2john

6211

LUKS

luks2john

14600

VMware VMDK

vmware2john

20300

Automation Script Example

Last updated