Detection rules › Sigma
WinRM listening service reconnaissance (WS-Management)
Detects scenarios where an attacker enumerates different remote WinRM listeners for lateral movement purposes.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement | T1021.006 Remote Services: Windows Remote Management |
Event coverage
| Provider | Event | Title |
|---|---|---|
| Security-Auditing | Event ID 4656 | A handle to an object was requested. |
Rule body yaml
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
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
SubjectUserName | ends_with | $ |
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 |
|---|---|---|
ObjectServer | eq |
|