Friendly Reminder: ZIP Metadata is Not Encrypted (2024)

Published: 2023-10-02. Last Updated: 2023-10-02 06:36:36 UTC
by Didier Stevens (Version: 1)

ZIP archives store compressed files including their metadata (filesize, date/time, ...). When a contained file is password protected, the compressed data is encrypted, but the metadata is not.

As an example, take this ZIP file that I created. It contains a single file (mimikatz.exe), and that file is protected with a password (infected):

Friendly Reminder: ZIP Metadata is Not Encrypted (1)

Although the file is password protected, it's the compressed file content that is encrypted (see screenshot: Encrypted +) but the filename, the filsize, filedate, ..., all that metadata is not encrypted. That can be read without knowing the password.

I was involved in a forum discussion, where the OP shared a password protected ZIP archive of a file that the OP considered suspicious. For whatever reason, the OP wanted us to express our opinion about the file without having the opportunity to take a look at the file (the OP would share the password later with us). I could make an educated guess about the filecontent with the crc32 checksum.

Let me explain.

My tool zipdump.py can be used to analyze ZIP files using Python modules zipfile and pyzipper. But it can also parse the binary structure of a ZIP file, and extract all the relevant metadata in its raw form. I do this with option -f l (find list):

Friendly Reminder: ZIP Metadata is Not Encrypted (2)

First we see a PKZIP file record (named PK0304 by zipdump), then a PKZIP directory entry record (PK0102) and finally, a PKZIP end-of-directory record (PK0506).

All the metadata is in cleartext.

With the filename and the CRC32 checksum, I can make an educated guess about the file content. I download mimikatz.exe from github, and I calculate its crc32 checksum with hash.py:

Friendly Reminder: ZIP Metadata is Not Encrypted (3)

The crc32 checksum of the file inside the archive and the file that I downloaded, are the same. This is a weak indication that the files are the same.

crc32 is an error detection checksum, it is not a cryptographic hash. It's only 32 bits long, and it is easy to craft a file that produces a desired crc32 checksum. It is certainly not strong evidence.

The OP was surprised that metadata was not encrypted, so I was pretty sure that the crc32 had not been tampered with.

My trick worked because I had a good idea of what file was inside the archive. Wihout that information, it would have been impossible, because there are countless files with that crc32 checksum.

I think that this crc32 code is also used by Gmail to detect malicious files inside password protected ZIP files.

If you need to create archive files where metadata is also encrypted, you need to use other formats, like 7zip for example. Or double-ZIP your files.

Didier Stevens
Senior handler
Microsoft MVP
blog.DidierStevens.com

Friendly Reminder: ZIP Metadata is Not Encrypted (2024)

FAQs

Friendly Reminder: ZIP Metadata is Not Encrypted? ›

ZIP archives store compressed files including their metadata (filesize, date/time, ...). When a contained file is password protected, the compressed data is encrypted, but the metadata is not.

How to open an encrypted Zip file? ›

How to Extract Password Protected Zip Files with Password
  1. Open the protected file in WinRAR and enter your password.
  2. Then, set an extraction path option for your file by clicking "Extract To".
  3. You can start the extraction process now. 💡You may also be interested in this post if you are using WinRAR:
3 days ago

How do I remove encryption from a Zip file? ›

To remove encryption from the files that have been zipped, they would need to be extracted using the correct password. WinZip uses the password in combination with the appropriate key to decrypt the zipped data and recreate exact byte-for-byte duplicates of the originals.

Which zip program has encryption? ›

WinZip is a tool designed for sharing files and folders securely. It protects your data with encryption, password protection, and integration with cloud services.

How do I know if my zip file is encrypted? ›

In some cases, when you attempt to unzip files from (extract) or view files in a Zip file (. zip or . zipx) a Decrypt dialog will display requesting a password. This indicates that the files in your Zip file have been encrypted.

Are zip files automatically encrypted? ›

Encryption applies only to the contents of files stored within a Zip file. Information about an encrypted file, such as its name, date, size, attributes, CRC, and compression ratio, is stored in unencrypted form in the Zip file's directory and can be viewed, without a password, by anyone who has access to the Zip file.

How do I change a file from encrypted to normal? ›

To decrypt a file or folder:
  1. From the Start menu, select Programs or All Programs, then Accessories, and then Windows Explorer.
  2. Right-click the file or folder you want to decrypt, and then click Properties.
  3. On the General tab, click Advanced.
  4. Clear the Encrypt contents to secure data checkbox, and then click OK.
Jan 18, 2018

Is it possible to decrypt a Zip file? ›

On windows, you will need a zip program that supports password-protected (encrypted) zipfiles. Download and install the appropriate edition. Right click on the zipfile you've received, go to 7-Zip, click "Extract to (name of file)...". It will prompt you for the password, enter it, and the zip should be extracted.

How safe is an encrypted ZIP? ›

▼ Zip files encrypted with passwords are at high risk of compromise. Passwords-encrypted zip files are considered in the industry to be relatively simple to crack. Unlike website logins, encrypted zip files are easy for cybercriminals to access because unlimited password attempts are allowed.

Should I ZIP or encrypt first? ›

The correct order is to compress the file first and then encrypt the compressed data. This provides both security and efficiency benefits for protecting your sensitive information during storage or transmission.

Does Windows 10 support encrypted zip files? ›

Windows 10 provides an encryption feature as well, and you can follow these simple steps to use it: Right-click a file or a folder, and click “Properties.” Click “Advanced” and tick the “Encrypt contents to secure data” box. Click “o*k,” “Apply,” and then “o*k.”

How can I remove the encryption from ...Microsoft Communityhttps://answers.microsoft.com ›

Select the files and create a new .zip file without the password encryption. Delete the old encrypted file. The new file will not include the encryption. Hope t...
How to password protect a Zip file on Windows 10? This guide covers three simple ways to help you encrypt Zip files on Windows 10 by using WinRar, a file encryp...
You can protect the contents of a ZIP file, but unless you know the trick, you might as well not bother.

How to make a Zip file password-protected? ›

How to password-protect a ZIP file on Windows
  1. Right-click the ZIP file you want to protect with a password.
  2. Choose Properties and then Advanced.
  3. Select Encrypt contents to secure data.
  4. Click Apply.
  5. Decide which ZIP file elements you want to encrypt.
Apr 25, 2024

Is it safe to encrypt a Zip file? ›

Zip encryption is susceptible to known-plaintext attacks, which can reveal the encryption key when an attacker has access to both the encrypted and unencrypted versions of the same file. This vulnerability further undermines the security of Zip-encrypted files.

How to encrypt a folder to send via email? ›

How to encrypt a file
  1. Right-click (or press and hold) a file or folder and select Properties.
  2. Select the Advanced button and select the Encrypt contents to secure data check box.
  3. Select OK to close the Advanced Attributes window, select Apply, and then select OK.

Top Articles
The 20 Most Important Tools Ever
Company Registration, GST, Income Tax, Trademarks – ComplyKart
Hometown Pizza Sheridan Menu
How To Start a Consignment Shop in 12 Steps (2024) - Shopify
Ghosted Imdb Parents Guide
1970 Chevrolet Chevelle SS - Skyway Classics
Acbl Homeport
Zendaya Boob Job
Hallelu-JaH - Psalm 119 - inleiding
Guardians Of The Galaxy Vol 3 Full Movie 123Movies
Koop hier ‘verloren pakketten’, een nieuwe Italiaanse zaak en dit wil je ook even weten - indebuurt Utrecht
Craigslist Pikeville Tn
Telegram Scat
Account Suspended
Hermitcraft Texture Pack
A Biomass Pyramid Of An Ecosystem Is Shown.Tertiary ConsumersSecondary ConsumersPrimary ConsumersProducersWhich
Samantha Aufderheide
Self-Service ATMs: Accessibility, Limits, & Features
Rs3 Eldritch Crossbow
Free Personals Like Craigslist Nh
Yosemite Sam Hood Ornament
Www.craigslist.com Austin Tx
Weldmotor Vehicle.com
Elbert County Swap Shop
Olivia Maeday
Boxer Puppies For Sale In Amish Country Ohio
What Equals 16
Znamy dalsze plany Magdaleny Fręch. Nie będzie nawet chwili przerwy
Craigslist Hunting Land For Lease In Ga
Log in to your MyChart account
ATM, 3813 N Woodlawn Blvd, Wichita, KS 67220, US - MapQuest
How Much Is An Alignment At Costco
Que Si Que Si Que No Que No Lyrics
Metro By T Mobile Sign In
Smartfind Express Henrico
Rise Meadville Reviews
Hindilinks4U Bollywood Action Movies
Pp503063
Froedtert Billing Phone Number
Nsav Investorshub
Sound Of Freedom Showtimes Near Lewisburg Cinema 8
Sams Gas Price Sanford Fl
COVID-19/Coronavirus Assistance Programs | FindHelp.org
Ucla Basketball Bruinzone
Dontrell Nelson - 2016 - Football - University of Memphis Athletics
Unit 11 Homework 3 Area Of Composite Figures
Underground Weather Tropical
Grand Park Baseball Tournaments
Black Adam Showtimes Near Kerasotes Showplace 14
Divisadero Florist
Inloggen bij AH Sam - E-Overheid
Latest Posts
Article information

Author: Melvina Ondricka

Last Updated:

Views: 5963

Rating: 4.8 / 5 (68 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Melvina Ondricka

Birthday: 2000-12-23

Address: Suite 382 139 Shaniqua Locks, Paulaborough, UT 90498

Phone: +636383657021

Job: Dynamic Government Specialist

Hobby: Kite flying, Watching movies, Knitting, Model building, Reading, Wood carving, Paintball

Introduction: My name is Melvina Ondricka, I am a helpful, fancy, friendly, innocent, outstanding, courageous, thoughtful person who loves writing and wants to share my knowledge and understanding with you.