Windows Service Created with Suspicious Service Path
Description
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.
- Type: TTP
-
Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
- Last Updated: 2024-05-21
- Author: Teoderick Contreras, Mauricio Velazco, Splunk
- ID: 429141be-8311-11eb-adb6-acde48001122
Annotations
ATT&CK
Kill Chain Phase
- Installation
NIST
- DE.CM
CIS20
- CIS 10
CVE
Search
1
2
3
4
5
6
`wineventlog_system` EventCode=7045 ImagePath = "*.exe" NOT (ImagePath IN ("*:\\Windows\\*", "*:\\Program File*", "*:\\Programdata\\*", "*%systemroot%\\*"))
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode ImagePath ServiceName ServiceType StartType Computer UserID
| rename Computer as dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `windows_service_created_with_suspicious_service_path_filter`
Macros
The SPL above uses the following Macros:
windows_service_created_with_suspicious_service_path_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.
- EventCode
- Service_File_Name
- Service_Type
- _time
- Service_Name
- Service_Start_Type
- dest
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
Legitimate applications may install services with uncommon services paths.
Associated Analytic Story
- Clop Ransomware
- Active Directory Lateral Movement
- Brute Ratel C4
- Qakbot
- Snake Malware
- Flax Typhoon
- PlugX
- CISA AA23-347A
RBA
Risk Score | Impact | Confidence | Message |
---|---|---|---|
56.0 | 70 | 80 | A service $ImagePath$ was created from a non-standard path using $ServiceName$ 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
- https://www.mandiant.com/resources/fin11-email-campaigns-precursor-for-ransomware-data-theft
- https://blog.virustotal.com/2020/11/keep-your-friends-close-keep-ransomware.html
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: 5