Pdf
Remove password from fle
qpdf --pasword=******************* --decrypt <input.pdf> <output.pdf>
Crack PDF passwords
Source
Build JohnTheRipper binaries
sudo dnf -y install libssl-dev
git clone --depth 1 https://github.com/magnumripper/JohnTheRipper.git /tmp/jtr
cd /tmp/jtr/src
./configure && make
Brute force with JohnTheRipper
$ PDFINPUT=/path/to/pdffile
$ cd /tmp/jtr/run
$ ./pdf2john.pl "${PDFINPUT}" > /tmp/pdf.hash
$ ./john /tmp/pdf.hash
Using default input encoding: UTF-8
Loaded 1 password hash (PDF [MD5 SHA2 RC4/AES 32/64])
Cost 1 (revision) is 3 for all loaded hashes
Will run 8 OpenMP threads
Note: Passwords longer than 10 [worst case UTF-8] to 32 [ASCII] rejected
Proceeding with single, rules:Single
Press 'q' or Ctrl-C to abort, 'h' for help, almost any other key for status
Almost done: Processing the remaining buffered candidate passwords, if any.
0g 0:00:00:00 DONE 1/3 (2024-09-06 10:35) 0g/s 140282p/s 140282c/s 140282C/s Dokumenterlibrary1900..Pdf1900
Proceeding with wordlist:./password.lst
Enabling duplicate candidate password suppressor
19101986 (/path/to/pdffile)
1g 0:00:00:00 DONE 2/3 (2024-09-06 10:35) 1.515g/s 122148p/s 122148c/s 122148C/s 889988..170392
Use the "--show --format=PDF" options to display all of the cracked passwords reliably
Session completed.