Suspicious XOR Encoded PowerShell Command (via process_creation)
This rule detects presence of a potentially xor encoded powershell command
SigmamediumWindowsv1
sigma
suspicious-xor-encoded-powershell-command-via-process-creation
title: Suspicious XOR Encoded PowerShell Command (via process_creation)
id: 1eb5b207-30ae-5901-aa74-f2550069ad8b
status: stable
description: This rule detects presence of a potentially xor encoded powershell command
references:
- https://attack.mitre.org/techniques/T1027/
- https://attack.mitre.org/techniques/T1140/
- https://attack.mitre.org/techniques/T1059/001/
- https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse?slide=65
- https://redcanary.com/blog/yellow-cockatoo/
- https://zero2auto.com/2020/05/19/netwalker-re/
- https://mez0.cc/posts/cobaltstrike-powershell-exec/
author: Huntrule Team
date: 2026-04-04
tags:
- attack.execution
- attack.stealth
- attack.t1059.001
- attack.t1140
- attack.t1027
logsource:
category: process_creation
product: windows
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_*
falsepositives:
- Unknown
level: medium
Known false positives
- Unknown
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.