Detection rules › Kusto Query Language
Suspicious named pipes
This query looks for Named Pipe events that either contain one of the known IOCs or make use of patterns that can be linked to CobaltStrike usage.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | T1559 Inter-Process Communication |
| Privilege Escalation | T1055 Process Injection |
| Defense Evasion | T1055 Process Injection |
Event coverage
| Provider | Event ID | Title |
|---|---|---|
| Sysmon | 17 | PipeEvent (Pipe Created) |
| Sysmon | 18 | PipeEvent (Pipe Connected) |
| Defender-DeviceEvents | 9007006 | Named pipe event |
Stages and Predicates
Stage 1: source
DeviceEvents
Stage 2: where
macro "(Timestamp >= ago(timeframe))"
Stage 3: where
ActionType eq "NamedPipeEvent"
Stage 4: extend
Stage 5: extend
Stage 6: extend
Stage 7: extend
Stage 8: extend
Stage 9: where
or
and
not
or
PipeName match "InitiatingPID"
PipeName match "InitiatingParentPID"
PipeName match "ThreadId"
PipeName regex_match "\\\\(edge|chrome|edge\\.sync|chrome\\.sync)\\.\\d+\\.\\d+\\.\\d+$"
PipeName regex_match "\\\\(edge|chrome)\\.sync\\.\\d+\\.\\d+\\."
and
not
or
PipeName match "InitiatingPID"
PipeName match "InitiatingParentPID"
PipeName match "ThreadId"
PipeName regex_match "\\\\mojo\\.\\d+\\.\\d+\\.\\d+$"
PipeName regex_match "\\\\mojo\\.\\d+\\.\\d+\\."
and
not
or
PipeName match "InitiatingPID"
PipeName match "InitiatingParentPID"
PipeName regex_match "\\\\PSHost\\.\\d+\\.\\d+\\."
PipeName regex_match "\\\\PSHost\\.\\d+\\."
and
not
or
PipeName match "InitiatingPID"
PipeName match "InitiatingParentPID"
PipeName regex_match "\\\\crashpad_\\d+_[A-Z]+"
PipeName regex_match "\\\\crashpad_"
and
not
or
PipeName match "InitiatingPID"
PipeName regex_match "\\\\cubeb-pipe-\\d+_[0-9]{1-3}+"
PipeName regex_match "\\\\cubeb-pipe-"
and
PipeName match "CobaltStrikeMallable"
PipeName regex_match "[a-fA-F0-9]{2,10}$"
PipeName match "CobaltStrikeDefaults"
PipeName regex_match "\\\\pipe\\\\[0-9a-f]{7,10}"
PipeName regex_match "\\\\pipe\\\\[0-9a-f]{8}"
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
ActionType | eq |
|
PipeName | match |
|
PipeName | regex_match |
|