Detection rules › Sigma

Tasks Folder Evasion

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Sreeman
Source
github.com/SigmaHQ/sigma

The Tasks folder in system32 and syswow64 are globally writable paths. Adversaries can take advantage of this and load or influence any script hosts or ANY .NET Application in Tasks to load and execute a custom assembly into cscript, wscript, regsvr32, mshta, eventvwr

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Tasks Folder Evasion
id: cc4e02ba-9c06-48e2-b09e-2500cace9ae0
status: test
description: |
    The Tasks folder in system32 and syswow64 are globally writable paths.
    Adversaries can take advantage of this and load or influence any script hosts or ANY .NET Application
    in Tasks to load and execute a custom assembly into cscript, wscript, regsvr32, mshta, eventvwr
references:
    - https://twitter.com/subTee/status/1216465628946563073
    - https://gist.github.com/am0nsec/8378da08f848424e4ab0cc5b317fdd26
author: Sreeman
date: 2020-01-13
modified: 2022-12-25
tags:
    - attack.privilege-escalation
    - attack.persistence
    - attack.execution
    - attack.stealth
    - attack.t1574.001
logsource:
    product: windows
    category: process_creation
detection:
    selection1:
        CommandLine|contains:
            - 'echo '
            - 'copy '
            - 'type '
            - 'file createnew'
    selection2:
        CommandLine|contains:
            - ' C:\Windows\System32\Tasks\'
            - ' C:\Windows\SysWow64\Tasks\'
    condition: all of selection*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

all of selection*

Stage 1: selection1

selection1:
    CommandLine|contains:
        - 'echo '
        - 'copy '
        - 'type '
        - 'file createnew'

Stage 2: selection2

selection2:
    CommandLine|contains:
        - ' C:\Windows\System32\Tasks\'
        - ' C:\Windows\SysWow64\Tasks\'

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
  • C:\Windows\SysWow64\Tasks\
  • C:\Windows\System32\Tasks\
  • copy corpus 12 (sigma 11, chronicle 1)
  • echo corpus 4 (sigma 2, elastic 2)
  • file createnew corpus 2 (sigma 2)
  • type corpus 6 (sigma 6)