Join our Newsletter — 33% off our NHI Course
Home› Guides› Mark of the Web Guide: How MOTW Protects…
Guide Endpoint Security

Mark of the Web Guide: How MOTW Protects Downloads, Container Bypasses and Enforcement

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 12 min read
On this page

Several of the most effective Windows defences against downloaded malware only work if a file still carries its Mark of the Web. Mark of the Web (MOTW) is a small tag Windows writes to files that arrive from the internet, and SmartScreen, Office Protected View, Office internet macro blocking and Smart App Control all read it. When the tag is lost, through a container format, a non-NTFS volume or a careless exception, those controls quietly step aside. This guide explains how MOTW is stored, which controls depend on it, how it propagates through archives and disk images, the bypass classes defenders should know at a conceptual level, and how to enforce and monitor it. It is for Windows endpoint engineers and SOC analysts.

Key takeaways

  • MOTW is an NTFS alternate data stream: a stream named Zone.Identifier holds a ZoneId, and a value of 3 means the file came from the Internet zone.
  • Many controls depend on it: SmartScreen reputation checks, Protected View, the Office block on internet macros and Smart App Control all key off the tag.
  • Containers are the weak point: ISO, VHD and some archive formats have been used to deliver files that lose the tag after mounting or extraction, which ATT&CK tracks as T1553.005 Mark-of-the-Web Bypass.
  • Enforce with policy, not defaults: keep zone information preserved, hide the Unblock option, set the Office internet macro policy to Enabled, block container types at gateways and turn on the relevant ASR rules.
  • Hunt for files without a tag: executables and scripts launched from mounted images, extracted archive folders or removable media with no Zone.Identifier are a high-value detection.

What Mark of the Web is

When a browser, email client or other application saves a file from an untrusted location, it writes an alternate data stream named Zone.Identifier to the file. The stream contains a [ZoneTransfer] section with a ZoneId value; on Windows 10 and later it can also record the source and referrer URLs. Applications should apply the tag through the Windows IAttachmentExecute interface, which is how Chrome applies it; Firefox writes the stream directly.

ZoneIdZoneTypical meaning for a fileEffect on Office macros
0My ComputerCreated locallyNot treated as internet content
1Local intranetFrom a share or site mapped to the intranet zoneNot blocked as internet content
2Trusted sitesFrom a site added to Trusted sitesNot blocked as internet content
3InternetDownloaded from the web or saved from an email attachmentMacros blocked by default
4Restricted sitesFrom a site in Restricted sitesTreated as untrusted

Microsoft documents three limits that matter for defenders. MOTW exists only on NTFS, so copying a file to FAT32 or similar volumes drops it. Files synced by the OneDrive sync client, or opened from SharePoint with Open in Desktop App, are not tagged. And a user can remove the tag with the Unblock check box in file Properties or with Unblock-File, unless policy hides that option.

Analysts can inspect the stream read-only, for example by viewing filename:Zone.Identifier in a text viewer, or with Get-Content -Path file -Stream Zone.Identifier in PowerShell.

Controls that rely on MOTW (SmartScreen, Office macros, Protected View)

ControlWhat it does with MOTWWhat happens without the tag
Microsoft Defender SmartScreenRuns a reputation check when a tagged file is launched through the Windows shellNo reputation prompt at launch
Office Protected ViewOpens files downloaded from the internet in a read-only sandboxed viewFile opens in normal editing mode
Office internet macro blockingBlocks VBA macros in files with ZoneId 3 and shows the Security Risk bannerOlder Enable Content prompt, or macros run if policy allows
Smart App ControlBlocks launching some risky file types, including .iso, .vhd and .vhdx, when they carry MOTWThose checks do not apply
Office add-insExcel and PowerPoint add-ins from the internet load disabledAdd-in loads normally

The Office macro decision follows a fixed order documented by Microsoft: Trusted Location first, then a digital signature from a trusted publisher, then policy, then a previous Enable Content decision (Trusted Document), and only then the default internet block. Any of the earlier steps overrides MOTW, which is why exception design matters. See the Office Macro Blocking Guide for the rollout of macro policy, and Smart App Control and SmartScreen for those features.

The internet macro block applies to Access, Excel, PowerPoint, Project, Publisher, Visio and Word on Windows. It reached Current Channel in version 2206 on 27 July 2022 for the main apps, with Publisher and Project following in 2023 and 2024.

Propagation through archives and containers

MOTW protects the files inside a download only if the tool that opens the container copies the tag to each extracted or mounted file. Behaviour varies by tool and version:

Container or pathPropagation behaviourDefensive position
ZIP extracted with Windows ExplorerExplorer propagates MOTW to extracted filesPrefer the built-in extractor for internet archives
Third-party archive toolsVaries by product and version; for example 7-Zip made propagation an option from version 22.0Standardise tools and configure propagation on where offered
ISO, IMG, VHD, VHDX disk imagesThe image file is tagged; files inside have historically lost the tag when mounted, because many formats do not carry NTFS streamsBlock at gateways, remove auto-mount, keep Windows patched
Other archive formats (for example ARJ, GZIP)Listed by ATT&CK among formats used to carry payloads past MOTW checksBlock uncommon archive types at email and web gateways
Copy to FAT32, exFAT or optical mediaNo alternate data streams, so the tag is lostTreat removable media as untrusted; use the USB ASR rule
OneDrive sync and some remote copy toolsFiles arrive without MOTWRestrict who can write to synced libraries

Microsoft has closed several container and propagation gaps through Windows security updates, and archive tool vendors have changed defaults over time. Treat propagation as a moving target: keep Windows and archive tools current, and do not rely on MOTW as the only control for any file type.

Known bypass classes at a high level

These classes are described so defenders can map controls to them. They are not instructions. ATT&CK groups them under T1553.005 Mark-of-the-Web Bypass, part of T1553 Subvert Trust Controls.

  • Container stripping: payloads inside disk images or archives lose the tag on mounting or extraction.
  • File system stripping: moving files to a volume without alternate data streams removes the tag.
  • Trust shortcuts: abusing Trusted Locations, Trusted sites mappings (for example an entire SharePoint tenant) or broadly trusted publisher certificates, so the MOTW check is never reached.
  • Handling flaws: malformed signatures or file structures that cause a dependent control to skip its check even though the tag is present. These are fixed by vendor updates.
  • Social engineering the user: persuading the user to click Unblock, or to copy a file to a synced or local folder before opening it.
  • Delivery without a download: techniques such as HTML smuggling assemble the file in the browser, which then saves it; the browser normally still applies MOTW. See the HTML Smuggling Guide.

Enforcement with policy and ASR

Attachment Manager policies

Policy (User Configuration, Windows Components, Attachment Manager)Registry valueRecommended stateWhy
Do not preserve zone information in file attachmentsSaveZoneInformationDisabledDisabled or not configured means Windows marks attachments with zone information
Hide mechanisms to remove zone informationHideZoneInfoOnPropertiesEnabledHides the Unblock button and check box from users
Notify antivirus programs when opening attachmentsScanWithAntiVirusEnabledThe registered antivirus scans attachments when opened and blocks them if the scan fails

All three sit under Software\Microsoft\Windows\CurrentVersion\Policies\Attachments and are available through the AttachmentManager Policy CSP for Intune.

Office and zone settings

  • Macro policy: set "Block macros from running in Office files from the Internet" to Enabled for each app. Microsoft includes it in the Microsoft 365 Apps security baseline. These policies require Microsoft 365 Apps for enterprise.
  • Trusted Locations: keep them few, local and write-protected. Files there skip the MOTW check.
  • Trusted sites: do not add whole SharePoint or OneDrive tenants to Trusted sites unless write access is tightly controlled, because Microsoft notes this bypasses the macro block for anything uploaded there.
  • Signed macros: trusted publisher certificates apply Windows-wide; deploy only certificates you control.

Container controls

  • Gateways: block or quarantine .iso, .img, .vhd and .vhdx attachments and downloads where there is no business need, as ATT&CK mitigation M1038 Execution Prevention suggests. See the Email Security Guide.
  • Auto-mount: ATT&CK mitigation M1042 Disable or Remove Feature or Program suggests changing Explorer file associations so these images do not mount on double-click. This does not remove the mount capability itself.

Attack surface reduction rules

ASR ruleGUIDRelevance
Block executable files from running unless they meet a prevalence, age, or trusted list criterion01443614-cd74-433a-b99e-2ecdc07bfc25Stops rare executables even when MOTW was lost; needs cloud-delivered protection
Block executable content from email client and webmailbe9ba2d9-53ea-4cdc-84e5-9b1eeee46550Blocks executables, scripts and archives dropped by mail clients
Block JavaScript or VBScript from launching downloaded executable contentd3e037e1-3eb8-44c8-a917-57927947596dBreaks script-based second stages
Block all Office applications from creating child processesd4f940ab-401b-4efc-aadc-ad5f3c50688aLimits damage if a macro runs
Block untrusted and unsigned processes that run from USBb2b3f03d-6a65-4f7b-a9c7-1c7ef74a9ba4Covers the removable media path where MOTW is absent

For deployment in audit then block mode, see How to Deploy Attack Surface Reduction Rules. Application control adds a layer that does not depend on MOTW at all: see App Control for Business (WDAC).

Rollout and rollback

  1. Baseline: report current Attachment Manager, Office macro and ASR settings across the estate.
  2. Audit: put the ASR rules in audit mode and gateway container blocking in quarantine-and-notify for two to four weeks; review what would have been blocked.
  3. Pilot: enforce Attachment Manager and Office policies on an IT pilot ring; confirm line-of-business templates and add-ins still load from approved Trusted Locations.
  4. Enforce: move ASR rules to block by ring, and block container types at gateways with an exception request process.
  5. Roll back narrowly: if a business process breaks, add a scoped exclusion or a specific Trusted Location for that team, never a tenant-wide Trusted sites entry or a global policy reversal.

Small and large organisations: a small organisation on Microsoft 365 Apps for business cannot use the Office macro policies, so it relies on the default internet block, gateway filtering and ASR rules through Intune. A large estate should manage all three layers by policy and measure them.

Detection and hunting

  • Executions from mounted images: processes whose image path is on a newly mounted virtual drive, shortly after an .iso, .img or .vhd(x) file was downloaded or opened from email. ATT&CK detection strategy DET0257 describes this correlation.
  • Executions from archive extraction folders: scripts and executables launched from temporary extraction paths or user Downloads subfolders without a Zone.Identifier stream.
  • Stream creation telemetry: Sysmon Event ID 15 (FileCreateStreamHash) records alternate data stream creation, including Zone.Identifier, and can capture its contents. Missing streams on files that arrived through a browser are worth investigating. See the Sysmon Guide.
  • Unblock activity: use of Unblock-File or removal of Zone.Identifier streams by scripts on user endpoints.
  • ASR telemetry: in Defender for Endpoint advanced hunting, the DeviceEvents table records ActionType values such as AsrUntrustedExecutableBlocked, AsrExecutableEmailContentBlocked and the matching ...Audited values. See the Defender for Endpoint Advanced Hunting Tables Guide.
  • Policy drift: alert when SaveZoneInformation is set to 1, when HideZoneInfoOnProperties is removed, or when new Trusted Locations or Trusted sites entries appear.

Metrics

  • Percentage of endpoints with all three Attachment Manager policies at the recommended state.
  • Percentage of Office users covered by the internet macro block policy set to Enabled.
  • ASR rules in block mode as a share of planned rules, and audit hits per 1,000 devices before enforcement.
  • Container attachments and downloads blocked at gateways per month, and exception requests approved.
  • Number of Trusted Locations and Trusted sites entries, trending down.

Framework mapping

FrameworkReferenceApplication
MITRE ATT&CKT1553.005 Mark-of-the-Web Bypass; T1566.001 Spearphishing Attachment; T1204.002 Malicious FileThreat model for container and attachment delivery
MITRE ATT&CK mitigationsM1038 Execution Prevention; M1042 Disable or Remove Feature or ProgramGateway blocking and auto-mount removal
NIST SP 800-53 Rev 5SI-3 Malicious Code Protection; CM-7 Least Functionality; SI-4 System MonitoringASR, container restrictions, hunting
NIST CSF 2.0PR.PS-05 unauthorised software execution prevented; DE.CM-09 computing and software monitoredEnforcement and detection

Common failure patterns

  • Whole tenant in Trusted sites: adding SharePoint or OneDrive domains to Trusted sites to stop user complaints, which removes the macro block for anything anyone uploads.
  • Unblock left visible: users are trained by habit to click Unblock or Enable Content.
  • Container types allowed through mail: ISO and VHD attachments with no business need still delivered to inboxes.
  • Archive tool sprawl: users installing extractors that do not propagate MOTW, or with propagation turned off.
  • MOTW treated as the only layer: no ASR, application control or EDR coverage for files that arrive untagged by USB, sync or file share.
  • Patch lag: MOTW handling fixes arrive in Windows security updates, so delayed patching leaves known gaps open.

Practitioner checklist

  • Set Do not preserve zone information to Disabled, Hide mechanisms to remove zone information to Enabled, and Notify antivirus programs to Enabled.
  • Enable "Block macros from running in Office files from the Internet" for every Office app in use.
  • Review and minimise Trusted Locations, Trusted sites entries and trusted publisher certificates.
  • Block .iso, .img, .vhd and .vhdx at email and web gateways unless there is a documented need.
  • Remove double-click auto-mount for disk images and standardise on archive tools that propagate MOTW.
  • Deploy the ASR rules above in audit, then block, by ring.
  • Collect Sysmon Event ID 15 and ASR events, and hunt for untagged executions from mounted images and extraction folders.
  • Keep Windows, Office and archive tools on current security updates.

Standards and references

Related NHI Mgmt Group resources: Office Macro Blocking Guide · Smart App Control and SmartScreen · How to Deploy Attack Surface Reduction Rules · HTML Smuggling Guide · Malicious LNK Files Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.