Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Adversaries may abuse specific file formats to subvert Mark-of-the-Web (MOTW) controls.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-13 | ✗→✓ | ▲ Improved | 27% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 440% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 113% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 85% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 34% | 0% |
> Sub-technique of: T1553
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 <code>Zone.Identifier</code> with a specific value known as the MOTW. 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.
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.
Platforms: Windows
The following tests are from Atomic Red Team and provide actionable ways to test this technique:
Mounts ISO image downloaded from internet to evade Mark-of-the-Web. Upon successful execution, powershell will download the .iso from the Atomic Red Team repo, and mount the image. The provided sample ISO simply has a Reports shortcut file in it. Reference: https://www.microsoft.com/security/blog/2021/05/27/new-sophisticated-email-based-attack-from-nobelium/
Supported Platforms: windows
powershellMount-DiskImage -ImagePath "#{path_of_iso}"
Dependencies:
Mounts an ISO image downloaded from internet to evade Mark-of-the-Web and run hello.exe executable from the ISO. Upon successful execution, powershell will download the .iso from the Atomic Red Team repo, mount the image, and run the executable from the ISO image that will open command prompt echoing "Hello, World!". ISO provided by:https://twitter.com/mattifestation/status/1398323532988399620 Reference:https://www.microsoft.com/security/blog/2021/05/27/new-sophisticated-email-based-attack-from-nobelium/,
Supported Platforms: windows Elevation Required: Yes
powershellMount-DiskImage -ImagePath "#{path_of_iso}" -StorageType ISO -Access ReadOnly $keep = Get-Volume -FileSystemLabel "TestIso" $driveLetter = ($keep | Get-Volume).DriveLetter invoke-item "$($driveLetter):\hello.exe"
Dependencies:
Remove the Zone.Identifier alternate data stream which identifies the file as downloaded from the internet. Removing this allows more freedom in executing scripts in PowerShell and avoids opening files in protected view.
Supported Platforms: windows
powershellUnblock-File -Path #{file_path}
Dependencies:
Executes LNK file document.lnk from AllTheThings.iso. Link file executes cmd.exe and rundll32 to in order to load and execute AllTheThingsx64.dll from the ISO which spawns calc.exe.
Supported Platforms: windows
powershellMount-DiskImage -ImagePath "#{path_of_iso}" -StorageType ISO -Access ReadOnly $keep = Get-Volume -FileSystemLabel "AllTheThings" $driveLetter = ($keep | Get-Volume).DriveLetter $instance = [activator]::CreateInstance([type]::GetTypeFromCLSID("{c08afd90-f2a1-11d1-8455-00a0c91f3880}")) $instance.Document.Application.ShellExecute($driveLetter+":\document.lnk","",$driveLetter+":\",$null,0)
Dependencies:
If Atomic Red Team tests are not applicable, manually verify the technique by:
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.
Consider blocking container file types at web and/or email gateways. Consider unregistering container file extensions in Windows File Explorer.
| Finding | Severity | Impact | | ------------------------------------------- | -------- | --------------- | | Mark-of-the-Web Bypass technique applicable | Low | Defense Evasion |
| CWE ID | Title | | ------- | ---------------------------- | | CWE-693 | Protection Mechanism Failure |
Other measured skills in the registry, with their headline benchmark lift.