Zip File Analysis¶
Tools¶
zipdetails7z
Basic Inspection¶
- List files in the archive.
- List detailed information for each file.
- Shows CRC for each file.
- Shows compression and encryption method for each file.
- Detailed, low-level view of ZIP structure and metadata.
Encryption Method = ZipCrypto¶
- Legacy ZIP encryption (often shown as
ZipCryptoor justZip). - Vulnerable to a known-plaintext attack.
- Tools like
bkcracktypically require at least 12 consecutive known plaintext bytes from an encrypted file. - More known plaintext usually makes the attack faster and more reliable.
Attack Steps¶
Create a ZIP (plaintext.zip) from a file (plaintext.txt) that contains plaintext known to also appear inside the encrypted ZIP’s target file.
Check the CRC of the target encrypted file and verify it matches the CRC of the file inside plaintext.zip.
Recover the internal ZipCrypto keys by providing:
-C→ the encrypted ZIP file.-c→ the name of the encrypted file inside that ZIP.-P→ the ZIP containing the known-plaintext file.-p→ the known-plaintext file inside that ZIP.
Use the recovered keys (<key0> <key1> <key2>) to:
- Create
<output_zip>with a new password<new_password>, or - Otherwise decrypt/re-encrypt the archive content.