Windows PowerShell Command Lines Containing [char]0x or (WCHAR)0x Obfuscation Syntax
Identifies PowerShell execution command lines using suspicious [char]0x or (WCHAR)0x encoding patterns.
- Product
- windows
- Category
- process_creation
- Author
- Florian Roth (Nextron Systems) (SigmaHQ), DRL 1.1
- Published
- 2020-07-09
- Updated
- 2026-07-30
ATT&CK techniques
Execution → Defense EvasionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule flags Windows process creation events where a PowerShell command line contains encoded character syntax patterns such as "[char]0x" or "(WCHAR)0x". Attackers commonly use these representations to obscure payload content and reduce readability for analysts and simple string-based detections. Detection relies on process creation telemetry and matching these specific substrings in the command line.
Reporting behind it
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: Windows PowerShell Command Lines Containing [char]0x or (WCHAR)0x Obfuscation Syntax
id: e9f97d72-a21f-4da4-b38a-c2164f09f4b5
status: test
description: This rule flags Windows process creation events where a PowerShell command line contains encoded character syntax patterns such as "[char]0x" or "(WCHAR)0x". Attackers commonly use these representations to obscure payload content and reduce readability for analysts and simple string-based detections. Detection relies on process creation telemetry and matching these specific substrings in the command line.
references:
- https://twitter.com/0gtweet/status/1281103918693482496
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_powershell_obfuscation_via_utf8.yml
author: Florian Roth (Nextron Systems), Huntrule Team
date: 2020-07-09
modified: 2025-03-03
tags:
- attack.execution
- attack.stealth
- attack.t1059.001
- attack.t1027
logsource:
category: process_creation
product: windows
detection:
selection:
CommandLine|contains:
- "[char]0x"
- (WCHAR)0x
condition: selection
falsepositives:
- Unknown
level: high
license: DRL-1.1
related:
- id: e312efd0-35a1-407f-8439-b8d434b438a6
type: derived