Subvert Trust Controls: Mark-of-the-Web Bypass

Adversaries may abuse specific file formats to subvert Mark-of-the-Web (MOTW) controls. In Windows, when files are downloaded from the Internet, they are tagged with a hidden NTFS Alternate Data Stream (ADS) named Zone.Identifier with a specific value known as the MOTW.[1] Files that are tagged with MOTW are protected and cannot perform certain actions. For example, starting in MS Office 10, if a MS Office file has the MOTW, it will open in Protected View. Executables tagged with the MOTW will be processed by Windows Defender SmartScreen that compares files with an allowlist of well-known executables. If the file in not known/trusted, SmartScreen will prevent the execution and warn the user not to run it.[2][3][4]

Adversaries may abuse container files such as compressed/archive (.arj, .gzip) and/or disk image (.iso, .vhd) file formats to deliver malicious payloads that may not be tagged with MOTW. Container files downloaded from the Internet will be marked with MOTW but the files within may not inherit the MOTW after the container files are extracted and/or mounted. MOTW is a NTFS feature and many container files do not support NTFS alternative data streams. After a container file is extracted and/or mounted, the files contained within them may be treated as local files on disk and run without protections.[2][3]

ID: T1553.005
Sub-technique of:  T1553
Tactic: Defense Evasion
Platforms: Windows
Permissions Required: User
Defense Bypassed: Anti-virus, Application control
Contributors: Christiaan Beek, @ChristiaanBeek
Version: 1.0
Created: 22 February 2021
Last Modified: 13 April 2021
Provided by LAYER 8

Procedure Examples

ID Name Description
G0092 TA505

TA505 has used .iso files to deploy malicious .lnk files.[5]

Mitigations

ID Mitigation Description
M1038 Execution Prevention

Consider blocking container file types at web and/or email gateways. Consider unregistering container file extensions in Windows File Explorer.[6]

Detection

ID Data Source Data Component
DS0022 File File Creation
File Metadata

Monitor compressed/archive and image files downloaded from the Internet as the contents may not be tagged with the MOTW. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities.

References