ID | Technique | Tactic |
---|---|---|
T1569 | System Services | Execution |
T1569.002 | Service Execution | Execution |
Detection: Excessive Usage Of SC Service Utility
Description
The following analytic detects excessive usage of the sc.exe
service utility on a host machine. It leverages Sysmon EventCode 1 logs to identify instances where sc.exe
is executed more frequently than normal within a 15-minute window. This behavior is significant as it is commonly associated with ransomware, cryptocurrency miners, and other malware attempting to create, modify, delete, or disable services, potentially related to security applications or for privilege escalation. If confirmed malicious, this activity could allow attackers to manipulate critical services, leading to system compromise or disruption of security defenses.
Search
1`sysmon` EventCode = 1 process_name = "sc.exe"
2| bucket _time span=15m
3| stats values(process) as process count as numScExe by dest, _time
4| eventstats avg(numScExe) as avgScExe, stdev(numScExe) as stdScExe, count as numSlots by dest
5| eval upperThreshold=(avgScExe + stdScExe *3)
6| eval isOutlier=if(avgScExe > 5 and avgScExe >= upperThreshold, 1, 0)
7| search isOutlier=1
8| `security_content_ctime(firstTime)`
9| `security_content_ctime(lastTime)`
10| `excessive_usage_of_sc_service_utility_filter`
Data Source
Name | Platform | Sourcetype | Source |
---|---|---|---|
CrowdStrike ProcessRollup2 | N/A | 'crowdstrike:events:sensor' |
'crowdstrike' |
Sysmon EventID 1 | Windows | 'xmlwineventlog' |
'XmlWinEventLog:Microsoft-Windows-Sysmon/Operational' |
Windows Event Log Security 4688 | Windows | 'xmlwineventlog' |
'XmlWinEventLog:Security' |
Macros Used
Name | Value |
---|---|
security_content_ctime | convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$) |
excessive_usage_of_sc_service_utility_filter | search * |
excessive_usage_of_sc_service_utility_filter
is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
Setting | Value |
---|---|
Disabled | true |
Cron Schedule | 0 * * * * |
Earliest Time | -70m@m |
Latest Time | -10m@m |
Schedule Window | auto |
Creates Risk Event | True |
Implementation
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed taskkill.exe may be used.
Known False Positives
excessive execution of sc.exe is quite suspicious since it can modify or execute app in high privilege permission.
Associated Analytic Story
Risk Based Analytics (RBA)
Risk Message | Risk Score | Impact | Confidence |
---|---|---|---|
Excessive Usage Of SC Service Utility | 25 | 50 | 50 |
References
Detection Testing
Test Type | Status | Dataset | Source | Sourcetype |
---|---|---|---|---|
Validation | ✅ Passing | N/A | N/A | N/A |
Unit | ✅ Passing | Dataset | XmlWinEventLog:Microsoft-Windows-Sysmon/Operational |
XmlWinEventLog |
Integration | ✅ Passing | Dataset | XmlWinEventLog:Microsoft-Windows-Sysmon/Operational |
XmlWinEventLog |
Replay any dataset to Splunk Enterprise by using our replay.py
tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
Source: GitHub | Version: 3