Detection rules › Splunk

Cipher.exe Execution (Sysmon)

Group by
_time, host
Source
github.com/anvilogic-forge/armory

Cipher.exe is a Windows command-line utility used for managing encryption on NTFS drives and securely overwriting data to prevent recovery. Threat actors may destroy data on specific systems or across a network to disrupt the availability of systems, services, or resources. This often involves overwriting files or data on local and remote drives, rendering the information irrecoverable. Unlike basic file deletion commands (e.g., del or rm), which typically remove file pointers but leave data recoverable through forensic techniques, this method ensures complete data loss by overwriting the content. Threat actors may overwrite files and directories with random data or other content to prevent recovery and obscure their activity. This tactic targets individual files rather than wiping entire disk sections or logical structures. This use case detects the execution of cipher.exe with the /w flag, accounting for instances where the binary has been renamed. Executions of processes using arguments with the pattern " /w:" followed by non-numeric characters should be allowlisted to reduce false positives.

MITRE ATT&CK coverage

TacticTechniques
ImpactT1485 Data Destruction

References

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

id: '39961.72291'
title: Cipher.exe Execution
description: Cipher.exe is a Windows command-line utility used for managing encryption
  on NTFS drives and securely overwriting data to prevent recovery. Threat actors
  may destroy data on specific systems or across a network to disrupt the availability
  of systems, services, or resources. This often involves overwriting files or data
  on local and remote drives, rendering the information irrecoverable. Unlike basic
  file deletion commands (e.g., del or rm), which typically remove file pointers but
  leave data recoverable through forensic techniques, this method ensures complete
  data loss by overwriting the content. Threat actors may overwrite files and directories
  with random data or other content to prevent recovery and obscure their activity.
  This tactic targets individual files rather than wiping entire disk sections or
  logical structures. This use case detects the execution of cipher.exe with the /w
  flag, accounting for instances where the binary has been renamed. Executions of
  processes using arguments with the pattern " /w:" followed by non-numeric characters
  should be allowlisted to reduce false positives.
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<")
  "cipher.exe" OR TERM(cipher) | regex process_path="(?i)\x5ccipher\.exe" | table
  _time, host, user, process, process_*, parent_* | bin span=1s | stats values(*)
  as * by _time, host '
techniques:
- impact:data destruction
technique_id: 
- T1485
data_category:
- Windows Sysmon
references:
- https://www.volexity.com/blog/2024/11/22/the-nearest-neighbor-attack-how-a-russian-apt-weaponized-nearby-wi-fi-networks-for-covert-access/
- https://learn.microsoft.com/en-us/troubleshoot/windows-server/certificates-and-public-key-infrastructure-pki/use-cipher-to-overwrite-deleted-data

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<") "cipher.exe" OR TERM(cipher)

Stage 2: regex

| regex process_path="(?i)\x5ccipher\.exe"

Stage 3: table

| table _time, host, user, process, process_*, parent_*

Stage 4: bucket

| bin span=1s

Stage 5: stats

| stats values(*) as * by _time, host

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
EventCodeeq
  • 1 corpus 237 (splunk 224, kusto 13)
process_pathregex_match
  • "(?i)\x5ccipher.exe" corpus 2 (splunk 2)

Search terms

Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.

StageTerm
1TERM
1"<EventID>1<"
1"cipher.exe"
1TERM
1cipher