Detection rules › Sigma

WinRS usage for remote execution

Severity
high
Log source
product windows, category process_creation
Author
mdecrevoisier
Source
github.com/mdecrevoisier/SIGMA-detection-rules

Detects scenarios where an attacker abuses the WinRS capacities for remote execution.

MITRE ATT&CK coverage

Event coverage

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

selection

Stage 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.

FieldKindValues
CommandLinematch
  • -r: corpus 2 (sigma 1, splunk 1)
  • /r:
NewProcessNameends_with
  • \winrs.exe corpus 2 (sigma 2)