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
Raw source default_powersploit_and_empire_schtasks_persistence · YARA-L
Esc
Published by chronicle/detection-rules ↗, licensed under Apache 2.0 ↗. Reproduced here unmodified.
rule default_powersploit_and_empire_schtasks_persistence {
 meta:
    author = "Markus Neis, @Karneades"
    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."
    reference = "https://tdm.socprime.com/tdm/info/WqCUvktzgL7k"
    version = "0.01"
    created = "2018/03/06"
    product = "windows"
    category = "process_creation"
    mitre = "execution, persistence, privilege_escalation, t1053, t1086, s0111, g0022, g0060, car.2013-08-001"

  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
}

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.