Windows Event For Service Disabled
Description
The following analytic detects when a Windows service is modified from a start type to disabled. It leverages system event logs, specifically EventCode 7040, to identify this change. This activity is significant because adversaries often disable security or other critical services to evade detection and maintain control over a compromised host. If confirmed malicious, this action could allow attackers to bypass security defenses, leading to further exploitation and persistence within the environment.
- Type: Hunting
-
Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
- Last Updated: 2024-05-11
- Author: Teoderick Contreras, Splunk
- ID: 9c2620a8-94a1-11ec-b40c-acde48001122
Annotations
ATT&CK
Kill Chain Phase
- Exploitation
NIST
- DE.AE
CIS20
- CIS 10
CVE
Search
1
2
3
4
5
6
`wineventlog_system` EventCode=7040 EventData_Xml="*disabled*"
| stats count min(_time) as firstTime max(_time) as lastTime by Computer EventCode Name UserID service ServiceName
| rename Computer as dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `windows_event_for_service_disabled_filter`
Macros
The SPL above uses the following Macros:
windows_event_for_service_disabled_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Required fields
List of fields required to use this analytic.
- _time
- ComputerName
- EventCode
- Message
- User
- Sid
How To Implement
To successfully implement this search, you need to be ingesting logs with the Service name, Service File Name Service Start type, and Service Type from your endpoints.
Known False Positives
Windows service update may cause this event. In that scenario, filtering is needed.
Associated Analytic Story
RBA
Risk Score | Impact | Confidence | Message |
---|---|---|---|
36.0 | 60 | 60 | Service $ServiceName$ was disabled on $dest$ |
The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.
Reference
Test Dataset
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 | version: 4