Are there legit services offering brute-force cracking? How long would it take, and how much it would it cost?
Are there legit services offering brute-force cracking? How long would it take, and how much it would it cost?
% Trailer dictionary
trailer
<<
/Size 95 % number of objects in the file
/Root 93 0 R % the page tree is object ID (93,0)
/Encrypt 94 0 R % the encryption dict is object ID (94,0)
/ID [<1cf5...>] % an arbitrary file identifier
>>
Use the object id to find the encryption dictionary: % Encryption dictionary
94 0 obj
<<
/Filter /Standard % use the standard security handler
/V 1 % algorithm 1
/R 2 % revision 2
/U (xxx...xxx) % hashed user password (32 bytes)
/O (xxx...xxx) % hashed owner password (32 bytes)
/P 65472 % flags specifying the allowed operations
>>
endobj
Generally, if /V and /R are both 4 or less, you can find tools to crack it yourself on a normal PC.More info on the values of /V and /R here: https://qpdf.readthedocs.io/en/stable/encryption.html
20 0 obj
<<
/R 4
/O (...)
/U (...)
/P -1548
/Length 128
/V 4
/EncryptMetadata true
/Filter /Standard
/StmF /StdCF
/StrF /StdCF
/CF <<
/StdCF <<
/AuthEvent /DocOpen
/CFM /AESV2
>>>>>>
endobj
I tried a bunch of tools, including https://www.elcomsoft.com/apdfpr.html?src=prog_apdfprp to get it to quickly remove the password, but nothing worked :/So you're left with brute force or dictionary attacks for your 10 char A-Za-z0-9 password.
Definitely better to do this in a VM, but then your performance would take a hit
Also, is the password completely random? If it's not, you'd have a much easier time using a large dictionary rather than every possible 10-character word.
As in the article, it looks like on a consumer GPU you'd get on the order of 10MH/s, or 10 million hashes per second. I need someone to check my math on this, but 36**10/10_000_000 GPU-seconds (36 characters, optimistically assuming [a-z0-9] lowercase) is about 4000 GPU-days, so out of reach. The A100 attempt from the article only made it about 15x faster, so you'd still need to wait a few months at best. (This is with the assumption you know it's pure lowercase.)
Can someone confirm my math on this?
[0] https://security.stackexchange.com/questions/61346/how-long-...
Also I didn't discuss entropy here in order to represent it more basically for the parent comment.