Windows Mark Of The Web Bypass

Original Source: [splunk source]
Name:Windows Mark Of The Web Bypass
id:8ca13343-7405-4916-a2d1-ae34ce0c28ae
version:3
date:2024-09-30
author:Teoderick Contreras, Splunk
status:production
type:TTP
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.
Data_source:
  • -Sysmon EventID 23
search:`sysmon` EventCode=23 TargetFilename = "*:Zone.Identifier"
| stats min(_time) as firstTime max(_time) as lastTime count by user EventCode Image TargetFilename ProcessID dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `windows_mark_of_the_web_bypass_filter`


how_to_implement: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:unknown
References:
  -https://attack.mitre.org/techniques/T1553/005/
  -https://github.com/nmantani/PS-MOTW#remove-motwps1
drilldown_searches:
name:'View the detection results for - "$user$" and "$dest$"'
search:'%original_detection_search% | search user = "$user$" dest = "$dest$"'
earliest_offset:'$info_min_time$'
latest_offset:'$info_max_time$'
name:'View risk events for the last 7 days for - "$user$" and "$dest$"'
search:'| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$", "$dest$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
earliest_offset:'$info_min_time$'
latest_offset:'$info_max_time$'
tags:
  analytic_story:
    - 'Warzone RAT'
  asset_type:Endpoint
  confidence:70
  impact:70
  message:A mark-of-the-web data stream is deleted on $dest$
  mitre_attack_id:
    - 'T1553.005'
  observable:
    name:'user'
    type:'User'
    - role:
      - 'Victim'
    name:'dest'
    type:'Endpoint'
    - role:
      - 'Victim'
  product:
    - 'Splunk Enterprise'
    - 'Splunk Enterprise Security'
    - 'Splunk Cloud'
  risk_score:49
  required_fields:
    - 'EventCode'
    - 'TargetFilename'
    - 'dest'
    - 'user'
    - 'Image'
    - 'ProcessID'
    - '_time'
  security_domain:endpoint

tests:
name:'True Positive Test'
 attack_data:
  data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1553.005/mark_of_the_web_bypass/possible-motw-deletion.log
  source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
  sourcetype: XmlWinEventLog
manual_test:None

Related Analytic Stories


Warzone RAT