Detection rules › Splunk

Windows Service Created with Suspicious Service Path

Author
Teoderick Contreras, Mauricio Velazco, Splunk
Source
upstream

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

TacticTechniques
ExecutionT1569.002 System Services: Service Execution

Event coverage

ProviderEvent IDTitle
Service-Control-Manager7045

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.

StageFieldKindExcluded values
1ImagePathin"*%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.

FieldKindValues
EventCodeeq
  • 7045 corpus 12 (splunk 12)
ImagePatheq
  • "*.exe"

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.