Detection: Windows Mark Of The Web Bypass
Description
The following analytic identifies a suspicious process that deletes the Mark-of-the-Web (MOTW) data stream. It leverages Sysmon EventCode 23 to detect when a file's Zone.Identifier stream is removed. This activity is significant because it is a common technique used by malware, such as Ave Maria RAT, to bypass security restrictions on files downloaded from the internet. If confirmed malicious, this behavior could allow an attacker to execute potentially harmful files without triggering security warnings, leading to further compromise of the system.
Search
1`sysmon` EventCode=23 TargetFilename = "*:Zone.Identifier"
2
3| stats count min(_time) as firstTime, max(_time) as lastTime
4 BY action dest dvc
5 file_path file_hash file_name
6 file_modify_time process_exec process_guid
7 process_id process_name process_path
8 signature signature_id user
9 user_id vendor_product
10
11| `security_content_ctime(firstTime)`
12
13| `security_content_ctime(lastTime)`
14
15| `windows_mark_of_the_web_bypass_filter`
Data Source
| Name |
Platform |
Sourcetype |
Source |
| Sysmon EventID 23 |
Windows |
'XmlWinEventLog' |
'XmlWinEventLog:Microsoft-Windows-Sysmon/Operational' |
Macros Used
| Name |
Value |
| sysmon |
(source=WinEventLog:Microsoft-Windows-Sysmon/Operational OR source=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR source=Syslog:Linux-Sysmon/Operational) |
| windows_mark_of_the_web_bypass_filter |
search * |
windows_mark_of_the_web_bypass_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
| ID |
Technique |
Tactic |
| T1553.005 |
Mark-of-the-Web Bypass |
Defense Impairment |
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
| Setting |
Value |
| Disabled |
true |
| Cron Schedule |
0 * * * * |
| Earliest Time |
-70m@m |
| Latest Time |
-10m@m |
| Schedule Window |
auto |
| Creates Finding (Notable) |
Yes |
| Rule Title |
%name% |
| Rule Description |
%description% |
| Notable Event Fields |
user, dest |
| Creates Intermediate Finding (Risk Event) |
Yes |
TTP detections generate a Finding (Notable) and may generate Intermediate Findings (Risk Events) for associated entities.
Implementation
To successfully implement this search, you need to be ingesting logs with the deleted target file name, process name and process id from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.
Known False Positives
No false positives have been identified at this time.
Associated Analytic Story
Finding
| Title |
Entity Field |
Entity Type |
Risk Score |
| A mark-of-the-web data stream is deleted on $dest$ |
user |
user |
50 |
| Message |
Entity Field |
Entity Type |
Risk Score |
| A mark-of-the-web data stream is deleted on $dest$ |
dest |
system |
50 |
References
Detection Testing
| Test Type |
Status |
Dataset |
Source |
Sourcetype |
| Validation |
✅ Passing |
N/A |
N/A |
N/A |
| Unit |
✅ Passing |
Dataset |
XmlWinEventLog:Microsoft-Windows-Sysmon/Operational |
XmlWinEventLog |
| Integration |
✅ Passing |
Dataset |
XmlWinEventLog:Microsoft-Windows-Sysmon/Operational |
XmlWinEventLog |
Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
Source: GitHub |
Version: 12