Potential DLL Side-Loading via Microsoft Antimalware Service Executable

Identifies 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 = "2021/07/07"
 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", "Dennis Perto"]
11description = """
12Identifies a Windows trusted program that is known to be vulnerable to DLL Search Order Hijacking starting after being
13renamed or from a non-standard path. This is uncommon behavior and may indicate an attempt to evade defenses via
14side-loading a malicious DLL within the memory space of one of those processes.
15"""
16false_positives = ["Microsoft Antimalware Service Executable installed on non default installation path."]
17from = "now-9m"
18index = ["winlogbeat-*", "logs-endpoint.events.process-*", "logs-windows.sysmon_operational-*", "endgame-*"]
19language = "eql"
20license = "Elastic License v2"
21name = "Potential DLL Side-Loading via Microsoft Antimalware Service Executable"
22references = [
23    "https://news.sophos.com/en-us/2021/07/04/independence-day-revil-uses-supply-chain-exploit-to-attack-hundreds-of-businesses/",
24]
25risk_score = 73
26rule_id = "053a0387-f3b5-4ba5-8245-8002cca2bd08"
27setup = """## Setup
28
29If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
30events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
31Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
32`event.ingested` to @timestamp.
33For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
34"""
35severity = "high"
36tags = ["Domain: Endpoint",
37        "OS: Windows",
38        "Use Case: Threat Detection",
39        "Tactic: Defense Evasion",
40        "Data Source: Elastic Endgame",
41        "Tactic: Execution",
42        "Data Source: Elastic Defend",
43        "Data Source: Sysmon"
44        ]
45timestamp_override = "event.ingested"
46type = "eql"
47
48query = '''
49process where host.os.type == "windows" and event.type == "start" and
50(
51  (process.pe.original_file_name == "MsMpEng.exe" and not process.name : "MsMpEng.exe") or
52  (process.name : "MsMpEng.exe" and not
53        process.executable : ("?:\\ProgramData\\Microsoft\\Windows Defender\\*.exe",
54                              "?:\\Program Files\\Windows Defender\\*.exe",
55                              "?:\\Program Files (x86)\\Windows Defender\\*.exe",
56                              "?:\\Program Files\\Microsoft Security Client\\*.exe",
57                              "?:\\Program Files (x86)\\Microsoft Security Client\\*.exe"))
58)
59'''
60
61
62[[rule.threat]]
63framework = "MITRE ATT&CK"
64[[rule.threat.technique]]
65id = "T1574"
66name = "Hijack Execution Flow"
67reference = "https://attack.mitre.org/techniques/T1574/"
68[[rule.threat.technique.subtechnique]]
69id = "T1574.002"
70name = "DLL Side-Loading"
71reference = "https://attack.mitre.org/techniques/T1574/002/"
72
73
74
75[rule.threat.tactic]
76id = "TA0005"
77name = "Defense Evasion"
78reference = "https://attack.mitre.org/tactics/TA0005/"

References

Related rules

to-top