Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

I would like to know how to extract contents of the password protected WinRar file without the password.

I have downloaded that WinRar file from a file hosting website and found out that it was password protected after I downloaded it. I would like to know is there any way to “unprotect” a password protected file so I can decompress the contained files.

Brute-force attacks take ages. One thing is that I found out that brute force attacking tries every combination of words from the word-list. Therefore, I would like to know if it is possible to brute force attack the file using individual passwords one-by-one, instead of going through all possible permutations of all the individual passwords contained in my word-list.

share|improve this question
    
it's not exactly "decrypt this data for me", but it's close enough and I can't see the use of this question for anyone else. –  tylo May 9 at 10:54
add comment

3 Answers 3

Why can't you simply ask the person who made that file to tell you the password?

No one knows how to decode an AES-encrypted file, such as password-protected WinRar files, without knowing the password.

As far as we know, the only way to decode AES-encrypted files is to somehow obtain the right password, and then use that password to decrypt the file.

In the movies, sometimes you see people "cracking" a password. They try all possibilities for the first letter, and then when they get the first letter right, they try all the possibilities for the second letter, etc. Eventually all the letters fill in, and the then the actor has the whole password.

It doesn't work like the movies with AES. AES passwords are all-or-nothing. If you get all-but-one of the letters right when typing in your password, you get exactly the same "failed" message as if you typed in a completely wrong password. (It's not possible to distinguish the random-looking gibberish from decoding with an almost-correct key from other random-looking gibberish from decoding with a completely wrong key). It's not possible to tell if one guess is "closer" to the right password than another guess.

(There are various "timing attacks" that, with some systems, can tell a researcher if one guess is "closer" to the right password than another, but they don't work on AES-encrypted files).

There are various "password unlocker" programs that will try one guess at a time until they stumble on the correct WinRar password. If the person who made the password-protected WinRar file picked a "strong" password -- for example, a passphrase of 8 words randomly chosen using dice from a short dictionary -- we expect that it will take more than a thousand years to stumble across the correct password. If that person picked a "very weak" password -- such as a single word in the dictionary, or a single dictionary word followed by a single digit, or a single word repeated 8 times, or a sequence of 5 completely random characters -- we expect that it will take less than a day for that program to run through all those very weak passwords and find the correct one.

EDIT:

According to Wikipedia: WinRAR, the "method of encryption" used by WinRAR is the AES (Advanced Encryption Standard) with a 128-bit key.

I agree with Thomas. It's probably hopeless trying to crack it without knowing anything about the password. If you do find a way to crack AES, Bruce Schnier, the readers of crypto stackexchange, and every other cryptographer on the planet would be fascinated to find out, especially those cryptographers who work at the SVR, the NSA, and other intelligence agencies.

share|improve this answer
    
I just don't know the author who uploaded it. I found that file on a file hosting website and I downloaded it. The author is nowhere to be found. By the Way Could you explain me the methods of encryption of winrar files, Because my knowledge in cryptography is nearly zero. Thanks! –  Titan Zack Jul 19 '12 at 4:48
    
@TitanZack Sometimes hosting websites use their website name (e.g. www.foo.com) as passwords, for reasons I cannot fathom. You should look and see if there isn't any info on the website (or wherever you found the link to the file) about why the files are password-protected and what the password is before attempting a brute force that is probably hopeless. –  Thomas Jul 19 '12 at 8:14
4  
The method of encryption is less important. The interesting part is what kind of KDF WinRAR uses, –  CodesInChaos Jul 21 '12 at 8:44
    
@CodesInChaos And they are using PBKDF2 it seems. That's a reasonably secure KDF I'm afraid, and the iteration count seems OK as well. Note the high amount of links in the link I posted, I won't repeat them here. There is also a link to a brute force application. Note that AES in ECB mode is claimed to be used in 2004 (but that won't be of too much help either, I guess). –  owlstead May 10 at 13:15
add comment

I've got two possible solutions for you:

  1. On file hosting platforms uploaders tend to use one password for all files they upload. So on huge file-sharing forums there are not as many possible passwods as files but as many possible passwords as users. That reduces the set of passwords that are very likely to be correct to a few hundred. And I'd bet someone collects all these passwords and makes them available.

  2. As long as you recently downloaded the file all the pages that finally led you to the download-link are still in your browsers history. Uploading something password-protected and meant for the public without providing the password at some central place is nonsense. Therefore, the password should be on one of these webpages in your browser-history.

In general, as the others already said, password protected ZIP and RAR files are encrypted. "Undoing" encryption without the correct password is impossible. Guessing a password may work but file-sharing passwords (e.g. x.X.RiDDiCK.X.x) will definitel resist a general dictionary attack.

share|improve this answer
add comment

According to the RarLab website as well as the RAR changelogs, the encryption algorithm of (Win)Rar was changed to AES (Advanced Encryption Standard) with a 128 bit key length, starting with version 3.0. WinRar 3.0 was released around and about Jun 22, 2002, so chances are high you’re facing AES here!

Trying to be faster than brute-forcing the unknown password would mean you would need to find a practical way to attack on AES which quicker than brute-forcing.

At the time of writing, no such practical attack is known.
(In the unlikely case you find such an attack, publish a paper and become famous!)

Long story short: you will not be able to take a short-cut here. Your only two options are: “brute-force the file”, or “forget-about-it”. That is, unless you learn the password by asking the owner who protected the file, or by finding the place where the owner who protected the file may have published the password.

As for your question if brute-forcing using word-lists instead of symbol/password permutations could work: yes, it “could” work… if the password is contained in your word-list. To try that option, you can create a simple script or program that reads the word-list and tries to apply the contained passwords one-by-one. But explaining how to practically do that is too broad, and greatly depends on the scripting or coding language you prefer and choose to use. Personally, I’ld probably go for C/C++ using the available RarLib API as that’s most probably one of the fastest options to handle things in this case.

share|improve this answer
1  
You forgot the option involving a lot of money and a large stick :) –  owlstead May 10 at 0:02
    
@owlstead Or there’s the option involving a 3rd party and a stick… outsourcing stuff using 3rd-party contractors seems to be “in” nowadays. ;) –  e-sushi May 10 at 12:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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