EncryptedZip



When working in IT security, there are some questions that keep coming up, and I thought this one deserved to be answered once and for all: Is there any way to crack a password-protected zip file?

I understand how much we all want to be absolutely certain and reassured that our files will not be cracked — not now, not ever! For some time now, the .zip format has provided encryption as an added feature. But the type of encryption it offers depends on the program you use to create and open the zip file.

To encrypt an archive in 7-zip, once you’re at the Add to Archive dialog box, enter a password and select the Encryption method AES-256. You’ll find these options near the lower-right corner of the. Extract hashes from encrypted.zip or.rar or.7z files (1.1 GB max) First Choose a file. 7-Zip is a file archiver with a high compression ratio. Download 7-Zip 19.00 (2019-02-21) for Windows. Modified version of ruamel.std.zipfile that adds support for encrypted zip archives.

One of the .zip password protection algorithms is called ZipCrypto. ZipCrypto is supported natively on Windows, but it should never be used because it is completely broken, flawed, and relatively easy to crack. All hackers need to know is 12 bytes of plain text and where it is located in the zip (which can be easily found) in order to quickly decrypt the entire content of the archive. To give you an idea, on most laptops, it would usually takes less than a minute to decrypt the entire content of a zip file.

Exploiting ZipCrypto

Exploiting ZipCrypto through a widely known plain text attack is straightforward and doesn’t require sophisticated technical skills. Although I will walk you through the steps, I am obviously not doing so to help go out and hack someone. I simply want to show you how basic and easy this exploit really is.

Requirements

  • Download bkcrack from GitHub
  • Download encrypted.zip
  • (Optional) Download plain.zip

Encrypted Zip Password Recovery

Opening the zip file reveals an XML file called SomeXmlFile.xml.

Usually, XML files contain the following header at the beginning:

EncryptedZip

Steps

The procedure itself is quite simple:

1. Create a file named plain.txt.

2. Add the following text to plain.txt: <?xml version='1.0' encoding='UTF-8'?>

3. Zip the file and call it plain.zip. Do not use a password and use the same compression algorithm as the encrypted archive. (If you wish, you can download plain.zip using the link supplied above, which already has the plain.txt file in it.)

EncryptedZip

4. Feed both files to bkcrack using the following command line:

The final tool output should look like this:

Once the keys have been obtained, any files in the zip can be deciphered using the following command line:

This example extracted the Tux_ecb.jpg file. The resulting image should look like this:

Congratulations, you have successfully decrypted the zip file!

Additionally

Encrypted Zip File Windows 10

We included multiple files in the encrypted.zip (MIT License, HTML file), so that you can practice and go off the beaten track!

Encrypted Zip File Mac

AES-256

By now you’re probably wondering: If you should never use ZipCrypto, then what is the alternative? Well, we strongly recommend AES-256, which is the industry standard for zip encryption and has been proven to be quite strong and safe. Unfortunately, Windows does not have native support for this. However, most third-party archivers such as 7Zip, Winrar, and Winzip support it.