Suspicious ImagePath Service Creation
Identifies the creation of a suspicious ImagePath value. This could be an indication of an adversary attempting to stealthily persist or escalate privileges through abnormal service creation.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2020/11/23"
3integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
4maturity = "production"
5updated_date = "2024/10/15"
6min_stack_version = "8.14.0"
7min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
8
9[rule]
10author = ["Elastic"]
11description = """
12Identifies the creation of a suspicious ImagePath value. This could be an indication of an adversary attempting to
13stealthily persist or escalate privileges through abnormal service creation.
14"""
15from = "now-9m"
16index = ["logs-endpoint.events.registry-*", "endgame-*", "logs-windows.sysmon_operational-*", "winlogbeat-*", "logs-m365_defender.event-*", "logs-sentinel_one_cloud_funnel.*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Suspicious ImagePath Service Creation"
20risk_score = 73
21rule_id = "36a8e048-d888-4f61-a8b9-0f9e2e40f317"
22severity = "high"
23tags = [
24 "Domain: Endpoint",
25 "OS: Windows",
26 "Use Case: Threat Detection",
27 "Tactic: Persistence",
28 "Tactic: Defense Evasion",
29 "Data Source: Elastic Endgame",
30 "Data Source: Elastic Defend",
31 "Data Source: Sysmon",
32 "Data Source: Microsoft Defender for Endpoint",
33 "Data Source: SentinelOne",
34]
35timestamp_override = "event.ingested"
36type = "eql"
37
38query = '''
39registry where host.os.type == "windows" and event.type == "change" and
40 registry.value : "ImagePath" and
41 registry.path : (
42 "HKLM\\SYSTEM\\ControlSet*\\Services\\*\\ImagePath",
43 "\\REGISTRY\\MACHINE\\SYSTEM\\ControlSet*\\Services\\*\\ImagePath"
44 ) and
45 /* add suspicious registry ImagePath values here */
46 registry.data.strings : ("%COMSPEC%*", "*\\.\\pipe\\*")
47'''
48
49
50[[rule.threat]]
51framework = "MITRE ATT&CK"
52[[rule.threat.technique]]
53id = "T1543"
54name = "Create or Modify System Process"
55reference = "https://attack.mitre.org/techniques/T1543/"
56[[rule.threat.technique.subtechnique]]
57id = "T1543.003"
58name = "Windows Service"
59reference = "https://attack.mitre.org/techniques/T1543/003/"
60
61
62
63[rule.threat.tactic]
64id = "TA0003"
65name = "Persistence"
66reference = "https://attack.mitre.org/tactics/TA0003/"
67[[rule.threat]]
68framework = "MITRE ATT&CK"
69[[rule.threat.technique]]
70id = "T1112"
71name = "Modify Registry"
72reference = "https://attack.mitre.org/techniques/T1112/"
73
74
75[rule.threat.tactic]
76id = "TA0005"
77name = "Defense Evasion"
78reference = "https://attack.mitre.org/tactics/TA0005/"
Related rules
- Image File Execution Options Injection
- Installation of Security Support Provider
- Registry Persistence via AppInit DLL
- Suspicious Startup Shell Folder Modification
- Suspicious WerFault Child Process