4

I have a RAR file that I password protected 10+ years ago and (you guessed it) can't remember the password now. What I do remember is the possible pieces of that password so I created a dictionary with over 820 million entries.

Using the UnRAR.DLL from RARLAB and feeding it my passwords one at a time (per available CPU core) works, but only at 1/5 the speed compared to "professional" password recovery apps out there.

So my question is this: is there an alternative (faster) library that is specifically optimized for RAR password recovery? It doesn't need to be able to do the actual unpacking - just the encryption verification to find the actual password in the very long list.

I'm writing in C++ on Windows but would be satisfied with other platforms/languages.

Let me re-iterate one point. I'm specifically looking for a high-performance library as I already have a solution (using the UnRAR.DLL) which is "good enough" but would like to find something that works 4-5 times faster.

  • 1
    Professional recovery apps might use GPU for that performance. – Thomas Weller Nov 23 '15 at 20:10
  • Why does it need to be a library? As you said, there are password recovery tools available that are fast. Why would you program it yourself? Especially because you didn't tag as "gratis", it may happen that someone suggests a library that is even more expensive than a recovery tool. Please clarify. – Thomas Weller Nov 23 '15 at 20:11
  • All the available tools have one flaw or the other (only because my case is special) and are generic by nature which makes them be "good" at all the tasks equally. I, however, need a specialized solution that does a whole bunch of shortcutting to optimize the performance which is why I'm building my own tool (actually have already built it). And the need for a library is - I was in no mood of reverse engineering the UnRAR.DLL. Though in all the honesty I ended up using the source available from RAR Labs and patched it for my needs. – YePhIcK Nov 24 '15 at 12:14
  • "Professional recovery apps might use GPU for that performance" - this is true for a general-purpose solution and they do use it for brutal-force attack. Which is not what I need - I need a dictionary attack (did you read my original post in its entirety?). – YePhIcK Nov 24 '15 at 12:16
  • 1
    The performance is not related to the type of attack. If it is 5 times faster on GPU, it is 5 times faster for a brute force attack or a dictionary attack. – Thomas Weller Nov 24 '15 at 16:50
2

How about SharpCompress? It's a library that would allow you to unrar rar files. It's open source and can be found on GitHub.

SharpCompress

SharpCompress is a compression library for .NET/Mono/Silverlight/WP7 that can unrar, un7zip, unzip, untar unbzip2 and ungzip with forward-only reading and file random access APIs. Write support for zip/tar/bzip2/gzip are implemented.

  • 1
    Interesting. However a quick scan through the source code shows that this library is quite obviously targeting the higher-level integration (CLI) and is geared towards functionality rather than speed. I am specifically looking for a speedy code (potentially at a cost of some functionality). – YePhIcK Sep 24 '15 at 3:39
  • 2
    @YePhIcK: did you try it? Just because it is IL does not mean it is slow. The JIT compiler does quite a good job – Thomas Weller Nov 23 '15 at 20:08
  • I did try it. Not satisfied :( In the end I ended up patching the source (available from RAR Labs) to optimize the performance for my own special needs – YePhIcK Nov 24 '15 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.