Password Attackspdfpasswordcrackerbruteforcewordlistforensics

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

bash
sudo apt install pdfcrack

Flags

-b, --benchperform benchmark and exit
-c, --charset=STRINGUse the characters in STRING as charset
-w, --wordlist=FILEUse FILE as source of passwords to try
-n, --minpw=INTEGERSkip trying passwords shorter than this
-m, --maxpw=INTEGERStop when reaching this passwordlength
-l, --loadState=FILEContinue from the state saved in FILENAME
-o, --ownerWork with the ownerpassword
-u, --userWork with the userpassword (default)
-p, --password=STRINGGive userpassword to speed up breaking ownerpassword (implies -o)
-q, --quietRun quietly
-s, --permutateTry permutating the passwords (currently only supports switching first character to uppercase)
-v, --versionPrint version and exit

Examples

Display help and usage information
pdfcrack -h
Crack the default user password of document.pdf
pdfcrack -f document.pdf
Use passwords.txt as wordlist to crack document.pdf
pdfcrack -f document.pdf -w passwords.txt
Crack the owner password of document.pdf
pdfcrack -f document.pdf -o
Use known user password to speed up cracking owner password
pdfcrack -f document.pdf -p knownuserpass -o
Bruteforce using charset abc123
pdfcrack -f document.pdf -c abc123
Use wordlist with simple permutations (uppercase first char)
pdfcrack -f document.pdf -w list.txt -s
Perform benchmark and exit
pdfcrack -b
Updated 2026-04-16kali.org ↗