File or Directory Deletion Commandedit

This rule identifies the execution of commands that can be used to delete files and directories. Adversaries may delete files and directories on a host system, such as logs, browser history, or malware.

Rule type: eql

Rule indices:


Severity: low

Risk score: 21

Runs every: 60m

Searches indices from: now-119m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100

References: None


  • Domain: Endpoint
  • OS: Windows
  • Use Case: Threat Detection
  • Tactic: Defense Evasion
  • Rule Type: BBR
  • Data Source: Elastic Defend

Version: 2

Rule authors:

  • Elastic

Rule license: Elastic License v2

Rule queryedit

process where host.os.type == "windows" and event.type == "start" and
  ( "rundll32.exe" and process.args: "*InetCpl.cpl,Clear*") or
  ( "reg.exe" and process.args:"delete") or
  ( "cmd.exe" and process.args: ("*rmdir*", "*rm *", "rm") and
    not process.args : (
  ) or
  ( "powershell.exe" and process.args: ("*rmdir", "rm", "rd", "*Remove-Item*", "del", "*]::Delete(*"))
) and not : "S-1-5-18"