Detection rules › Sigma
WinRM listening service reconnaissance (WS-Management)
Detects scenarios where an attacker enumerates different remote WinRM listeners for lateral movement purposes.
Known false positives
- Administrator activity, Windows Server Manager, applications using WinRM
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement |
Telemetry coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 4656: A handle to an object was requested. |
Rule body
title: WinRM listening service reconnaissance (WS-Management)
description: Detects scenarios where an attacker enumerates different remote WinRM listeners for lateral movement purposes.
correlation: correlate SubjectLogonId from event ID 4656 with TargetLogonId from event ID 4624 to identify the source host.
auditing: requires 'Object Access'> 'Other Object Access Events' to be enabled. Note that event is produced only if the login via WinRM is successful.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0008-Lateral%20Movement/T1021.006-Windows%20Remote%20Management
- https://www.rapid7.com/blog/post/2012/11/08/abusing-windows-remote-management-winrm-with-metasploit/
- https://securethelogs.com/2019/08/30/hacking-windows-remote-management-winrm/
- https://www.ired.team/offensive-security/lateral-movement/winrs-for-lateral-movement
- https://www.redcanary.com/blog/lateral-movement-winrm-wmi/
- https://bohops.com/2020/05/12/ws-management-com-another-approach-for-winrm-lateral-movement/
- https://threathunterplaybook.com/notebooks/windows/02_execution/WIN-190511223310.html
- https://jpcertcc.github.io/ToolAnalysisResultSheet/details/WinRM.htm
- https://github.com/bohops/WSMan-WinRM
- https://github.com/mez-0/CSharpWinR
- https://github.com/antonioCoco/RogueWinRM
tags:
- attack.lateral_movement
- attack.t1021.006
author: mdecrevoisier
status: experimental
logsource:
product: windows
service: winrm
detection:
selection:
EventID: 4656 # Other Object Access Events
ObjectServer: 'WS-Management Listener'
filter:
SubjectUserName|endswith: '$'
condition: selection and not filter | count(Computer) > 30
timeframe: 15m
falsepositives:
- Administrator activity, Windows Server Manager, applications using WinRM
level: medium
Stages and Predicates
Stage 0: condition
selection and not filter | count(Computer) > 30Stage 1: selection
selection:
EventID: 4656
ObjectServer: 'WS-Management Listener'
Stage 2: not filter
filter:
SubjectUserName|endswith: '$'
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
SubjectUserName | ends_with | $ | excludes:SubjectUserName field:"SubjectUserName" value:"$" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ObjectServer | eq |
| field:"ObjectServer" kind:eq value:"WS-Management Listener" |