Sigma rule: PowerShell Dynamic Module Invocation Via ExportedCommands Array Index - PS Script

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-3a80c76b319a, updated 2026-10-06T00:00:00.000Z.

Rule

Title
PowerShell Dynamic Module Invocation Via ExportedCommands Array Index - PS Script
Status
experimental
Level
medium
Author
Norbert Jaśniewicz (AlphaSOC)
Date
2026-10-06
File
rules/windows/powershell/powershell_script/posh_ps_cmdlet_invocation_via_exported_commands_array_index.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects obfuscated PowerShell scripts that enumerate Microsoft.PowerShell.Utility exported commands
and invoke cmdlets indirectly by array index. This can be used to evade detections
that look for explicit strings such as Invoke-RestMethod or Invoke-Expression.

Log source

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

Detection

selection_module_export_enum:
    ScriptBlockText|contains:
        - 'Get-Module '
        - 'gmo '
    ScriptBlockText|contains|all:
        - 'ListAvailable'
        - 'Microsoft.PowerShell.Utility'
        - 'ExportedCommands'
        - 'Values'
selection_index_used:
    ScriptBlockText|contains: '[*]'
condition: all of selection_*

False positives (as the rule lists them)

  • Legitimate use of exported commands array indexing in PowerShell scripts (should be rare)

Tags

  • attack.execution
  • attack.stealth
  • attack.t1027
  • 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_cmdlet_invocation_via_exported_commands_array_index.yml

Sources and licences

  • SigmaHQ

    "PowerShell Dynamic Module Invocation Via ExportedCommands Array Index - PS Script" by Norbert Jaśniewicz (AlphaSOC) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_cmdlet_invocation_via_exported_commands_array_index.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: PowerShell Dynamic Module Invocation Via ExportedCommands Array Index - PS Script",
entity page, dataset version ref-3a80c76b319a, updated 2026-10-06T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/4ff4ad3e-9fb5-4a70-9962-d6ea58090318 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 4ff4ad3e-9fb5-4a70-9962-d6ea58090318, 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.