Detection: Windows File Without Extension In Critical Folder

Description

This analytic detects the creation of files without extensions in critical Windows system and driver-related directories, including but not limited to System32\Drivers, and other known Windows driver storage and loading paths. The analytic leverages telemetry from the Endpoint.Filesystem data model, with a focus on file creation events and file path analysis. File creation activity in these directories—particularly involving extensionless files—is highly suspicious, as it may indicate the presence of destructive or stealthy malware. This behavior is consistent with malware families such as HermeticWiper, which deploy kernel driver components into trusted Windows driver directories to obtain low-level access and execute destructive payloads. If confirmed malicious, this activity can result in severe system compromise, including the deployment of malicious drivers, boot-sector or filesystem destruction, and ultimately system inoperability and irreversible data loss.

 1
 2| tstats `security_content_summariesonly`
 3  count FROM datamodel=Endpoint.Filesystem where
 4
 5Filesystem.action IN ("created", "modified")
 6Filesystem.file_path IN(
 7    "*:\\AMD\\*",
 8    "*:\\OEM\\*",
 9    "*:\\Windows\\Boot\\*",
10    "*:\\Windows\\ELAMBKUP\\*",
11    "*:\\Windows\\INF\\*",
12    "*:\\Windows\\servicing\\*",
13    "*:\\Windows\\System32\\Boot\\*",
14    "*:\\Windows\\System32\\Drivers\\*",
15    "*:\\Windows\\System32\\DriverStore\\*",
16    "*:\\Windows\\System32\\Recovery\\*",
17    "*:\\Windows\\SysWOW64\\Drivers\\*"
18)
19
20by Filesystem.action Filesystem.dest Filesystem.file_access_time Filesystem.file_create_time
21Filesystem.file_hash Filesystem.file_modify_time Filesystem.file_name Filesystem.file_path
22Filesystem.file_acl Filesystem.file_size Filesystem.process_guid Filesystem.process_id
23Filesystem.user Filesystem.vendor_product
24
25
26| `drop_dm_object_name(Filesystem)`
27
28| rex field="file_name" "\.(?<extension>[^\.]*$)"
29
30| where isnull(extension)
31
32| `security_content_ctime(firstTime)`
33
34| `security_content_ctime(lastTime)`
35
36| `windows_file_without_extension_in_critical_folder_filter`

Data Source

Name Platform Sourcetype Source
Sysmon EventID 11 Windows icon Windows 'XmlWinEventLog' 'XmlWinEventLog:Microsoft-Windows-Sysmon/Operational'

Macros Used

Name Value
security_content_ctime convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$)
windows_file_without_extension_in_critical_folder_filter search *
windows_file_without_extension_in_critical_folder_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
T1485 Data Destruction Impact
Actions on Objectives
DE.AE
CIS 10

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Finding (Notable) No
Creates Intermediate Finding (Risk Event) Yes
Anomaly detections generate Intermediate Findings (Risk Events). They do not generate a Finding (Notable) directly.

Implementation

To successfully implement this search you need to be ingesting information on process that include the name of the Filesystem responsible for the changes from your endpoints into the Endpoint datamodel in the Filesystem node.

Known False Positives

If you are leveraging Sysmon, you may see false positives related to folder creation, since Event ID 11 does not contain enough information to determine if the file is a File or a Directory. Filter out those entries when leveraging this analytic.

Associated Analytic Story

Intermediate Findings

Message Entity Field Entity Type Risk Score
A file without extension [$file_name$] was dropped in a critical folder [$file_path$] by $user$ user user 20

Threat Objects

Field Type
file_name file_name

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Passing N/A N/A N/A
Unit Passing Dataset XmlWinEventLog:Microsoft-Windows-Sysmon/Operational XmlWinEventLog
Integration ✅ Passing Dataset XmlWinEventLog:Microsoft-Windows-Sysmon/Operational XmlWinEventLog

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: GitHub |

Version: 13