pdfcrack
PDFCrack is a simple tool for recovering passwords from PDF documents. It supports cracking both owner and user passwords using wordlists or bruteforcing.
Description
PDFCrack is a command-line tool designed to recover passwords from PDF files that use the standard security handler. It is particularly useful in forensics investigations or legal password cracking activities where access to protected PDF documents is needed.
The tool handles PDF security revisions 2, 3, and 4 across known PDF versions. It supports both dictionary attacks with wordlists and brute-force methods, including simple permutations like capitalizing the first character of passwords. Additional features include saving and loading job states, benchmarking performance, and optimizing owner password searches when the user password is known.
While the PDF parsing is a quick hack, it works for most standard protected PDFs, though some may require parser fixes. It is not intended for illegal use but for legitimate recovery in authorized contexts.
How It Works
PDFCrack parses PDF files to extract password-protected security handlers (revisions 2, 3, 4). It attempts passwords via wordlist iteration or bruteforce using specified charsets, with optimizations like skipping short passwords, permutating (e.g., uppercase first char), and accelerating owner password cracking if user password is provided. Progress can be saved/loaded, and it supports quiet mode or benchmarking.
Installation
sudo apt install pdfcrackFlags
Examples
pdfcrack -hpdfcrack -f document.pdfpdfcrack -f document.pdf -w passwords.txtpdfcrack -f document.pdf -opdfcrack -f document.pdf -p knownuserpass -opdfcrack -f document.pdf -c abc123pdfcrack -f document.pdf -w list.txt -spdfcrack -b