pdf crack
#1
I'm trying to get a password from a pdf so I can edit it.

I used this method:
python3 pdf2john.py test.pdf
b'test.pdf':b'$pdf$1*2*40*-60*1*16*cb24757670a6b04f9420690f913b47c2*32*e47538d1feab20a2d768f6d71c99ab8f33569ffc7b7e8c9ddb957e27b8915e88*32*30d379265f7895f185281eaeeeb0792f3cxxxxxxxxxxxxxxxxx':::::b'test.pdf'

hashcat -a 3 '$pdf$1*2*40*-60*1*16*cb24757670a6b04f9420690f913b47c2*32*e47538d1feab20a2d768f6d71c99ab8f33569ffc7b7e8c9ddb957e27b8915e88*32*30d379265f7895f185281eaeeeb0792f3cxxxxxxxxxxxxxxxxx'

$pdf$1*2*40*-60*1*16*cb24757670a6b04f9420690f913b47c2*32*e47538d1feab20a2d768f6d71c99ab8f33569ffc7b7e8c9ddb957e27b8915e88*32*30d379265f7895f185281eaeeeb0792f3cxxxxxxxxxxxxxxxxx':hdxxxxvi
                                                          
Session..........: hashcat
Status...........: Cracked
Hash.Mode........: 10400 (PDF 1.1 - 1.3 (Acrobat 2 - 4))
Hash.Target......: $pdf$1*2*40*-60*1*16*cb24757670a6b04f9420690f913b47...xxxxx
Time.Started.....: Thu Feb 29 14:25:50 2024 (1 day, 6 hours)
Time.Estimated...: Fri Mar  1 20:42:17 2024 (0 secs)
Kernel.Feature...: Optimized Kernel
Guess.Mask.......: ?1?2?2?2?2?2?2?3 [8]
Guess.Charset....: -1 ?l?d?u, -2 ?l?d, -3 ?l?d*!$@_, -4 Undefined 
Guess.Queue......: 8/15 (53.33%)
Speed.#3.........:  7904.8 kH/s (6.86ms) @ Accel:16 Loops:256 Thr:1 Vec:4
Recovered........: 1/1 (100.00%) Digests (total), 1/1 (100.00%) Digests (new)
Progress.........: 252210831360/5533380698112 (4.56%)
Rejected.........: 0/252210831360 (0.00%)
Restore.Point....: 3138816/68864256 (4.56%)
Restore.Sub.#3...: Salt:0 Amplifier:3328-3584 Iteration:0-256
Candidate.Engine.: Device Generator
Candidates.#3....: Dstdvbwe -> H51badna
Hardware.Mon.SMC.: Fan0: 100%, Fan1: 100%
Hardware.Mon.#3..: Temp: 76c


Maybe I'm stupid but the password should be: hdxxxxvi ???
The only problem is that it doesn't work. 

Or should I do something else with it? Convert it to something else? Feeling really stupid at this moment that I can't fix it.
Reply
#2
(03-01-2024, 10:58 PM)janjans Wrote: I'm trying to get a password from a pdf so I can edit it.

I used this method:
python3 pdf2john.py test.pdf
b'test.pdf':b'$pdf$1*2*40*-60*1*16*cb24757670a6b04f9420690f913b47c2*32*e47538d1feab20a2d768f6d71c99ab8f33569ffc7b7e8c9ddb957e27b8915e88*32*30d379265f7895f185281eaeeeb0792f3cxxxxxxxxxxxxxxxxx':::::b'test.pdf'

hashcat -a 3 '$pdf$1*2*40*-60*1*16*cb24757670a6b04f9420690f913b47c2*32*e47538d1feab20a2d768f6d71c99ab8f33569ffc7b7e8c9ddb957e27b8915e88*32*30d379265f7895f185281eaeeeb0792f3cxxxxxxxxxxxxxxxxx'

$pdf$1*2*40*-60*1*16*cb24757670a6b04f9420690f913b47c2*32*e47538d1feab20a2d768f6d71c99ab8f33569ffc7b7e8c9ddb957e27b8915e88*32*30d379265f7895f185281eaeeeb0792f3cxxxxxxxxxxxxxxxxx':hdxxxxvi
                                                          
Session..........: hashcat
Status...........: Cracked
Hash.Mode........: 10400 (PDF 1.1 - 1.3 (Acrobat 2 - 4))
Hash.Target......: $pdf$1*2*40*-60*1*16*cb24757670a6b04f9420690f913b47...xxxxx
Time.Started.....: Thu Feb 29 14:25:50 2024 (1 day, 6 hours)
Time.Estimated...: Fri Mar  1 20:42:17 2024 (0 secs)
Kernel.Feature...: Optimized Kernel
Guess.Mask.......: ?1?2?2?2?2?2?2?3 [8]
Guess.Charset....: -1 ?l?d?u, -2 ?l?d, -3 ?l?d*!$@_, -4 Undefined 
Guess.Queue......: 8/15 (53.33%)
Speed.#3.........:  7904.8 kH/s (6.86ms) @ Accel:16 Loops:256 Thr:1 Vec:4
Recovered........: 1/1 (100.00%) Digests (total), 1/1 (100.00%) Digests (new)
Progress.........: 252210831360/5533380698112 (4.56%)
Rejected.........: 0/252210831360 (0.00%)
Restore.Point....: 3138816/68864256 (4.56%)
Restore.Sub.#3...: Salt:0 Amplifier:3328-3584 Iteration:0-256
Candidate.Engine.: Device Generator
Candidates.#3....: Dstdvbwe -> H51badna
Hardware.Mon.SMC.: Fan0: 100%, Fan1: 100%
Hardware.Mon.#3..: Temp: 76c


Maybe I'm stupid but the password should be: hdxxxxvi ???
The only problem is that it doesn't work. 

Or should I do something else with it? Convert it to something else? Feeling really stupid at this moment that I can't fix it.

It's probably a false positive.
Use --keep-guessing
Reply