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", "m365_defender"]
 4maturity = "production"
 5updated_date = "2024/10/10"
 6
 7[rule]
 8author = ["Elastic"]
 9description = """
10Identifies an instance of a Windows trusted program that is known to be vulnerable to DLL Search Order Hijacking
11starting after being renamed or from a non-standard path. This is uncommon behavior and may indicate an attempt to evade
12defenses via side loading a malicious DLL within the memory space of one of those processes.
13"""
14from = "now-9m"
15index = ["winlogbeat-*", "logs-endpoint.events.process-*", "logs-windows.sysmon_operational-*", "endgame-*", "logs-m365_defender.event-*"]
16language = "eql"
17license = "Elastic License v2"
18name = "Potential DLL Side-Loading via Trusted Microsoft Programs"
19risk_score = 73
20rule_id = "1160dcdb-0a0a-4a79-91d8-9b84616edebd"
21setup = """## Setup
22
23If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
24events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
25Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
26`event.ingested` to @timestamp.
27For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
28"""
29severity = "high"
30tags = [
31    "Domain: Endpoint",
32    "OS: Windows",
33    "Use Case: Threat Detection",
34    "Tactic: Defense Evasion",
35    "Tactic: Execution",
36    "Data Source: Elastic Endgame",
37    "Data Source: Elastic Defend",
38    "Data Source: Sysmon",
39    "Data Source: Microsoft Defender for Endpoint",
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