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"]
 4maturity = "production"
 5updated_date = "2024/05/21"
 6
 7[rule]
 8author = ["Elastic"]
 9description = """
10Identifies the creation of a suspicious ImagePath value. This could be an indication of an adversary attempting to
11stealthily persist or escalate privileges through abnormal service creation.
12"""
13from = "now-9m"
14index = ["logs-endpoint.events.registry-*", "endgame-*", "logs-windows.sysmon_operational-*"]
15language = "eql"
16license = "Elastic License v2"
17name = "Suspicious ImagePath Service Creation"
18risk_score = 73
19rule_id = "36a8e048-d888-4f61-a8b9-0f9e2e40f317"
20severity = "high"
21tags = [
22    "Domain: Endpoint",
23    "OS: Windows",
24    "Use Case: Threat Detection",
25    "Tactic: Persistence",
26    "Tactic: Defense Evasion",
27    "Data Source: Elastic Endgame",
28    "Data Source: Elastic Defend",
29    "Data Source: Sysmon",
30]
31timestamp_override = "event.ingested"
32type = "eql"
33
34query = '''
35registry where host.os.type == "windows" and registry.path : (
36    "HKLM\\SYSTEM\\ControlSet*\\Services\\*\\ImagePath",
37    "\\REGISTRY\\MACHINE\\SYSTEM\\ControlSet*\\Services\\*\\ImagePath"
38    ) and
39 /* add suspicious registry ImagePath values here */
40    registry.data.strings : ("%COMSPEC%*", "*\\.\\pipe\\*")
41'''
42
43
44[[rule.threat]]
45framework = "MITRE ATT&CK"
46[[rule.threat.technique]]
47id = "T1543"
48name = "Create or Modify System Process"
49reference = "https://attack.mitre.org/techniques/T1543/"
50[[rule.threat.technique.subtechnique]]
51id = "T1543.003"
52name = "Windows Service"
53reference = "https://attack.mitre.org/techniques/T1543/003/"
54
55
56
57[rule.threat.tactic]
58id = "TA0003"
59name = "Persistence"
60reference = "https://attack.mitre.org/tactics/TA0003/"
61[[rule.threat]]
62framework = "MITRE ATT&CK"
63[[rule.threat.technique]]
64id = "T1112"
65name = "Modify Registry"
66reference = "https://attack.mitre.org/techniques/T1112/"
67
68
69[rule.threat.tactic]
70id = "TA0005"
71name = "Defense Evasion"
72reference = "https://attack.mitre.org/tactics/TA0005/"

Related rules

to-top