Detection rules › Sigma

Suspicious PowerShell Parameter Substring

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Florian Roth (Nextron Systems), Daniel Bohannon (idea), Roberto Rodriguez (Fix)
Source
github.com/SigmaHQ/sigma

Detects suspicious PowerShell invocation with a parameter substring

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Suspicious PowerShell Parameter Substring
id: 36210e0d-5b19-485d-a087-c096088885f0
status: test
description: Detects suspicious PowerShell invocation with a parameter substring
references:
    - http://www.danielbohannon.com/blog-1/2017/3/12/powershell-execution-argument-obfuscation-how-it-can-make-detection-easier
author: Florian Roth (Nextron Systems), Daniel Bohannon (idea), Roberto Rodriguez (Fix)
date: 2019-01-16
modified: 2022-07-14
tags:
    - attack.execution
    - attack.t1059.001
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith:
            - '\powershell.exe'
            - '\pwsh.exe'
        CommandLine|contains:
            - ' -windowstyle h '
            - ' -windowstyl h'
            - ' -windowsty h'
            - ' -windowst h'
            - ' -windows h'
            - ' -windo h'
            - ' -wind h'
            - ' -win h'
            - ' -wi h'
            - ' -win h '
            - ' -win hi '
            - ' -win hid '
            - ' -win hidd '
            - ' -win hidde '
            - ' -NoPr '
            - ' -NoPro '
            - ' -NoProf '
            - ' -NoProfi '
            - ' -NoProfil '
            - ' -nonin '
            - ' -nonint '
            - ' -noninte '
            - ' -noninter '
            - ' -nonintera '
            - ' -noninterac '
            - ' -noninteract '
            - ' -noninteracti '
            - ' -noninteractiv '
            - ' -ec '
            - ' -encodedComman '
            - ' -encodedComma '
            - ' -encodedComm '
            - ' -encodedCom '
            - ' -encodedCo '
            - ' -encodedC '
            - ' -encoded '
            - ' -encode '
            - ' -encod '
            - ' -enco '
            - ' -en '
            - ' -executionpolic '
            - ' -executionpoli '
            - ' -executionpol '
            - ' -executionpo '
            - ' -executionp '
            - ' -execution bypass'
            - ' -executio bypass'
            - ' -executi bypass'
            - ' -execut bypass'
            - ' -execu bypass'
            - ' -exec bypass'
            - ' -exe bypass'
            - ' -ex bypass'
            - ' -ep bypass'
            - ' /windowstyle h '
            - ' /windowstyl h'
            - ' /windowsty h'
            - ' /windowst h'
            - ' /windows h'
            - ' /windo h'
            - ' /wind h'
            - ' /win h'
            - ' /wi h'
            - ' /win h '
            - ' /win hi '
            - ' /win hid '
            - ' /win hidd '
            - ' /win hidde '
            - ' /NoPr '
            - ' /NoPro '
            - ' /NoProf '
            - ' /NoProfi '
            - ' /NoProfil '
            - ' /nonin '
            - ' /nonint '
            - ' /noninte '
            - ' /noninter '
            - ' /nonintera '
            - ' /noninterac '
            - ' /noninteract '
            - ' /noninteracti '
            - ' /noninteractiv '
            - ' /ec '
            - ' /encodedComman '
            - ' /encodedComma '
            - ' /encodedComm '
            - ' /encodedCom '
            - ' /encodedCo '
            - ' /encodedC '
            - ' /encoded '
            - ' /encode '
            - ' /encod '
            - ' /enco '
            - ' /en '
            - ' /executionpolic '
            - ' /executionpoli '
            - ' /executionpol '
            - ' /executionpo '
            - ' /executionp '
            - ' /execution bypass'
            - ' /executio bypass'
            - ' /executi bypass'
            - ' /execut bypass'
            - ' /execu bypass'
            - ' /exec bypass'
            - ' /exe bypass'
            - ' /ex bypass'
            - ' /ep bypass'
    condition: selection
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    Image|endswith:
        - '\powershell.exe'
        - '\pwsh.exe'
    CommandLine|contains:
        - ' -windowstyle h '
        - ' -windowstyl h'
        - ' -windowsty h'
        - ' -windowst h'
        - ' -windows h'
        - ' -windo h'
        - ' -wind h'
        - ' -win h'
        - ' -wi h'
        - ' -win h '
        - ' -win hi '
        - ' -win hid '
        - ' -win hidd '
        - ' -win hidde '
        - ' -NoPr '
        - ' -NoPro '
        - ' -NoProf '
        - ' -NoProfi '
        - ' -NoProfil '
        - ' -nonin '
        - ' -nonint '
        - ' -noninte '
        - ' -noninter '
        - ' -nonintera '
        - ' -noninterac '
        - ' -noninteract '
        - ' -noninteracti '
        - ' -noninteractiv '
        - ' -ec '
        - ' -encodedComman '
        - ' -encodedComma '
        - ' -encodedComm '
        - ' -encodedCom '
        - ' -encodedCo '
        - ' -encodedC '
        - ' -encoded '
        - ' -encode '
        - ' -encod '
        - ' -enco '
        - ' -en '
        - ' -executionpolic '
        - ' -executionpoli '
        - ' -executionpol '
        - ' -executionpo '
        - ' -executionp '
        - ' -execution bypass'
        - ' -executio bypass'
        - ' -executi bypass'
        - ' -execut bypass'
        - ' -execu bypass'
        - ' -exec bypass'
        - ' -exe bypass'
        - ' -ex bypass'
        - ' -ep bypass'
        - ' /windowstyle h '
        - ' /windowstyl h'
        - ' /windowsty h'
        - ' /windowst h'
        - ' /windows h'
        - ' /windo h'
        - ' /wind h'
        - ' /win h'
        - ' /wi h'
        - ' /win h '
        - ' /win hi '
        - ' /win hid '
        - ' /win hidd '
        - ' /win hidde '
        - ' /NoPr '
        - ' /NoPro '
        - ' /NoProf '
        - ' /NoProfi '
        - ' /NoProfil '
        - ' /nonin '
        - ' /nonint '
        - ' /noninte '
        - ' /noninter '
        - ' /nonintera '
        - ' /noninterac '
        - ' /noninteract '
        - ' /noninteracti '
        - ' /noninteractiv '
        - ' /ec '
        - ' /encodedComman '
        - ' /encodedComma '
        - ' /encodedComm '
        - ' /encodedCom '
        - ' /encodedCo '
        - ' /encodedC '
        - ' /encoded '
        - ' /encode '
        - ' /encod '
        - ' /enco '
        - ' /en '
        - ' /executionpolic '
        - ' /executionpoli '
        - ' /executionpol '
        - ' /executionpo '
        - ' /executionp '
        - ' /execution bypass'
        - ' /executio bypass'
        - ' /executi bypass'
        - ' /execut bypass'
        - ' /execu bypass'
        - ' /exec bypass'
        - ' /exe bypass'
        - ' /ex bypass'
        - ' /ep bypass'

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
  • -NoPr
  • -NoPro
  • -NoProf
  • -NoProfi
  • -NoProfil
  • -ec corpus 2 (sigma 2)
  • -en corpus 3 (sigma 3)
  • -enco
  • -encod
  • -encode
  • -encoded
  • -encodedC
  • -encodedCo
  • -encodedCom
  • -encodedComm
  • -encodedComma
  • -encodedComman
  • -ep bypass
  • -ex bypass
  • -exe bypass
  • -exec bypass
  • -execu bypass
  • -execut bypass
  • -executi bypass
  • -executio bypass
  • -execution bypass
  • -executionp
  • -executionpo
  • -executionpol
  • -executionpoli
  • -executionpolic
  • -nonin
  • -nonint
  • -noninte
  • -noninter
  • -nonintera
  • -noninterac
  • -noninteract
  • -noninteracti
  • -noninteractiv
  • -wi h
  • -win h
  • -win h
  • -win hi
  • -win hid
  • -win hidd
  • -win hidde
  • -wind h
  • -windo h
  • -windows h
  • -windowst h
  • -windowsty h
  • -windowstyl h
  • -windowstyle h
  • /NoPr
  • /NoPro
  • /NoProf
  • /NoProfi
  • /NoProfil
  • /ec
  • /en
  • /enco
  • /encod
  • /encode
  • /encoded
  • /encodedC
  • /encodedCo
  • /encodedCom
  • /encodedComm
  • /encodedComma
  • /encodedComman
  • /ep bypass
  • /ex bypass
  • /exe bypass
  • /exec bypass
  • /execu bypass
  • /execut bypass
  • /executi bypass
  • /executio bypass
  • /execution bypass
  • /executionp
  • /executionpo
  • /executionpol
  • /executionpoli
  • /executionpolic
  • /nonin
  • /nonint
  • /noninte
  • /noninter
  • /nonintera
  • /noninterac
  • /noninteract
  • /noninteracti
  • /noninteractiv
  • /wi h
  • /win h
  • /win h
  • /win hi
  • /win hid
  • /win hidd
  • /win hidde
  • /wind h
  • /windo h
  • /windows h
  • /windowst h
  • /windowsty h
  • /windowstyl h
  • /windowstyle h
Imageends_with
  • \powershell.exe corpus 182 (sigma 182)
  • \pwsh.exe corpus 168 (sigma 168)