Windows Winrs.exe Local Command Execution via localhost/loopback
Alerts on Winrs.exe processes running locally by targeting localhost/loopback in /r or /remote.
FreeUnreviewedSigmahighv1
windows-winrs-exe-local-command-execution-via-localhost-loopback-bcfece3d
title: Windows Winrs.exe Local Command Execution via localhost/loopback
id: 2bca43d0-1e1a-4ed7-b770-a95e380e1aae
status: experimental
description: This rule flags process creations of Winrs.exe when its command line targets localhost or loopback addresses (including 127.0.0.1 and ::1). Winrs is commonly used for remote management, so local execution with these parameters can indicate proxy execution behavior for stealth or movement. The detection relies on Windows process creation telemetry, specifically matching Winrs image and command-line arguments for /r or /remote values.
references:
- https://cardinalops.com/blog/living-off-winrm-abusing-complexity-in-remote-management/
- https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/winrs
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_winrs_local_command_execution.yml
author: Liran Ravich, Nasreddine Bencherchali, Huntrule Team
date: 2025-10-22
tags:
- attack.lateral-movement
- attack.stealth
- attack.t1021.006
- attack.t1218
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith: \winrs.exe
- OriginalFileName: winrs.exe
selection_local_ip:
CommandLine|contains|windash:
- /r:localhost
- /r:127.0.0.1
- /r:[::1]
- /remote:localhost
- /remote:127.0.0.1
- /remote:[::1]
filter_main_remote:
CommandLine|contains|windash:
- "/r:"
- "/remote:"
condition: all of selection_* or (selection_img and not 1 of filter_main_*)
falsepositives:
- Unlikely
level: high
license: DRL-1.1
related:
- id: bcfece3d-56fe-4545-9931-3b8e92927db1
type: derived
What it detects
This rule flags process creations of Winrs.exe when its command line targets localhost or loopback addresses (including 127.0.0.1 and ::1). Winrs is commonly used for remote management, so local execution with these parameters can indicate proxy execution behavior for stealth or movement. The detection relies on Windows process creation telemetry, specifically matching Winrs image and command-line arguments for /r or /remote values.
Known false positives
- Unlikely
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.