Potential DLL Side-Loading via Trusted Microsoft Programs

Identifies an instance of a Windows trusted program that is known to be vulnerable to DLL Search Order Hijacking starting after being renamed or from a non-standard path. This is uncommon behavior and may indicate an attempt to evade defenses via side loading a malicious DLL within the memory space of one of those processes.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/09/03"
 3integration = ["endpoint", "windows"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2024/03/28"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies an instance of a Windows trusted program that is known to be vulnerable to DLL Search Order Hijacking
13starting after being renamed or from a non-standard path. This is uncommon behavior and may indicate an attempt to evade
14defenses via side loading a malicious DLL within the memory space of one of those processes.
15"""
16from = "now-9m"
17index = ["winlogbeat-*", "logs-endpoint.events.process-*", "logs-windows.sysmon_operational-*", "endgame-*"]
18language = "eql"
19license = "Elastic License v2"
20name = "Potential DLL Side-Loading via Trusted Microsoft Programs"
21risk_score = 73
22rule_id = "1160dcdb-0a0a-4a79-91d8-9b84616edebd"
23setup = """## Setup
24
25If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
26events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
27Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
28`event.ingested` to @timestamp.
29For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
30"""
31severity = "high"
32tags = ["Domain: Endpoint",
33        "OS: Windows",
34        "Use Case: Threat Detection",
35        "Tactic: Defense Evasion",
36        "Tactic: Execution",
37        "Data Source: Elastic Endgame",
38        "Data Source: Elastic Defend",
39        "Data Source: Sysmon"
40        ]
41timestamp_override = "event.ingested"
42type = "eql"
43
44query = '''
45process where host.os.type == "windows" and event.type == "start" and
46  process.pe.original_file_name in ("WinWord.exe", "EXPLORER.EXE", "w3wp.exe", "DISM.EXE") and
47  not (process.name : ("winword.exe", "explorer.exe", "w3wp.exe", "Dism.exe") or
48         process.executable : ("?:\\Windows\\explorer.exe",
49                               "?:\\Program Files\\Microsoft Office\\root\\Office*\\WINWORD.EXE",
50                               "?:\\Program Files?(x86)\\Microsoft Office\\root\\Office*\\WINWORD.EXE",
51                               "?:\\Windows\\System32\\Dism.exe",
52                               "?:\\Windows\\SysWOW64\\Dism.exe",
53                               "?:\\Windows\\System32\\inetsrv\\w3wp.exe")
54         )
55'''
56
57
58[[rule.threat]]
59framework = "MITRE ATT&CK"
60[[rule.threat.technique]]
61id = "T1036"
62name = "Masquerading"
63reference = "https://attack.mitre.org/techniques/T1036/"
64
65[[rule.threat.technique]]
66id = "T1574"
67name = "Hijack Execution Flow"
68reference = "https://attack.mitre.org/techniques/T1574/"
69[[rule.threat.technique.subtechnique]]
70id = "T1574.002"
71name = "DLL Side-Loading"
72reference = "https://attack.mitre.org/techniques/T1574/002/"
73
74
75
76[rule.threat.tactic]
77id = "TA0005"
78name = "Defense Evasion"
79reference = "https://attack.mitre.org/tactics/TA0005/"

Related rules

to-top