Suspicious PowerShell Module Execution Using Encoded, Hidden, or Noninteractive Context (Windows)

Alerts on PowerShell module executions using encoded commands, hidden windows, or noninteractive flags to evade visibility and interaction.

FreeReviewedSigma · High · v2
Product
windows
Category
ps_module
Author
Florian Roth (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2017-03-12
Updated
2026-07-31
title: Suspicious PowerShell Module Execution Using Encoded, Hidden, or Noninteractive Context (Windows)
id: d868fced-3836-448d-a3a3-a9816f2075ec
related:
  - id: 3d304fda-78aa-43ed-975c-d740798a49c1
    type: derived
  - id: ed965133-513f-41d9-a441-e38076a0798f
    type: similar
  - id: bbb80e91-5746-4fbe-8898-122e2cafdbf4
    type: derived
status: test
description: This rule flags PowerShell module-related executions whose ContextInfo contains indicators of encoded commands, hidden windows, or noninteractive mode. Attackers often use these flags to run payloads stealthily and reduce user interaction, while encoded parameters can obscure intent. The detection relies on Windows telemetry that records PowerShell ContextInfo strings containing the specific parameter substrings.
references:
  - Internal Research
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_module/posh_pm_susp_invocation_generic.yml
author: Florian Roth (Nextron Systems), Huntrule Team
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
license: DRL-1.1