Skip to content
WETNav

Defense evasion · Windows · LOLBAS

cipher.exe

Cipher

Manages EFS encryption, and with /w it overwrites free space so deleted files cannot be recovered. That wipe is used as anti-forensics after files are deleted.

Legitimate use

Used to manage EFS encryption and to securely clear free space.

Worst caseMedium

Switches

/w<value>

Overwrites free space on a volume, erasing the content of previously deleted files.

Medium
/e

Encrypts folders and files.

Low
/d

Decrypts folders and files.

Low
/s<value>

Applies the operation to a folder and its subfolders.

Info

Command lines to worry about

  • Medium

    Free space wiped with cipher

    cipher /w overwrites free space so deleted files cannot be carved back. Seen after evidence or tools are deleted.

    Detection regexcipher(\.exe)?\s+\/w

    T1070.004

Where it is recorded

  • Security4688Process creation with the full command line, when command-line auditing is enabled.
  • Sysmon1Process creation with command line, hashes and parent process.

Community detections

2 SigmaHQ rules for cipher.exe. The explainer checks every pasted command line against all of them.

  • High
    Suspicious Spool Service Child Process

    Detects suspicious print spool service (spoolsv.exe) child processes.

    T1203T1068by Justin C. (@endisphotic), @dreadphones (detection), Thomas Patzke (Sigma rule)

  • Medium
    Deleted Data Overwritten Via Cipher.EXE

    Detects usage of the "cipher" built-in utility in order to overwrite deleted data from disk. Adversaries may destroy data and files on specific systems or in large numbers on a network to interrupt availability to systems, services, and network resources.

    T1485by frack113

Rules from SigmaHQ (rules/windows/process_creation), Detection Rule License (DRL) 1.1. Each rule links to its source and credits its authors.