7-zip has finally added support for the long-requested 'Mark-of-the-Web' Windows security feature, providing better protection from malicious downloaded files.
When you download documents and executables from the web, Windows adds a special 'Zone.Id' alternate data stream to the file called the Mark-of-the-Web (MoTW).
This identifier tells Windows and supported applications that the file was downloaded from another computer or the Internet and, therefore, could be a risk to open.
When you attempt to open a downloaded file, Windows will check if a MoTW exists and, if so, display additional warnings to the user, asking if they are sure they wish to run the file.
Microsoft Office will also check for the Mark-of-the-Web, and if found, it will open documents in Protected View, with the file in read-only mode and macros disabled.
To check if a downloaded file has the Mark-of-the-Web, you can right-click on it in Windows Explorer and open its properties.
If the file contains a MoTW, you will see a message at the bottom stating, "This file came from another computer and might be blocked to help protection this computer."
If you trust the file and its source, you can put a check in the 'Unblock' box and click on the 'Apply' button, which will remove the MoTW from the file.
Furthermore, running the file for the first time and allowing it to open will also remove the MoTW, so warnings are not shown in the future.
7-zip adds support for Mark-of-the-Web
7-zip is one of the most popular archiving programs in the world, but, until now, it lacked support for Mark-of-the-Web.
This meant that if you downloaded an archive from the Internet and extracted it with 7-zip, the Mark-of-the-Web would not propagate to the extracted files, and Windows would not treat the extracted files as risky.
For example, if you downloaded a ZIP file containing a Word document, the ZIP file would have a MoTW, but the extracted Word document would not. Therefore, Microsoft Office would not open the file in Protected View.
Over the years, numerous security researchers, developers, and engineers have requested that the 7-Zip developer, Igor Pavlov, add the security feature to his archiving utility.
Pavlov said he doesn't like the feature as it adds extra overhead to the program.
"The overhead for that property (additional Zone Identifier stream for each file) is not good in some cases," explained Pavlov in a 7-zip bug report.
However, this all changed last week after Pavlov added a new setting in 7-zip 22.00 that enables you to propagate MoTW streams from downloaded archives to its extracted files.
To enable this setting, search for and open the '7-Zip File Manager,' and when it opens, click on Tools and then Options. Under the 7-Zip tab, you will now see a new option titled 'Propagate Zone.Id stream' and the ability to set it to 'No,' 'Yes,' or 'For Office files.'
Set this option to 'Yes' or 'For Office files,' which is less secure, and then press the OK button.
With this setting enabled, when you download an archive and extract its files, the Mark-of-the-Web will also propagate to the extracted files.
In the command-line version of 7-zip (7z.exe), you can use the new -snz
argument to propagate the Mark-of-the-Web stream to the extracted files.
For example:
"c:\Program Files\7-Zip\7z.exe" e -snz test.zip
With this additional security, Windows will now prompt you as to whether you wish to run downloaded files and Microsoft Office will open documents in Protected View, offering increased security.
To take advantage of this new feature, you can download 7-zip 22.0 from 7-zip.org.
Update 6/21/22: Added information about the -snz flag for the command-line version of 7-zip.
Comments
TsVk! - 2 years ago
Seems like a good feature, but will no doubt be leveraged as an attack vector\false trust deception in the future. More surface...
survivor303 - 2 years ago
what hell we living if people really want more popups and warning messages to their screens?!?!
NoneRain - 2 years ago
The thing is: the end user is dumb.
They barely reads messages, and if you don't pop-up in their face saying: THIS MIGHT BE A VIRUS, they will happily infect your network asap.
It's the same principle in adding a header in corporate e-mails saying "this e-mail comes from an external source, and may be insecure. Don't open links blablabla". The user know an external e-mail may be fraudulent, yet, if you don't put it right in their face to reminder em, well....
Agret - 2 years ago
Your screenshot for opening a mark of the web file is incorrect, that's the UAC dialog when a process requests admin elevation. Mark of the web is the other dialog with the little red caution symbol on the left side confirming if you want to open the file and can apply to other file types rather than just exes.
Lawrence Abrams - 2 years ago
Thanks, it is now fixed. Included a non-admin MoTW warning and an admin, which is shown as a UAC. Note the file origin in the UAC prompt.
AATW_82nd - 1 year ago
Thank you for the great article. If I'm deploying to 1000's of devices, how can I enable "Propagate Zone.Id Stream" at the time of installation. I can't seem to find a config file or registry settings.