Windows Data Destruction Recursive Exec Files Deletion
Description
The following analytic identifies a suspicious process recursively deleting files in a compromised host. This behavior was seen in several destructive malware, wiper like caddy wiper, doublezero, and now swiftslicer that delete or overwrite files with random generated strings to make it unrecoverable. This analytic can also catch a possible recursive file write on multiple files using Sysmon Event 23. Sysmon treats the modified file as a deleted one as soon as it was overwritten. This analytic can be a good indicator that a possible destructive malware is running in a host machine or a big software application is being uninstalled.
- Type: TTP
-
Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
- Last Updated: 2023-04-14
- Author: Teoderick Contreras, Splunk
- ID: 3596a799-6320-4a2f-8772-a9e98ddb2960
Annotations
Kill Chain Phase
- Actions On Objectives
NIST
- DE.CM
CIS20
- CIS 10
CVE
Search
1
2
3
4
5
6
7
`sysmon` EventCode=23 TargetFilename IN ("*.exe", "*.sys", "*.dll")
| bin _time span=2m
| stats values(TargetFilename) as deleted_files min(_time) as firstTime max(_time) as lastTime count by Computer user EventCode Image ProcessID
| where count >=500
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `windows_data_destruction_recursive_exec_files_deletion_filter`
Macros
The SPL above uses the following Macros:
windows_data_destruction_recursive_exec_files_deletion_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
- TargetFilename
- Computer
- user
- Image
- ProcessID
- _time
How To Implement
To successfully implement this search, you need to be ingesting logs with the deleted target file name, process name and process id from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.
Known False Positives
uninstall a big software application may trigger this detection. Filter is needed.
Associated Analytic Story
RBA
Risk Score | Impact | Confidence | Message |
---|---|---|---|
64.0 | 80 | 80 | a big number of executable files being deleted in $Computer$ |
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: 1