Possible Encoded PowerShell Patterns In CommandLine (via process_creation)
This rule detects specific combinations of encoding methods in PowerShell via the commandline
SigmalowWindowsv1
sigma
possible-encoded-powershell-patterns-in-commandline-via-process-creation
title: Possible Encoded PowerShell Patterns In CommandLine (via process_creation)
id: a5a96538-5f2b-5577-bcc9-e2cea0fa4201
status: stable
description: This rule detects specific combinations of encoding methods in PowerShell via the commandline
references:
- https://attack.mitre.org/techniques/T1059/001/
- https://attack.mitre.org/techniques/T1027/
- https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse?slide=65
author: Huntrule Team
date: 2026-04-21
tags:
- attack.stealth
- attack.t1027
- attack.execution
- attack.t1059.001
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
- OriginalFileName:
- 'PowerShell.EXE'
- 'pwsh.dll'
selection_to_1:
CommandLine|contains:
- 'ToInt'
- 'ToDecimal'
- 'ToByte'
- 'ToUint'
- 'ToSingle'
- 'ToSByte'
selection_to_2:
CommandLine|contains:
- 'ToChar'
- 'ToString'
- 'String'
selection_gen_1:
CommandLine|contains|all:
- 'char'
- 'join'
selection_gen_2:
CommandLine|contains|all:
- 'split'
- 'join'
condition: selection_img and (all of selection_to_* or 1 of selection_gen_*)
falsepositives:
- Unknown
level: low
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.