Detection rules › Sigma

HackTool - Default PowerSploit/Empire Scheduled Task Creation

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Markus Neis, @Karneades
Source
github.com/SigmaHQ/sigma

Detects the creation of a schtask via PowerSploit or Empire Default Configuration.

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: HackTool - Default PowerSploit/Empire Scheduled Task Creation
id: 56c217c3-2de2-479b-990f-5c109ba8458f
status: test
description: Detects the creation of a schtask via PowerSploit or Empire Default Configuration.
references:
    - https://github.com/0xdeadbeefJERKY/PowerSploit/blob/8690399ef70d2cad10213575ac67e8fa90ddf7c3/Persistence/Persistence.psm1
    - https://github.com/EmpireProject/Empire/blob/08cbd274bef78243d7a8ed6443b8364acd1fc48b/lib/modules/powershell/persistence/userland/schtasks.py
author: Markus Neis, @Karneades
date: 2018-03-06
modified: 2023-03-03
tags:
    - attack.execution
    - attack.persistence
    - attack.privilege-escalation
    - attack.s0111
    - attack.g0022
    - attack.g0060
    - car.2013-08-001
    - attack.t1053.005
    - attack.t1059.001
logsource:
    product: windows
    category: process_creation
detection:
    selection:
        ParentImage|endswith:
            - '\powershell.exe'
            - '\pwsh.exe'
        Image|endswith: '\schtasks.exe'
        CommandLine|contains|all:
            - '/Create'
            - 'powershell.exe -NonI'
            - '/TN Updater /TR'
        CommandLine|contains:
            - '/SC ONLOGON'
            - '/SC DAILY /ST'
            - '/SC ONIDLE'
            - '/SC HOURLY'
    condition: selection
falsepositives:
    - Unlikely
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    ParentImage|endswith:
        - '\powershell.exe'
        - '\pwsh.exe'
    Image|endswith: '\schtasks.exe'
    CommandLine|contains|all:
        - '/Create'
        - 'powershell.exe -NonI'
        - '/TN Updater /TR'
    CommandLine|contains:
        - '/SC ONLOGON'
        - '/SC DAILY /ST'
        - '/SC ONIDLE'
        - '/SC HOURLY'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
CommandLinematch
  • /Create corpus 9 (sigma 6, splunk 2, kusto 1)
  • /SC DAILY /ST
  • /SC HOURLY
  • /SC ONIDLE
  • /SC ONLOGON
  • /TN Updater /TR
  • powershell.exe -NonI
Imageends_with
  • \schtasks.exe corpus 56 (sigma 56)
ParentImageends_with
  • \powershell.exe corpus 24 (sigma 24)
  • \pwsh.exe corpus 21 (sigma 21)