Obfuscated command classic channel
A PowerShell command in the CLASSIC Windows PowerShell channel built out of concatenated string fragments — &('ne'+'w-'+'item'), ('h'+'ttp') …
What it detects
A PowerShell command in the CLASSIC Windows PowerShell channel built out of concatenated string fragments — &('ne'+'w-'+'item'), ('h'+'ttp') — rather than written plainly.
Splitting a cmdlet name across a concatenation is not something a person or a script does by accident; its only purpose is to defeat a detection looking for the whole word. Emotet's loader is the canonical example and appears in the benchmark corpus four times, obfuscating new-object, new-item, get-item and invoke-item this way.
This targets the classic channel deliberately. windows.powershell.obfuscated_scriptblock covers script-block logging (4104), which has to be turned on; the classic channel is on by default, and on an older estate it is the only PowerShell record that exists. Its 800 pipeline-execution events carry the command that ran.
MITRE ATT&CK mapping
False positives and triage
Ordinary scripts concatenate strings constantly — building a path or a message is normal — so the raw signal is weaker than it looks and the value is in WHAT was concatenated.
To confirm: read the command in the event. Fragments that reassemble a CMDLET NAME (&('ne'+'w-'+'object')), a URL, or a path are deliberate evasion; a script joining a folder and a filename is not. Backtick-escaped property names (`"SecURiTypROToCOL"`) and randomly-cased variables in the same command are corroboration — no author writes that way. Then find what the command downloaded or wrote, since the obfuscation is only the wrapper.
The rule
Declarative YAML read by the detection engine — data, never executed. Confidence 80%. Source: rules/windows/obfuscated_powershell_classic_channel.yaml, licensed under the Apache License 2.0.
id: windows.powershell.obfuscated_command_classic_channel
version: 1.0.0
status: stable
severity: high
confidence: 0.8
platforms: [windows]
mitre_techniques: [T1027, T1059.001, T1140]
description: |
A PowerShell command in the CLASSIC `Windows PowerShell` channel built out of
concatenated string fragments — `&('ne'+'w-'+'item')`, `('h'+'ttp')` — rather than
written plainly.
Splitting a cmdlet name across a concatenation is not something a person or a script
does by accident; its only purpose is to defeat a detection looking for the whole
word. Emotet's loader is the canonical example and appears in the benchmark corpus
four times, obfuscating `new-object`, `new-item`, `get-item` and `invoke-item` this
way.
This targets the classic channel deliberately. `windows.powershell.obfuscated_scriptblock`
covers script-block logging (4104), which has to be turned on; the classic channel is
on by default, and on an older estate it is the only PowerShell record that exists.
Its 800 pipeline-execution events carry the command that ran.
match:
source_channel_contains_any: ['Windows PowerShell']
raw_message_regex: "(?i)('\\s*\\+\\s*'|\"\\s*\\+\\s*\")"
correlation_keys: [hostname, user_name]
false_positive_guidance: |
Ordinary scripts concatenate strings constantly — building a path or a message is
normal — so the raw signal is weaker than it looks and the value is in WHAT was
concatenated.
To confirm: read the command in the event. Fragments that reassemble a CMDLET NAME
(`&('ne'+'w-'+'object')`), a URL, or a path are deliberate evasion; a script joining
a folder and a filename is not. Backtick-escaped property names
(``"SecURi`T`ypRO`T`oCOL"``) and randomly-cased variables in the same command are
corroboration — no author writes that way. Then find what the command downloaded or
wrote, since the obfuscation is only the wrapper.
Related detections
Run this rule on your own logs — offline
KIROSEC runs this rule and the rest of the library over Windows, Linux, macOS and cloud audit logs on the analyst's own machine. Every alert links to the events that raised it, and nothing leaves the device.
