Detection rules › Sigma

Suspicious PowerShell Invocations - Generic - PowerShell Module

Status
test
Severity
high
Log source
product windows, category ps_module
Author
Florian Roth (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects suspicious PowerShell invocation command parameters

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Suspicious PowerShell Invocations - Generic - PowerShell Module
id: bbb80e91-5746-4fbe-8898-122e2cafdbf4
related:
    - id: 3d304fda-78aa-43ed-975c-d740798a49c1
      type: derived
    - id: ed965133-513f-41d9-a441-e38076a0798f
      type: similar
status: test
description: Detects suspicious PowerShell invocation command parameters
references:
    - Internal Research
author: Florian Roth (Nextron Systems)
date: 2017-03-12
modified: 2023-01-03
tags:
    - attack.execution
    - attack.t1059.001
logsource:
    product: windows
    category: ps_module
    definition: 0ad03ef1-f21b-4a79-8ce8-e6900c54b65b
detection:
    selection_encoded:
        ContextInfo|contains:
            - ' -enc '
            - ' -EncodedCommand '
            - ' -ec '
    selection_hidden:
        ContextInfo|contains:
            - ' -w hidden '
            - ' -window hidden '
            - ' -windowstyle hidden '
            - ' -w 1 '
    selection_noninteractive:
        ContextInfo|contains:
            - ' -noni '
            - ' -noninteractive '
    condition: all of selection*
falsepositives:
    - Very special / sneaky PowerShell scripts
level: high

Stages and Predicates

Stage 0: condition

all of selection*

Stage 1: selection_encoded

selection_encoded:
    ContextInfo|contains:
        - ' -enc '
        - ' -EncodedCommand '
        - ' -ec '

Stage 2: selection_hidden

selection_hidden:
    ContextInfo|contains:
        - ' -w hidden '
        - ' -window hidden '
        - ' -windowstyle hidden '
        - ' -w 1 '

Stage 3: selection_noninteractive

selection_noninteractive:
    ContextInfo|contains:
        - ' -noni '
        - ' -noninteractive '

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
ContextInfomatch
  • -EncodedCommand
  • -ec
  • -enc
  • -noni
  • -noninteractive
  • -w 1
  • -w hidden
  • -window hidden
  • -windowstyle hidden