Sigma rule: Potential PowerShell Obfuscation Using Alias Cmdlets

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-43143c031d71, updated 2026-09-17T00:00:00.000Z.

Rule

Title
Potential PowerShell Obfuscation Using Alias Cmdlets
Status
test
Level
low
Author
frack113
Date
2023-01-08
Modified
2026-09-17
File
rules/windows/powershell/powershell_script/posh_ps_susp_set_alias.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects Set-Alias or New-Alias cmdlet usage. Which can be use as a mean to obfuscate PowerShell scripts

Log source

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

Detection

selection:
    ScriptBlockText|contains:
        - 'Set-Alias '
        - 'New-Alias '
filter_main_cim:
    ScriptBlockText:
        - 'Set-Alias -Name ncms -Value New-CimSession -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
        - 'Set-Alias -Name gcls -Value Get-CimClass -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
        - 'Set-Alias -Name ncso -Value New-CimSessionOption -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
        - 'Set-Alias -Name gcms -Value Get-CimSession -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
        - 'Set-Alias -Name rcms -Value Remove-cimSession -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
        - 'Set-Alias -Name rcie -Value Register-CimIndicationEvent -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
        - 'Set-Alias -Name gcai -Value Get-CimAssociatedInstance -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
        - 'Set-Alias -Name gcim -Value Get-CimInstance -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
        - 'Set-Alias -Name scim -Value Set-CimInstance -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
        - 'Set-Alias -Name ncim -Value New-CimInstance -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
        - 'Set-Alias -Name ncim -Value New-CimInstance  -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
        - 'Set-Alias -Name rcim -Value Remove-cimInstance -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
        - 'Set-Alias -Name icim -Value Invoke-CimMethod -Option ReadOnly, AllScope -ErrorAction SilentlyContinue'
condition: selection and not 1 of filter_main_*

False positives (as the rule lists them)

  • Unknown

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_susp_set_alias.yml

Sources and licences

  • SigmaHQ

    "Potential PowerShell Obfuscation Using Alias Cmdlets" by frack113 (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_susp_set_alias.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: Potential PowerShell Obfuscation Using Alias Cmdlets",
entity page, dataset version ref-43143c031d71, updated 2026-09-17T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/96cd126d-f970-49c4-848a-da3a09f55c55 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 96cd126d-f970-49c4-848a-da3a09f55c55, 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.