Windows High File Deletion Frequency
Description
This search looks for high frequency of file deletion relative to process name and process id. These events usually happen when the ransomware tries to encrypt the files with the ransomware file extensions and sysmon treat the original files to be deleted as soon it was replace as encrypted data.
- Type: Anomaly
-
Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
- Last Updated: 2023-04-14
- Author: Teoderick Contreras, Splunk
- ID: 45b125c4-866f-11eb-a95a-acde48001122
Annotations
Kill Chain Phase
- Actions On Objectives
NIST
- DE.AE
CIS20
- CIS 10
CVE
Search
1
2
3
4
5
6
`sysmon` EventCode=23 TargetFilename IN ("*.cmd", "*.ini","*.gif", "*.jpg", "*.jpeg", "*.db", "*.ps1", "*.doc*", "*.xls*", "*.ppt*", "*.bmp","*.zip", "*.rar", "*.7z", "*.chm", "*.png", "*.log", "*.vbs", "*.js", "*.vhd", "*.bak", "*.wbcat", "*.bkf" , "*.backup*", "*.dsk", "*.win")
| stats values(TargetFilename) as deleted_files min(_time) as firstTime max(_time) as lastTime count by Computer user EventCode Image ProcessID
|where count >=100
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `windows_high_file_deletion_frequency_filter`
Macros
The SPL above uses the following Macros:
windows_high_file_deletion_frequency_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
user may delete bunch of pictures or files in a folder.
Associated Analytic Story
RBA
Risk Score | Impact | Confidence | Message |
---|---|---|---|
72.0 | 90 | 80 | High frequency file deletion activity detected on host $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
- 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
- https://www.microsoft.com/security/blog/2022/01/15/destructive-malware-targeting-ukrainian-organizations/
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