Menu

Patterns, Multi-core, User and Owner Paswords

Shreepad S
2015-09-06
2016-07-28
  • Shreepad S

    Shreepad S - 2015-09-06

    Hi

    I've forked the latest pdfcrack to enable simple patterns (e.g. [abc][abc][123][123]) and multi-core support based on OpenMP.

    This works for all PDF security revisions (including Rev 5) and covers both user and owner passwords.

    Pls see this: https://github.com/shreepads/pdfcrack-mp/tree/baseopenmp

    This is pretty much work in progress, but includes tests. Just run 'make test' to get an idea of what is supported and 'make perftest' for performance comparisons.

    I've changed the basic method to get passwords and comparable tests show anywhere from 1.5 to 3 times improvement (depending on the revision) on a dual-core with HT machine.

     
  • Henning Noren

    Henning Noren - 2015-09-25

    That is so cool! I really like that you have added public tests, which has been very much needed (I have a private one, but can unfortunately not share it).

    I just released 0.15 which contains all the small bits and bobs fixed during the last year, mostly so that you can pick it up and continue on your end.
    As the progress on this project have pretty much stalled (I neither have the time or interest to put in it), I really wish you best of luck and hope that you can pick up the torch.

     
  • Shreepad S

    Shreepad S - 2015-09-26

    Thanks Henning, yes the tests have been very handy.

    I will update the master and merge 0.15 in... All the changes I make are in the 'baseopenmp' branch BTW...

    Have you looked at this issue logged on the pdfcrack-ng clone on github?
    https://github.com/x2q/pdfcrack-ng/issues/2

    It looks like there is a new PDF security revision 6 in play... If you're not working on this any more I'm happy to give rev 6 a shot, but may need your help. First thing would be from where can I get the specs on the rev 6 security?

    EDIT: Pls also see https://github.com/shreepads/pdfcrack-mp/issues for list of to-do items...

     

    Last edit: Shreepad S 2015-09-26
  • Henning Noren

    Henning Noren - 2015-09-26

    The specifications for PDF 1.7 extension level 8 are not public as far as I am aware. I am also not aware of any open implementation of the encryption standard 6 in PDF.
    I am not working on it and will not deal with it anytime soon.

     
  • Shreepad S

    Shreepad S - 2015-09-26

    Thanks! That seems useful... Now to find someone who can give me a test doc!

     
  • Shreepad S

    Shreepad S - 2015-11-22

    Am pretty much done with the patterns related work. It now supports regex like character classes with support for ranges of repitition for each (in addition to the basic list of chars patterns).

    You can now run something like this test in the Makefile:

    ./pdfcrack -t 4 -e "[:upper:]{1,2}[:lower:]{2,3}[:digit:][:punct:]" ./testpdfs/TestPDF7.pdf
    

    This will use 4 threads of execution in parallel to find a password that

    • Starts with an uppercase letter
    • Followed by 1 to 2 lower case letters
    • Followed by 2 to 3 digits
    • And one punctuation mark

    Next up, am planning to add a character class [:word:] which will include words from a wordlist so you can have a pattern like this

    {4,8}[:word:]{2,3}[:digit:][:punct:]
    

    Word is going to be special

    • It can only appear once
    • The leading range {4,8} indicates that it should use words from the wordlist that are at least 4 chars and if longer than 8 chars truncate to 8 chars

    Still need a test PDF file for the new PDF security revision 6...

     

    Last edit: Shreepad S 2015-11-22
    • Stefan

      Stefan - 2016-07-28

      Hi, this is great. I'm trying to find a password on an old Dell with 4x Xeon processors and will benefit immensely from the multi cpu support.

      However, as per your notes only the pattern search benefits from the multi core support but I can't for the life of me formulate a pattern which simply mimics the regular "random with increasing character number". Is that something you can help me with?

       

Log in to post a comment.