Detection rules › Elastic

Potential CVE-2024-21412 Exploitation

Time window
1m
Source
github.com/elastic/protections-artifacts

Identifies a url file download via WebDAV followed by the creation of executable content via WinINET. This may indicate the successful exploitation of the vulnerability CVE-2024-21412. CVE-2024-21412 allows attackers to bypass the Microsoft Defender SmartScreen security feature with booby-trapped Internet Shortcut files.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies a url file download via WebDAV followed by the creation of executable content via WinINET. This may indicate
the successful exploitation of the vulnerability CVE-2024-21412. CVE-2024-21412 allows attackers to bypass the Microsoft
Defender SmartScreen security feature with booby-trapped Internet Shortcut files.
"""
id = "ad1cd9c5-f440-4f70-baa9-3f262d5ea414"
license = "Elastic License v2"
name = "Potential CVE-2024-21412 Exploitation"
os_list = ["windows"]
reference = [
    "https://www.trendmicro.com/en_us/research/24/b/cve202421412-water-hydra-targets-traders-with-windows-defender-s.html",
    "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-21412",
]
version = "1.0.3"

query = '''
sequence with maxspan=1m
 [file where event.action == "creation" and process.name : ("explorer.exe", "winrar.exe", "7zfm.exe") and
  file.path : "?:\\Users\\*\\AppData\\Local\\Microsoft\\Windows\\INetCache\\IE\\*" and
  (file.extension : ("exe", "pif", "scr", "js", "vbs", "wsh", "hta", "cpl", "jse", "vbe", "bat", "cmd", "dll", "msi") or
   file.Ext.header_bytes : "4d5a*")]
 [file where process.name : "svchost.exe" and file.extension == "url" and
  file.path : "?:\\WINDOWS\\*\\TfsStore\\Tfs_DAV\\{*}.url"]
'''

actions = []
min_endpoint_version = "8.4.0"
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1566"
name = "Phishing"
reference = "https://attack.mitre.org/techniques/T1566/"
[[threat.technique.subtechnique]]
id = "T1566.001"
name = "Spearphishing Attachment"
reference = "https://attack.mitre.org/techniques/T1566/001/"



[threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1203"
name = "Exploitation for Client Execution"
reference = "https://attack.mitre.org/techniques/T1203/"


[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"

[internal]
min_endpoint_version = "8.4.0"

Stages and Predicates

Stage 1: file

[file where event.action == "creation" and process.name : ("explorer.exe", "winrar.exe", "7zfm.exe") and
  file.path : "?:\\Users\\*\\AppData\\Local\\Microsoft\\Windows\\INetCache\\IE\\*" and
  (file.extension : ("exe", "pif", "scr", "js", "vbs", "wsh", "hta", "cpl", "jse", "vbe", "bat", "cmd", "dll", "msi") or
   file.Ext.header_bytes : "4d5a*")]

Stage 2: file

[file where process.name : "svchost.exe" and file.extension == "url" and
  file.path : "?:\\WINDOWS\\*\\TfsStore\\Tfs_DAV\\{*}.url"]

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • creation corpus 58 (elastic 58)
field:"EventType" kind:eq value:"creation"
file.Ext.header_byteswildcard
  • 4d5a* corpus 46 (elastic 46)
field:"file.Ext.header_bytes" kind:wildcard value:"4d5a*"
file.extensioneq
  • url corpus 5 (elastic 5)
field:"file.extension" kind:eq value:"url"
file.extensionwildcard
  • bat corpus 13 (elastic 13)
  • cmd corpus 15 (elastic 15)
  • cpl corpus 19 (elastic 19)
  • dll corpus 33 (elastic 33)
  • exe corpus 32 (elastic 32)
  • hta corpus 20 (elastic 20)
  • js corpus 23 (elastic 23)
  • jse corpus 18 (elastic 18)
  • msi corpus 3 (elastic 3)
  • pif corpus 18 (elastic 18)
  • scr corpus 17 (elastic 17)
  • vbe corpus 18 (elastic 18)
  • vbs corpus 19 (elastic 19)
  • wsh corpus 16 (elastic 16)
field:"file.extension" kind:wildcard
file.pathwildcard
  • ?:\Users\*\AppData\Local\Microsoft\Windows\INetCache\IE\* corpus 3 (elastic 3)
  • ?:\WINDOWS\*\TfsStore\Tfs_DAV\{*}.url
field:"TargetFilename" kind:wildcard
process.namewildcard
  • 7zfm.exe corpus 7 (elastic 7)
  • explorer.exe corpus 21 (elastic 19, splunk 2)
  • svchost.exe corpus 24 (elastic 22, splunk 2)
  • winrar.exe corpus 9 (elastic 9)
field:"process_name" kind:wildcard