Detection rules › Kusto
Detect Unknown process launched via WinRM
When an unknown process is being launched from the WinRM service on a server, this might indicate a malicious actor spreading malware on various servers via the WinRM protocol.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement | T1021.006 Remote Services: Windows Remote Management |
References
Event coverage
| Provider | Event/ActionType | Title |
|---|---|---|
| Sysmon | Event ID 1 | Process creation |
| Security-Auditing | Event ID 4688 | A new process has been created. |
| Defender-DeviceProcessEvents | any | Process activity (any) |
Rule body yaml
DeviceProcessEvents
| where InitiatingProcessFileName contains "wsmprovhost.exe"
| invoke FileProfile(SHA1)
| where GlobalPrevalence < 1000
| join kind=leftouter (
DeviceNetworkEvents
| where ActionType == "InboundConnectionAccepted"
| where LocalPort in ("5985", "5986")
| distinct RemoteIP, DeviceId
) on DeviceId
| project-away DeviceId1
Stages and Predicates
Stage 1: source
DeviceProcessEvents
Stage 2: where
| where InitiatingProcessFileName contains "wsmprovhost.exe"
Stage 3: invoke
| invoke FileProfile(SHA1)
Stage 4: where
| where GlobalPrevalence < 1000
Stage 5: join
| join kind=leftouter (
DeviceNetworkEvents
| where ActionType == "InboundConnectionAccepted"
| where LocalPort in ("5985", "5986")
| distinct RemoteIP, DeviceId
) on DeviceId
Stage 6: project-away
| project-away DeviceId1
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 |
|
GlobalPrevalence | lt |
|
InitiatingProcessFileName | contains |
|
LocalPort | in |
|