Unusual Service Host Child Process - Childless Service

Identifies unusual child processes of Service Host (svchost.exe) that traditionally do not spawn any child processes. This may indicate a code injection or an equivalent form of exploitation.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/10/13"
 3integration = ["endpoint", "windows"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2023/03/06"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies unusual child processes of Service Host (svchost.exe) that traditionally do not spawn any child processes.
13This may indicate a code injection or an equivalent form of exploitation.
14"""
15false_positives = ["Changes to Windows services or a rarely executed child process."]
16from = "now-9m"
17index = ["logs-endpoint.events.*", "winlogbeat-*", "logs-windows.*", "endgame-*"]
18language = "eql"
19license = "Elastic License v2"
20name = "Unusual Service Host Child Process - Childless Service"
21note = """## Setup
22
23If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.
24"""
25risk_score = 47
26rule_id = "6a8ab9cc-4023-4d17-b5df-1a3e16882ce7"
27severity = "medium"
28tags = ["Elastic", "Host", "Windows", "Threat Detection", "Defense Evasion", "Privilege Escalation", "Elastic Endgame"]
29timestamp_override = "event.ingested"
30type = "eql"
31
32query = '''
33process where host.os.type == "windows" and event.type == "start" and
34     process.parent.name : "svchost.exe" and
35
36     /* based on svchost service arguments -s svcname where the service is known to be childless */
37
38    process.parent.args : ("WdiSystemHost","LicenseManager",
39      "StorSvc","CDPSvc","cdbhsvc","BthAvctpSvc","SstpSvc","WdiServiceHost",
40      "imgsvc","TrkWks","WpnService","IKEEXT","PolicyAgent","CryptSvc",
41      "netprofm","ProfSvc","StateRepository","camsvc","LanmanWorkstation",
42      "NlaSvc","EventLog","hidserv","DisplayEnhancementService","ShellHWDetection",
43      "AppHostSvc","fhsvc","CscService","PushToInstall") and
44
45      /* unknown FPs can be added here */
46
47     not process.name : ("WerFault.exe","WerFaultSecure.exe","wermgr.exe") and
48     not (process.executable : "?:\\Windows\\System32\\RelPost.exe" and process.parent.args : "WdiSystemHost") and
49     not (process.name : "rundll32.exe" and
50          process.args : "?:\\WINDOWS\\System32\\winethc.dll,ForceProxyDetectionOnNextRun" and process.parent.args : "WdiServiceHost") and
51     not (process.executable : ("?:\\Program Files\\*", "?:\\Program Files (x86)\\*", "?:\\Windows\\System32\\Kodak\\kds_i4x50\\lib\\lexexe.exe") and
52          process.parent.args : "imgsvc")
53'''
54
55
56[[rule.threat]]
57framework = "MITRE ATT&CK"
58[[rule.threat.technique]]
59id = "T1055"
60name = "Process Injection"
61reference = "https://attack.mitre.org/techniques/T1055/"
62[[rule.threat.technique.subtechnique]]
63id = "T1055.012"
64name = "Process Hollowing"
65reference = "https://attack.mitre.org/techniques/T1055/012/"
66
67
68
69[rule.threat.tactic]
70id = "TA0004"
71name = "Privilege Escalation"
72reference = "https://attack.mitre.org/tactics/TA0004/"
73[[rule.threat]]
74framework = "MITRE ATT&CK"
75[[rule.threat.technique]]
76id = "T1055"
77name = "Process Injection"
78reference = "https://attack.mitre.org/techniques/T1055/"
79
80
81[rule.threat.tactic]
82id = "TA0005"
83name = "Defense Evasion"
84reference = "https://attack.mitre.org/tactics/TA0005/"

Setup

If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define event.ingested and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate event.ingested to @timestamp for this rule to work.

to-top