default_powersploit_and_empire_schtasks_persistence
Description
Detects the creation of a schtask via PowerSploit or Empire Default Configuration. License: https://github.com/Neo23x0/sigma/blob/master/LICENSE.Detection.Rules.md.
Query · yara_l
events:
(re.regex($selection.principal.process.file.full_path, `.*\\powershell\.exe`) and (re.regex($selection.target.process.command_line, `.*schtasks.*/Create.*/SC .*ONLOGON.*/TN .*Updater.*/TR .*powershell.*`) or re.regex($selection.target.process.command_line, `.*schtasks.*/Create.*/SC .*DAILY.*/TN .*Updater.*/TR .*powershell.*`) or re.regex($selection.target.process.command_line, `.*schtasks.*/Create.*/SC .*ONIDLE.*/TN .*Updater.*/TR .*powershell.*`) or re.regex($selection.target.process.command_line, `.*schtasks.*/Create.*/SC .*Updater.*/TN .*Updater.*/TR .*powershell.*`)) and ($selection.metadata.product_event_type = "4688" or $selection.metadata.product_event_type = "1"))
condition:
$selection