Sigma rule: Potential PowerShell Command Line Obfuscation

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-901c284e9f5b, updated 2024-04-15T00:00:00.000Z.

Rule

Title
Potential PowerShell Command Line Obfuscation
Status
test
Level
high
Author
Teymur Kheirkhabarov (idea), Vasiliy Burov (rule), oscd.community, Tim Shelton (fp)
Date
2020-10-15
Modified
2024-04-15
File
rules/windows/process_creation/proc_creation_win_powershell_cmdline_special_characters.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects the PowerShell command lines with special characters

Log source

product
windows
category
process_creation

Detection

selection_img:
    - Image|endswith:
          - '\powershell.exe'
          - '\pwsh.exe'
    - OriginalFileName:
          - 'PowerShell.EXE'
          - 'pwsh.dll'
selection_re:
    # TODO: Optimize for PySIGMA
    - CommandLine|re: '\+.*\+.*\+.*\+.*\+.*\+.*\+.*\+.*\+.*\+.*\+.*\+.*\+.*\+'
    - CommandLine|re: '\{.*\{.*\{.*\{.*\{.*\{.*\{.*\{.*\{.*\{'
    - CommandLine|re: '\^.*\^.*\^.*\^.*\^'
    - CommandLine|re: '`.*`.*`.*`.*`'
filter_optional_amazonSSM:
    ParentImage: C:\Program Files\Amazon\SSM\ssm-document-worker.exe
filter_optional_defender_atp:
    CommandLine|contains:
        - 'new EventSource("Microsoft.Windows.Sense.Client.Management"'
        - 'public static extern bool InstallELAMCertificateInfo(SafeFileHandle handle);'
condition: all of selection_* and not 1 of filter_optional_*

False positives (as the rule lists them)

  • Amazon SSM Document Worker
  • Windows Defender ATP

Tags

  • attack.execution
  • attack.stealth
  • attack.t1027
  • attack.t1059.001

MITRE ATT&CK ids this rule names

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/process_creation/proc_creation_win_powershell_cmdline_special_characters.yml

Sources and licences

  • SigmaHQ

    "Potential PowerShell Command Line Obfuscation" by Teymur Kheirkhabarov (idea), Vasiliy Burov (rule), oscd.community, Tim Shelton (fp) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_powershell_cmdline_special_characters.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 Command Line Obfuscation",
entity page, dataset version ref-901c284e9f5b, updated 2024-04-15T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/d7bcd677-645d-4691-a8d4-7a5602b780d1 (accessed 2026-11-04).
Underlying source: SigmaHQ rule d7bcd677-645d-4691-a8d4-7a5602b780d1, 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.