T1553.005

Mark-of-the-Web Bypass

Adversaries abuse container file formats such as ISO disk images, VHD/VHDX virtual hard disks, and compressed archives (ZIP, RAR, 7z, ARJ) to deliver malicious payloads that bypass Mark-of-the-Web (MOTW) protections. When a container file is downloaded from the Internet, Windows tags it with a Zone.Identifier NTFS Alternate Data Stream (ZoneId=3), but files extracted or mounted from containers typically do not inherit this tag because MOTW is an NTFS feature and many container formats do not support NTFS ADS. This allows embedded executables, scripts, and LNK files to bypass Protected View in Microsoft Office, Windows Defender SmartScreen warnings, and other MOTW-dependent security controls. Adversaries also directly manipulate or delete the Zone.Identifier ADS from already-downloaded files (Amadey sets ZoneId=0; attackers use streams.exe or PowerShell Remove-Item -Stream). This technique has been widely adopted by TA505 (ISO/LNK chains), QakBot (ISO packaging), APT29 (ISO/VHDX embedded in HTML), and APT38 (ISO/VHD delivery).

Microsoft Sentinel / Defender
kusto
// T1553.005 — Mark-of-the-Web Bypass Detection
// Four detection branches: ADS deletion, PowerShell mounting, execution from mounted volume, ADS manipulation tools
let ZoneIDDeletion = DeviceFileEvents
    | where Timestamp > ago(24h)
    | where ActionType == "FileDeleted"
    | where FileName has ":Zone.Identifier" or FolderPath has ":Zone.Identifier"
    | extend DetectionType = "Zone.Identifier_ADS_Deleted"
    | project Timestamp, DeviceName, AccountName, DetectionType, FileName, FolderPath,
              InitiatingProcessFileName, InitiatingProcessCommandLine;
let DiskImageMount = DeviceProcessEvents
    | where Timestamp > ago(24h)
    | where FileName in~ ("powershell.exe", "pwsh.exe")
    | where ProcessCommandLine has_any ("Mount-DiskImage", "Mount-VHD")
          or (ProcessCommandLine has_any (".iso", ".vhd", ".vhdx", ".img")
              and ProcessCommandLine has_any ("mount", "attach", "diskpart"))
    | extend DetectionType = "DiskImage_Mount_PowerShell"
    | project Timestamp, DeviceName, AccountName, DetectionType, FileName,
              ProcessCommandLine as CommandInfo, InitiatingProcessFileName, InitiatingProcessCommandLine;
let SuspiciousVolumeExec = DeviceProcessEvents
    | where Timestamp > ago(24h)
    | where FolderPath matches regex @"^[D-Z]:\\"
    | where FileName endswith ".exe" or FileName endswith ".dll" or FileName endswith ".lnk"
          or FileName endswith ".js" or FileName endswith ".vbs" or FileName endswith ".hta"
    | where InitiatingProcessFileName in~ ("explorer.exe", "cmd.exe")
    | where not (FolderPath has_any ("Program Files", "Games", "Steam", "GOG", "Epic Games"))
    | extend DetectionType = "Exec_From_Mounted_Volume"
    | project Timestamp, DeviceName, AccountName, DetectionType, FileName, FolderPath,
              ProcessCommandLine as CommandInfo, InitiatingProcessFileName, InitiatingProcessCommandLine;
let ADSManipulation = DeviceProcessEvents
    | where Timestamp > ago(24h)
    | where (FileName in~ ("streams.exe", "streams64.exe"))
          or (FileName in~ ("powershell.exe", "pwsh.exe")
              and ProcessCommandLine has "Zone.Identifier"
              and ProcessCommandLine has_any ("Remove-Item", "-Stream", "Clear-Content", "Set-Content", "Out-Null"))
          or (FileName =~ "cmd.exe"
              and ProcessCommandLine has "Zone.Identifier")
    | extend DetectionType = "ADS_Manipulation_Tool"
    | project Timestamp, DeviceName, AccountName, DetectionType, FileName,
              ProcessCommandLine as CommandInfo, InitiatingProcessFileName, InitiatingProcessCommandLine;
union ZoneIDDeletion, DiskImageMount, SuspiciousVolumeExec, ADSManipulation
| sort by Timestamp desc
high severity medium confidence

Data Sources

File: File Deletion File: File Modification Process: Process Creation Microsoft Defender for Endpoint

Required Tables

DeviceFileEvents DeviceProcessEvents

False Positives

  • IT administrators legitimately mounting Windows Server or application installer ISO files for software deployment via PowerShell scripting
  • Virtual machine management software (VMware vCenter, Hyper-V Manager, VirtualBox) programmatically mounting VHD/VHDX files for VM provisioning or backup restoration
  • Backup and recovery software (Veeam, Acronis, Macrium Reflect) that mounts disk images to facilitate granular file restoration
  • Security administrators using Sysinternals streams.exe to audit alternate data streams on files during investigations or system hardening
  • Developer workflows using Mount-DiskImage for application packaging pipelines, Docker Desktop disk image management, or WSL2 virtual hard disk operations
  • CD/DVD ripping and burning software creating and locally mounting ISO images for verification prior to burning to physical media

Unlock Pro Content

Get the full detection package for T1553.005 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections