Sigma rule: Suspicious PowerShell Invocations - Specific

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-2ff585d3fb70, updated 2025-02-17T00:00:00.000Z.

Rule

Title
Suspicious PowerShell Invocations - Specific
Status
test
Level
high
Author
Florian Roth (Nextron Systems), Jonhnathan Ribeiro
Date
2017-03-05
Modified
2025-02-17
File
rules/windows/powershell/powershell_script/posh_ps_susp_invocation_specific.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects suspicious PowerShell invocation command parameters

Log source

product
windows
category
ps_script
definition
Requirements: Script Block Logging must be enabled

Detection

selection_convert_b64:
    ScriptBlockText|contains|all:
        - '-nop'
        - ' -w '
        - 'hidden'
        - ' -c '
        - '[Convert]::FromBase64String'
selection_iex_selection:
    ScriptBlockText|contains|all:
        - ' -w '
        - 'hidden'
        - '-noni'
        - '-nop'
        - ' -c '
        - 'iex'
        - 'New-Object'
selection_enc_selection:
    ScriptBlockText|contains|all:
        - ' -w '
        - 'hidden'
        - '-ep'
        - 'bypass'
        - '-Enc'
selection_reg_selection:
    ScriptBlockText|contains|all:
        - 'powershell'
        - 'reg'
        - 'add'
    ScriptBlockText|contains:
        - '\software\microsoft\windows\currentversion\run'
        - '\software\wow6432node\microsoft\windows\currentversion\run'
        - '\software\microsoft\windows\currentversion\policies\explorer\run'
selection_webclient_selection:
    ScriptBlockText|contains|all:
        - 'bypass'
        - '-noprofile'
        - '-windowstyle'
        - 'hidden'
        - 'new-object'
        - 'system.net.webclient'
        - '.download'
selection_iex_webclient:
    ScriptBlockText|contains|all:
        - 'iex'
        - 'New-Object'
        - 'Net.WebClient'
        - '.Download'
filter_chocolatey:
    ScriptBlockText|contains:
        - "(New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1"
        - "(New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')"
        - 'Write-ChocolateyWarning'
condition: 1 of selection_* and not 1 of filter_*

False positives (as the rule lists them)

  • Unknown

Tags

  • attack.execution
  • attack.t1059.001

MITRE ATT&CK ids this rule names

Related rules

References

Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_susp_invocation_specific.yml

Sources and licences

  • SigmaHQ

    "Suspicious PowerShell Invocations - Specific" by Florian Roth (Nextron Systems), Jonhnathan Ribeiro (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_susp_invocation_specific.yml.
    Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License

    Detection Rule License (DRL) 1.1

Cite this page

Dragons Eye Ransomware Tracker, "Sigma rule: Suspicious PowerShell Invocations - Specific",
entity page, dataset version ref-2ff585d3fb70, updated 2025-02-17T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/ae7fbf8e-f3cb-49fd-8db4-5f3bed522c71 (accessed 2026-11-03).
Underlying source: SigmaHQ rule ae7fbf8e-f3cb-49fd-8db4-5f3bed522c71, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.

Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.