Sigma rule: Suspicious XOR Encoded PowerShell Command

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-4b925dff3147, updated 2023-01-30T00:00:00.000Z.

Rule

Title
Suspicious XOR Encoded PowerShell Command
Status
test
Level
medium
Author
Sami Ruohonen, Harish Segar, Tim Shelton, Teymur Kheirkhabarov, Vasiliy Burov, oscd.community, Nasreddine Bencherchali
Date
2018-09-05
Modified
2023-01-30
File
rules/windows/process_creation/proc_creation_win_powershell_xor_commandline.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects presence of a potentially xor encoded powershell command

Log source

product
windows
category
process_creation

Detection

selection_img:
    - Image|endswith:
          - '\powershell.exe'
          - '\pwsh.exe'
    - OriginalFileName:
          - 'PowerShell.EXE'
          - 'pwsh.dll'
    - Description: 'Windows PowerShell'
    - Product: 'PowerShell Core 6'
selection_cli_xor:
    CommandLine|contains: 'bxor'
selection_cli_other:
    CommandLine|contains:
        - 'ForEach'
        - 'for('
        - 'for '
        - '-join '
        - "-join'"
        - '-join"'
        - '-join`'
        - '::Join'
        - '[char]'
condition: all of selection_*

False positives (as the rule lists them)

  • Unknown

Tags

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

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

Sources and licences

  • SigmaHQ

    "Suspicious XOR Encoded PowerShell Command" by Sami Ruohonen, Harish Segar, Tim Shelton, Teymur Kheirkhabarov, Vasiliy Burov, oscd.community, Nasreddine Bencherchali (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_powershell_xor_commandline.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: Suspicious XOR Encoded PowerShell Command",
entity page, dataset version ref-4b925dff3147, updated 2023-01-30T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/bb780e0c-16cf-4383-8383-1e5471db6cf9 (accessed 2026-11-03).
Underlying source: SigmaHQ rule bb780e0c-16cf-4383-8383-1e5471db6cf9, 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.