file_deletion_via_cmd_via_cmdline
Description
Detects "cmd" utilization to self-delete files in some critical Windows destinations. License: https://github.com/Neo23x0/sigma/blob/master/LICENSE.Detection.Rules.md.
Query · yara_l
events:
(re.regex($selection.target.process.command_line, `.*cmd.*`) and ($selection.metadata.product_event_type = "4688" or $selection.metadata.product_event_type = "1") and (re.regex($selection.target.process.command_line, `.*/c.*`) or re.regex($selection.target.process.command_line, `.*ping 127\.0\.0\.1.*`) or re.regex($selection.target.process.command_line, `.*&.*`) or re.regex($selection.target.process.command_line, `.*del.*`) or re.regex($selection.target.process.command_line, `.*/f.*`) or re.regex($selection.target.process.command_line, `.*/q.*`)) and (re.regex($selection.target.process.command_line, `.*\\Windows\\Temp.*`) or re.regex($selection.target.process.command_line, `.*\\AppData\\Roaming\\Microsoft.*`)))
condition:
$selection