Detection rules › Splunk
Spike in File Writes
The following analytic detects a sharp increase in the number of files written to a specific host. It leverages the Endpoint.Filesystem data model, focusing on 'created' actions and comparing current file write counts against historical averages and standard deviations. This activity is significant as a sudden spike in file writes can indicate malicious activities such as ransomware encryption or data exfiltration. If confirmed malicious, this behavior could lead to significant data loss, system compromise, or further propagation of malware within the network.
Event coverage
| Provider | Event | Title |
|---|---|---|
| Sysmon | Event ID 11 | FileCreate |
Rule body splunk
name: Spike in File Writes
id: fdb0f805-74e4-4539-8c00-618927333aae
version: 10
creation_date: '2020-04-29'
modification_date: '2026-05-13'
author: David Dorsey, Splunk
status: experimental
type: Anomaly
description: The following analytic detects a sharp increase in the number of files written to a specific host. It leverages the Endpoint.Filesystem data model, focusing on 'created' actions and comparing current file write counts against historical averages and standard deviations. This activity is significant as a sudden spike in file writes can indicate malicious activities such as ransomware encryption or data exfiltration. If confirmed malicious, this behavior could lead to significant data loss, system compromise, or further propagation of malware within the network.
data_source:
- Sysmon EventID 11
search: |-
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Filesystem
WHERE Filesystem.action=created
BY _time span=1h, Filesystem.dest
| `drop_dm_object_name(Filesystem)`
| eventstats max(_time) as maxtime
| stats count as num_data_samples max(eval(if(_time >= relative_time(maxtime, "-1d@d"), count, null))) as "count" avg(eval(if(_time<relative_time(maxtime, "-1d@d"), count,null))) as avg stdev(eval(if(_time<relative_time(maxtime, "-1d@d"), count, null))) as stdev
BY "dest"
| eval upperBound=(avg+stdev*4), isOutlier=if((count > upperBound) AND num_data_samples >=20, 1, 0)
| search isOutlier=1
| `spike_in_file_writes_filter`
how_to_implement: In order to implement this search, you must populate the Endpoint file-system data model node. This is typically populated via endpoint detection and response product, such as Carbon Black or endpoint data sources such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the file system.
known_false_positives: It is important to understand that if you happen to install any new applications on your hosts or are copying a large number of files, you can expect to see a large increase of file modifications.
references: []
intermediate_findings:
entities:
- field: dest
type: system
score: 20
message: Spike in File Writes observed on $dest$
analytic_story:
- SamSam Ransomware
- Ryuk Ransomware
- Ransomware
- Rhysida Ransomware
asset_type: Endpoint
mitre_attack_id: []
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: endpoint
security_domain: endpoint
Stages and Predicates
Stage 1: tstats
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Filesystem
WHERE Filesystem.action=created
BY _time span=1h, Filesystem.dest
Stage 2: search
| `drop_dm_object_name(Filesystem)`
Stage 3: eventstats
| eventstats max(_time) as maxtime
Stage 4: stats
| stats count as num_data_samples max(eval(if(_time >= relative_time(maxtime, "-1d@d"), count, null))) as "count" avg(eval(if(_time<relative_time(maxtime, "-1d@d"), count,null))) as avg stdev(eval(if(_time<relative_time(maxtime, "-1d@d"), count, null))) as stdev
BY "dest"
Stage 5: eval
| eval upperBound=(avg+stdev*4), isOutlier=if((count > upperBound) AND num_data_samples >=20, 1, 0)
isOutlier =count > upperBound AND num_data_samples >= 2010Stage 6: search
| search isOutlier=1
Stage 7: search
| `spike_in_file_writes_filter`
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
Filesystem.action | eq |
|
isOutlier | eq |
|