Detection rules › Sigma

Invoke-Obfuscation Via Stdin - System

Status
test
Severity
high
Log source
product windows, service system
Author
Nikita Nazarov, oscd.community
Source
github.com/SigmaHQ/sigma

Detects Obfuscated Powershell via Stdin in Scripts

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Invoke-Obfuscation Via Stdin - System
id: 487c7524-f892-4054-b263-8a0ace63fc25
status: test
description: Detects Obfuscated Powershell via Stdin in Scripts
references:
    - https://github.com/SigmaHQ/sigma/issues/1009 # (Task28)
author: Nikita Nazarov, oscd.community
date: 2020-10-12
modified: 2022-11-29
tags:
    - attack.stealth
    - attack.t1027
    - attack.execution
    - attack.t1059.001
logsource:
    product: windows
    service: system
detection:
    selection:
        Provider_Name: 'Service Control Manager'
        EventID: 7045
        # ImagePath|re: '(?i)(set).*&&\s?set.*(environment|invoke|\${?input).*&&.*"'
        ImagePath|contains|all:
            - 'set'
            - '&&'
        ImagePath|contains:
            - 'environment'
            - 'invoke'
            - 'input'
    condition: selection
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    Provider_Name: 'Service Control Manager'
    EventID: 7045
    ImagePath|contains|all:
        - 'set'
        - '&&'
    ImagePath|contains:
        - 'environment'
        - 'invoke'
        - 'input'

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
ImagePathmatch
  • && corpus 4 (sigma 4)
  • environment
  • input corpus 2 (sigma 2)
  • invoke corpus 2 (sigma 2)
  • set
Provider_Nameeq
  • Service Control Manager corpus 50 (sigma 50)