user1575903
user1575903

Reputation:

How to crack AES-128 encryption used in WinRar?

I'm trying to crack winrar's password using some methods as explained below.

Because rar uses AES-128 encryption, brute-force and dictionary attacks are useless as they would take years.
But, if we convert a password-protected rar file into an SFX archive (I'd prefer to winconsole because GUI takes much memory) that is an EXE format, I'm quite sure that it would be out of protection from winrar's gates.
Even then rar writes the encryption keys to that exe file.

So, if we could use an exe debugger or disassembler, can't we knock out the key that contains the password?
I used w32dasm, olly dbg & pe explorer to modify these exe files.
All I could find are the strings like "Extracting, CRC failed, Encrypted" and some other things. I used several sfx archives as test files (with different passwords) and tried it through disassembly. Those hexadecimal keys are looking quite similar!

So do I need a better disassembler or debugger? OR, someone tell me that if this method is useless and why?

Another question.. Does this following image has any link to winrar encryption? If yes, please explain how.. It would be very helpful. enter image description here

Upvotes: 9

Views: 40497

Answers (3)

David Schwartz
David Schwartz

Reputation: 2006

It is not easier to attack an SFX file versus a RAR file. A RAR archive consists of your compressed and (optionally) encrypted data. An SFX file is, like RAR, a package of compressed and encrypted data, but it also includes a miniature form of WinRAR that can decrypt the packaged data after the user enters the password.

The SFX file needs your password to decrypt your data; when you enter the wrong password, it's not because it tested your password against one embedded in the file. It means that when it tried to decrypt the data with the supplied password, something went wrong. This is all due to the magic of symmetric-key cryptography: the ciphertext (packaged within the RAR/SFX archive) goes through the AES decryption using the password you entered and the result (plaintext) is exported to whatever location you chose.

In conclusion, you'd have the same luck trying to break an SFX file as you would with RAR archive.

Upvotes: 1

I think the problem is that trying to change the file to an SFX does nothing to decrypt the already encrypted content of the file hence it won't work. The data is already encrypted. Unless the data is NOT encrypted, then you would have to undergo the decryption process to get to your data no matter what you did to the file. No?

Upvotes: 3

usr
usr

Reputation: 171168

When you create a password-protected SFX it does not store the password. It asks you for it.

You can't just "convert" password-protected content into not-protected content. If that was possible the encryption scheme would be completely worthless.

Upvotes: 20

Related Questions