Detection rules › Splunk
Windows Service Created with Suspicious Service Path
The following analytic detects the creation of a Windows Service with a binary path located in uncommon directories, using Windows Event ID 7045. It leverages logs from the wineventlog_system to identify services installed outside typical system directories. This activity is significant as adversaries, including those deploying Clop ransomware, often create malicious services for lateral movement, remote code execution, persistence, and execution. If confirmed malicious, this could allow attackers to maintain persistence, execute arbitrary code, and potentially escalate privileges, posing a severe threat to the environment.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | T1569.002 System Services: Service Execution |
Event coverage
| Provider | Event ID | Title |
|---|---|---|
| Service-Control-Manager | 7045 |
Stages and Predicates
Stage 1: search
search NOT ImagePath IN ("*%systemroot%\\*", "*:\\Program File*", "*:\\Programdata\\*", "*:\\Windows\\*") EventCode=7045 ImagePath="*.exe"
Stage 2: stats
stats BY EventCode, ImagePath, ServiceName, ServiceType, StartType, Computer, UserID
Stage 3: rename
rename
Stage 4: search
search
Stage 5: search
search
Stage 6: search
search `macro`
Exclusions
Top-level NOT(...) conjuncts — predicates this rule actively suppresses.
| Stage | Field | Kind | Excluded values |
|---|---|---|---|
| 1 | ImagePath | in | "*%systemroot%\\*", "*:\\Program File*", "*:\\Programdata\\*", "*:\\Windows\\*" |
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
EventCode | eq |
|
ImagePath | eq |
|
Neighbors
Broader alternatives (more inclusive than this rule)
These rules match a superset of what this rule catches. They cover the same events plus more. Use them if you want wider coverage and can absorb more false positives.
- Invoke-Obfuscation Obfuscated IEX Invocation - System (drops 3 filters this rule applies)
- Malicious Powershell Executed As A Service (drops 2 filters this rule applies)
- Randomly Generated Windows Service Name (drops 2 filters this rule applies)
- Windows Service Created with Suspicious Service Name (drops 2 filters this rule applies)