Detection rules › Splunk

Suspicious writes to windows Recycle Bin

Author
Rico Valdez, Splunk
Source
upstream

The following analytic detects when a process other than explorer.exe writes to the Windows Recycle Bin. It leverages the Endpoint.Filesystem and Endpoint.Processes data models in Splunk to identify any process writing to the "$Recycle.Bin" file path, excluding explorer.exe. This activity is significant because it may indicate an attacker attempting to hide their actions, potentially leading to data theft, ransomware, or other malicious outcomes. If confirmed malicious, this behavior could allow an attacker to persist in the environment and evade detection by security tools.

MITRE ATT&CK coverage

TacticTechniques
Defense EvasionT1036 Masquerading

Event coverage

ProviderEvent IDTitle
Sysmon1Process creation
Sysmon11FileCreate

Stages and Predicates

Stage 1: tstats

tstats WHERE Filesystem.file_path="*$Recycle.Bin*" BY Filesystem.process_name, Filesystem.process_id, Filesystem.dest

Stage 2: search

search

Stage 3: join

join type=inner (...)

Stage 4: search

search `macro`

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.

FieldKindValues
Filesystem.file_patheq
  • "*$Recycle.Bin*"
Processes.process_namene
  • "explorer.exe"