PowerShell Dynamic Module Invocation Via ExportedCommands Array Index

 Original Source: [Sigma source]
Title: PowerShell Dynamic Module Invocation Via ExportedCommands Array Index
Status: experimental
Description:Detects PowerShell processes invoked with obfuscated command lines that enumerate Microsoft.PowerShell.Utility exported commands and invoke cmdlets indirectly by array index. This technique is used to evade detections that look for explicit strings such as Invoke-RestMethod or Invoke-Expression.
References:
  -https://www.linkedin.com/posts/mark-o-halloran1_clickfix-defense-evasion-tactic-today-i-ugcPost-7453463467736408064-snrp/
Author: Norbert Jaƛniewicz (AlphaSOC), Swachchhanda Shrawan Poudel (Nextron Systems)
Date: 2026-10-06
modified:None
Tags:
  • -'attack.execution'
  • -'attack.stealth'
  • -'attack.t1027.010'
  • -'attack.t1059.001'
Logsource:
  • product: windows
  • category: process_creation
Detection:
  selection_img:
    - Image|endswith:
      - '\powershell.exe'
      - '\pwsh.exe'
    - OriginalFileName:
      - 'powershell.exe'
      - 'pwsh.dll'
  selection_module_export_enum:
    CommandLine|contains:
      -'Get-Module '
      -'gmo '

    CommandLine|contains|all:
      -'ListAvailable'
      -'Microsoft.PowerShell.Utility'
      -'ExportedCommands'
      -'Values'

  selection_index_used:
    CommandLine|contains: '[*]'
  condition:all of selection_*
Falsepositives:
  -Legitimate use of exported commands array indexing during PowerShell command execution (should be rare)
Level: high