I need help with using John…I made a pdf file a while ago and I password protected it from editing. I mean I was able to get inside by using microsoft print to pdf, which is a bit problematic. Adobe print to pdf stopped me, but microsoft print to pdf didn’t and I can access all layers and everything. But I still don’t know my password and I am dedicated to getting it :D
I tried using pdf2john to create the hash file and then editing that file, to leave only the hash within. Then I used John, and it worked, but it gave me empty password. Even using --show, it read “?:
” and that’s it.
When I tried to use John directly on the pdf it gave me a warning: invalid UTF-8 seen reading “pdf”
and Warning: only loading hashes of type “HMAC-SHA256”, but also saw type “HMAC-SHA224”
Then it loads 43 password hashes and tries to crack, but doesn’t work.
I then tried to use unshadow on the txt file, as instructed here: john the ripper, on kali linux it outputs no password hashes loaded and that gave me the following message:
$ john --format=crypt --wordlist='/home/root/Desktop/wordlists/rockyou.txt' '/home/root/Desktop/passwd'
Using default input encoding: UTF-8
Loaded 1 password hash (crypt, generic crypt(3) [?/64])
Cost 1 (algorithm [1:descrypt 2:md5crypt 3:sunmd5 4:bcrypt 5:sha256crypt 6:sha512crypt]) is 0 for all loaded hashes
Cost 2 (algorithm specific iterations) is 1 for all loaded hashes
Will run 8 OpenMP threads
Crash recovery file is locked: /home/root/.john/john.rec
.john/hohn.rec file:
REC4
5
/home/root/Desktop/input.pdf
--format=crypt
--input-encoding=UTF-8
--internal-codepage=UTF-8
2253
0
dbb90
0
0
dbb90
0
dbb90
0
0
3
0
b9893ea
290
2
6
4
7
1
8
2
5
Is there something else I should do if the pdf is not password protected but only the editing is password restricted?
I hope I made it clear :smiley:
qpdf --decrypt --password=xxxxx encrypted-filename.pdf decrypted-filename.pdf