1

In fcrackzip man they say :

the more files you provide, the better.

I want to know why. What's the method it uses to retrieve the password?

2

The full description reads

fcrackzip searches each zipfile given for encrypted files and tries to guess the password. All files must be encrypted with the same password, the more files you provide, the better.

Looking at the command-line options tells you the different modes how it guesses the password, which are basically either a dictionary attack or brute-forcing with different password specifications. There is no cryptoanalytic deep magic which would benefit from having more cyphertext.

Let's say the attacker has 20 files. They know they are encrypted with the same password, but they don't know which one. When they pass all 20 files at once, fcrackzip would try to guess the password for the first file, and when it found the correct one, it will try the same password on all 19 other files, cracking them all at once. But when the attacker passes the 20 files one after another, fcrackzip will restart the brute-forcing for each file.

  • 1
    Actually, using multiple files means that it can try to analyze all of the zips to eliminate impossible passwords to reduce overall processing time. It's the same theory as trying to hack encrypted network packets. – phyrfox Jun 29 '14 at 16:48
2

The old zip format contains a check byte (or sometimes even 2) for each archive entry to quickly verify if the password is right or wrong. This check byte is verified against the last byte of the decrypted 'decryption header'.

From PkWare's APPNOTE.TXT:

After the header is decrypted, the last 1 or 2 bytes in Buffer SHOULD be the high-order word/byte of the CRC for the file being decrypted, stored in Intel low-byte/high-byte order. Versions of PKZIP prior to 2.0 used a 2 byte CRC check; a 1 byte CRC check is used on versions after 2.0. This can be used to test if the password supplied is correct or not.

Most bruteforce crackers (like fcrackzip or yazc) use the assumption that each file in the archive is encrypted using the same password and thus use multiple check bytes (each file has one check byte) to eliminate false positives more quickly. False positives happen quite often (1/256) when testing massive amounts of passwords and reduce the speed of the recovery quite a lot (you basically have to decrypt and inflate at least one file and test the crc to identify a false positive).

So, that's the reason behind multiple files, just an assumption to make the process go faster.

Note: In the case of the original fcrackzip, each false positive was tested by actually calling the 'unzip' command and testing the output of the command (which is painfully slow).

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.