T1553.005 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.4 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 is not known/trusted, SmartScreen will prevent the execution and warn the user not to run it.123
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.12
Item | Value |
---|---|
ID | T1553.005 |
Sub-techniques | T1553.001, T1553.002, T1553.003, T1553.004, T1553.005, T1553.006 |
Tactics | TA0005 |
Platforms | Windows |
Version | 1.1 |
Created | 22 February 2021 |
Last Modified | 22 March 2023 |
Procedure Examples
ID | Name | Description |
---|---|---|
S1025 | Amadey | Amadey has modified the :Zone.Identifier in the ADS area to zero.8 |
G0016 | APT29 | APT29 has embedded ISO images and VHDX files in HTML to evade Mark-of-the-Web.10 |
S0650 | QakBot | QakBot has been packaged in ISO files in order to bypass Mark of the Web (MOTW) security measures.9 |
G0092 | TA505 | TA505 has used .iso files to deploy malicious .lnk files.11 |
Mitigations
ID | Mitigation | Description |
---|---|---|
M1042 | Disable or Remove Feature or Program | Consider disabling auto-mounting of disk image files (i.e., .iso, .img, .vhd, and .vhdx). This can be achieved by modifying the Registry values related to the Windows Explorer file associations in order to disable the automatic Explorer “Mount and Burn” dialog for these file extensions. Note: this will not deactivate the mount functionality itself.6 |
M1038 | Execution Prevention | Consider blocking container file types at web and/or email gateways. Consider unregistering container file extensions in Windows File Explorer.7 |
Detection
ID | Data Source | Data Component |
---|---|---|
DS0022 | File | File Creation |
References
-
Beek, C. (2020, December 3). Investigating the Use of VHD Files By Cybercriminals. Retrieved February 22, 2021. ↩↩
-
Hegt, S. (2020, March 30). Mark-of-the-Web from a red team’s perspective. Retrieved February 22, 2021. ↩↩
-
Kennedy, J. (2020, December 9). A Zebra in Gopher’s Clothing: Russian APT Uses COVID-19 Lures to Deliver Zebrocy. Retrieved February 22, 2021. ↩
-
Microsoft. (2020, August 31). Zone.Identifier Stream Name. Retrieved February 22, 2021. ↩
-
wordmann. (2022, February 8). Disable Disc Imgage. Retrieved February 8, 2022. ↩
-
wdormann. (2019, August 29). Disable Windows Explorer file associations for Disc Image Mount. Retrieved April 16, 2022. ↩
-
Dormann, W. (2019, September 4). The Dangers of VHD and VHDX Files. Retrieved March 16, 2021. ↩
-
Financial Security Institute. (2020, February 28). Profiling of TA505 Threat Group That Continues to Attack the Financial Sector. Retrieved July 14, 2022. ↩
-
Kenefick, I. et al. (2022, October 12). Black Basta Ransomware Gang Infiltrates Networks via QAKBOT, Brute Ratel, and Cobalt Strike. Retrieved February 6, 2023. ↩
-
ESET. (2022, February). THREAT REPORT T3 2021. Retrieved February 10, 2022. ↩
-
Trend Micro. (2019, August 27). TA505: Variety in Use of ServHelper and FlawedAmmyy. Retrieved February 22, 2021. ↩