Detection rules › Splunk

Process Deleting Its Process File Path

Author
Teoderick Contreras
Source
upstream

The following analytic identifies a process attempting to delete its own file path, a behavior often associated with defense evasion techniques. This detection leverages Sysmon EventCode 1 logs, focusing on command lines executed via cmd.exe that include deletion commands. This activity is significant as it may indicate malware, such as Clop ransomware, trying to evade detection by removing its executable file if certain conditions are met. If confirmed malicious, this could allow the attacker to persist undetected, complicating incident response and remediation efforts.

MITRE ATT&CK coverage

TacticTechniques
Defense EvasionT1070 Indicator Removal

Event coverage

ProviderEvent IDTitle
Sysmon1Process creation

Stages and Predicates

Stage 1: search

search CommandLine="* /c *" CommandLine="* del*" EventCode=1 Image="*\\cmd.exe"

Stage 2: eval

eval ... using (parent_process, process)

Stage 3: stats

stats BY action, dest, original_file_name, parent_process, parent_process_exec, parent_process_guid, parent_process_id, parent_process_name, parent_process_path, process, process_exec, process_guid, process_hash, process_id, process_integrity_level, process_name, process_path, user, user_id, vendor_product, result

Stage 4: where

where result="Found"

Stage 5: search

search

Stage 6: search

search

Stage 7: 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
CommandLineeq
  • "* /c *"
  • "* del*"
EventCodeeq
  • 1 corpus 3 (splunk 3)
Imageeq
  • "*\\cmd.exe" corpus 2 (splunk 2)
resulteq
  • "Found"

Neighbors

Broader alternatives (more inclusive than this rule)

These rules match a superset of what this rule catches. They cover the same events plus more. Use them if you want wider coverage and can absorb more false positives.