Windows: WinRM Service Process Spawning Command-Line and Scripting Utilities

Flags suspicious child shells and admin utilities spawned by the WinRM host process (wsmprovhost.exe) on Windows.

FreeUnreviewedSigmahighv1
title: "Windows: WinRM Service Process Spawning Command-Line and Scripting Utilities"
id: 26b24ae9-76a2-4afa-947c-7921f804eb0e
status: test
description: This rule identifies process creation events where the parent process is wsmprovhost.exe and the child process command image ends with common command-line, shell, scripting, and utility executables (such as cmd.exe, PowerShell variants, bash/sh, wsl, schtasks, certutil, whoami, and bitsadmin). Attackers can leverage WinRM to execute commands remotely, often via intermediate shell or administrative utilities to establish execution, persistence, or privilege escalation. The detection relies on Windows process creation telemetry including parent and image paths.
author: Andreas Hunkeler (@Karneades), Markus Neis, Huntrule Team
references:
  - Internal Research
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_winrm_susp_child_process.yml
date: 2021-05-20
modified: 2022-07-14
tags:
  - attack.t1190
  - attack.initial-access
  - attack.persistence
  - attack.privilege-escalation
logsource:
  category: process_creation
  product: windows
detection:
  selection:
    ParentImage|endswith: \wsmprovhost.exe
    Image|endswith:
      - \cmd.exe
      - \sh.exe
      - \bash.exe
      - \powershell.exe
      - \pwsh.exe
      - \wsl.exe
      - \schtasks.exe
      - \certutil.exe
      - \whoami.exe
      - \bitsadmin.exe
  condition: selection
falsepositives:
  - Legitimate WinRM usage
level: high
license: DRL-1.1
related:
  - id: 5cc2cda8-f261-4d88-a2de-e9e193c86716
    type: derived

What it detects

This rule identifies process creation events where the parent process is wsmprovhost.exe and the child process command image ends with common command-line, shell, scripting, and utility executables (such as cmd.exe, PowerShell variants, bash/sh, wsl, schtasks, certutil, whoami, and bitsadmin). Attackers can leverage WinRM to execute commands remotely, often via intermediate shell or administrative utilities to establish execution, persistence, or privilege escalation. The detection relies on Windows process creation telemetry including parent and image paths.

Known false positives

  • Legitimate WinRM usage

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.