T1553.005 Splunk · SPL

Detect Mark-of-the-Web Bypass in Splunk

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).

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1553 Subvert Trust Controls
Sub-technique
T1553.005 Mark-of-the-Web Bypass
Canonical reference
https://attack.mitre.org/techniques/T1553/005/

SPL Detection Query

Splunk (SPL)
spl
(
  sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=15
  TargetFilename="*:Zone.Identifier"
)
OR
(
  sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
  (
    (Image="*\\powershell.exe" OR Image="*\\pwsh.exe")
    OR Image="*\\streams.exe" OR Image="*\\streams64.exe"
    OR Image="*\\cmd.exe"
  )
)
| eval DetectionType=case(
    EventCode=15 AND match(TargetFilename, ":Zone\.Identifier$"), "Sysmon_ADS_Zone_Identifier",
    EventCode=1 AND (match(Image, "streams(64)?\.exe$") OR (match(lower(CommandLine), "zone\.identifier") AND match(lower(Image), "(powershell|cmd)\.exe$"))), "ADS_Manipulation_Tool",
    EventCode=1 AND (match(lower(CommandLine), "mount-diskimage") OR match(lower(CommandLine), "mount-vhd") OR (match(lower(CommandLine), "(\.iso|\.vhd|\.vhdx|\.img)") AND match(lower(CommandLine), "(mount|attach|diskpart)"))), "DiskImage_Mount_PowerShell",
    EventCode=1 AND match(Image, "^[D-Zd-z]:\\\\.+\.(exe|dll|lnk|js|vbs|hta|bat|cmd|ps1|msi)$") AND (ParentImage="*\\explorer.exe" OR ParentImage="*\\cmd.exe"), "Exec_From_Mounted_Volume",
    true(), "Other"
  )
| where DetectionType != "Other"
| eval IsADSEvent=if(EventCode=15, 1, 0)
| eval IsMountCmd=if(DetectionType="DiskImage_Mount_PowerShell", 1, 0)
| eval IsADSStrip=if(DetectionType="ADS_Manipulation_Tool", 1, 0)
| eval IsMountedExec=if(DetectionType="Exec_From_Mounted_Volume", 1, 0)
| eval ZoneStream=if(EventCode=15, TargetFilename, null())
| table _time, host, User, Image, CommandLine, ParentImage, ParentCommandLine, TargetFilename, Hash, DetectionType, IsADSEvent, IsMountCmd, IsADSStrip, IsMountedExec, ZoneStream
| sort - _time
high severity medium confidence

Detects Mark-of-the-Web bypass patterns using Sysmon Event ID 15 (FileCreateStreamHash — captures alternate data stream creation, including Zone.Identifier propagation or absence) and Event ID 1 (Process Creation) for PowerShell disk image mounting and ADS manipulation tooling. Sysmon Event ID 15 is the primary telemetry source for MOTW monitoring: it fires when an ADS is created, allowing correlation of when Zone.Identifier is or is not written to extracted/mounted files. The DetectionType eval field categorizes each event for analyst triage. Note: Sysmon must be configured with EventCode 15 rules in sysmon.xml targeting download-relevant directories; this is not enabled in default Sysmon configurations.

Data Sources

File: File Creation (Alternate Data Streams)Process: Process CreationSysmon Event ID 1Sysmon Event ID 15

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operational

False Positives & Tuning

  • IT administrators legitimately mounting ISO files for Windows deployment or software distribution using PowerShell scripts
  • Virtual machine management software (VMware Workstation, VirtualBox, Hyper-V) that programmatically attaches and detaches VHD/VHDX disk images
  • Backup and recovery agents that mount disk image snapshots for granular file-level restores
  • Security administrators using Sysinternals streams.exe to audit NTFS alternate data streams during system hardening exercises
  • Enterprise software packaging tools that clear MOTW as part of SCCM or Intune deployment staging workflows
  • Sysmon Event ID 15 will fire for every legitimate Zone.Identifier ADS creation (normal browser downloads) — tune to focus on absence of Zone.Identifier on executables in download paths rather than its presence
Download portable Sigma rule (.yml)

Other platforms for T1553.005


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Mount ISO File and Execute Payload Without MOTW

    Expected signal: Sysmon Event ID 1: powershell.exe with CommandLine containing 'Mount-DiskImage' and the ISO path. System Event ID 6416 (Kernel-PnP): new virtual volume recognized. Sysmon Event ID 1: cmd.exe executing from a non-C: drive letter spawned by powershell.exe. Sysmon Event ID 11: motw-result.txt file creation in %TEMP%. Critically — no Sysmon Event ID 15 for Zone.Identifier on payload.bat inside the ISO, confirming MOTW bypass.

  2. Test 2Strip Zone.Identifier ADS via PowerShell Remove-Item -Stream

    Expected signal: Sysmon Event ID 1: powershell.exe with CommandLine containing 'Zone.Identifier' and 'Remove-Item'. Sysmon Event ID 15 (FileCreateStreamHash): fires during the setup phase when Zone.Identifier is written to the file. DeviceFileEvents (MDE) ActionType=FileDeleted targeting the Zone.Identifier stream. Windows Security Event ID 4663 (if object access auditing enabled): DELETE access to the file's ADS.

  3. Test 3Modify Zone.Identifier to ZoneId=0 (Amadey Technique)

    Expected signal: Sysmon Event ID 1: powershell.exe with CommandLine containing 'Zone.Identifier' and 'Set-Content'. Sysmon Event ID 15 (FileCreateStreamHash): fires twice — once for ZoneId=3 creation and once for the ZoneId=0 overwrite, producing different hash values for the stream content. DeviceFileEvents ActionType=FileModified for the test file. Key forensic indicator: Sysmon Event ID 15 with a hash value matching the ZoneId=0 template string '[ZoneTransfer]\r\nZoneId=0'.

  4. Test 4Delete Zone.Identifier Using Sysinternals Streams.exe

    Expected signal: Sysmon Event ID 1: powershell.exe with Invoke-WebRequest downloading Streams.zip. Sysmon Event ID 3: network connection to download.sysinternals.com. Sysmon Event ID 11: Streams.zip and extracted files created in %TEMP%. Sysmon Event ID 1: streams64.exe process creation with CommandLine containing '-d' and the target file path. DeviceFileEvents: file modification event as Zone.Identifier ADS is deleted from the test file.

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