Detection rules › Sigma
WinRS usage for remote execution
Detects scenarios where an attacker abuses the WinRS capacities for remote execution.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement | T1021.006 Remote Services: Windows Remote Management |
Event coverage
| Provider | Event | Title |
|---|---|---|
| Sysmon | Event ID 1 | Process creation |
| Security-Auditing | Event ID 4688 | A new process has been created. |
Rule body yaml
title: WinRS usage for remote execution
description: Detects scenarios where an attacker abuses the WinRS capacities for remote execution.
references:
- https://www.ired.team/offensive-security/lateral-movement/winrs-for-lateral-movement
- https://bohops.com/2020/05/12/ws-management-com-another-approach-for-winrm-lateral-movement/
- https://4sysops.com/archives/powershell-remoting-without-administrator-rights/
- https://www.synacktiv.com/publications/traces-of-windows-remote-command-execution.html
tags:
- attack.lateral_movement
- attack.t1021.006
author: mdecrevoisier
logsource:
product: windows
category: process_creation
detection:
selection: # Full command example: "winrs -r:<target> -u:domain\user -p:<psw> 'whoami /priv'"
NewProcessName|endswith: \winrs.exe
CommandLine|contains:
- '-r:'
- '/r:'
condition: selection
falsepositives:
- Pentest, Administrator activity
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
NewProcessName|endswith: \winrs.exe
CommandLine|contains:
- '-r:'
- '/r:'
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 |
|---|---|---|
CommandLine | match |
|
NewProcessName | ends_with |
|