Detection rules › Sigma

Suspicious WSMAN Provider Image Loads

Status
test
Severity
medium
Log source
product windows, category image_load
Author
Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research)
Source
github.com/SigmaHQ/sigma

Detects signs of potential use of the WSMAN provider from uncommon processes locally and remote execution.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 7Image loaded

Rule body yaml

title: Suspicious WSMAN Provider Image Loads
id: ad1f4bb9-8dfb-4765-adb6-2a7cfb6c0f94
status: test
description: Detects signs of potential use of the WSMAN provider from uncommon processes locally and remote execution.
references:
    - https://twitter.com/chadtilbury/status/1275851297770610688
    - https://bohops.com/2020/05/12/ws-management-com-another-approach-for-winrm-lateral-movement/
    - https://learn.microsoft.com/en-us/windows/win32/winrm/windows-remote-management-architecture
    - https://github.com/bohops/WSMan-WinRM
author: Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research)
date: 2020-06-24
modified: 2025-10-17
tags:
    - attack.execution
    - attack.t1059.001
    - attack.lateral-movement
    - attack.t1021.003
logsource:
    category: image_load
    product: windows
detection:
    request_client:
        - ImageLoaded|endswith:
              - '\WsmSvc.dll'
              - '\WsmAuto.dll'
              - '\Microsoft.WSMan.Management.ni.dll'
        - OriginalFileName:
              - 'WsmSvc.dll'
              - 'WSMANAUTOMATION.DLL'
              - 'Microsoft.WSMan.Management.dll'
    respond_server:
        Image|endswith: '\svchost.exe'
        OriginalFileName: 'WsmWmiPl.dll'
    filter_general:
        Image:
            - 'C:\Program Files (x86)\PowerShell\6\pwsh.exe'
            - 'C:\Program Files (x86)\PowerShell\7\pwsh.exe'
            - 'C:\Program Files\PowerShell\6\pwsh.exe'
            - 'C:\Program Files\PowerShell\7\pwsh.exe'
            - 'C:\Windows\System32\sdiagnhost.exe'
            - 'C:\Windows\System32\services.exe'
            - 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe'
            - 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe'
    filter_svchost: # not available in Sysmon data, but Aurora logs
        CommandLine|contains:
            - 'svchost.exe -k netsvcs -p -s BITS'
            - 'svchost.exe -k GraphicsPerfSvcGroup -s GraphicsPerfSvc'
            - 'svchost.exe -k NetworkService -p -s Wecsvc'
            - 'svchost.exe -k netsvcs'
    filter_mscorsvw: # Image: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorsvw.exe
        Image|startswith:
            - 'C:\Windows\Microsoft.NET\Framework64\v'
            - 'C:\Windows\Microsoft.NET\Framework\v'
            - 'C:\Windows\Microsoft.NET\FrameworkArm\v'
            - 'C:\Windows\Microsoft.NET\FrameworkArm64\v'
        Image|endswith: '\mscorsvw.exe'
    filter_svr_2019:
        Image:
            - 'C:\Windows\System32\Configure-SMRemoting.exe'
            - 'C:\Windows\System32\ServerManager.exe'
    filter_nextron:
        Image|startswith: 'C:\Windows\Temp\asgard2-agent\'
    filter_citrix:
        Image|startswith: 'C:\Program Files\Citrix\'
    filter_upgrade:
        Image|startswith: 'C:\$WINDOWS.~BT\Sources\'
    filter_mmc:
        Image|endswith: '\mmc.exe'
    svchost:
        Image|endswith: '\svchost.exe'
    commandline_null:
        CommandLine: null
    condition: ( request_client or respond_server ) and not 1 of filter* and not ( svchost and commandline_null )
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

( request_client or respond_server ) and not 1 of filter* and not ( svchost and commandline_null )

Stage 1: request_client

request_client:
    - ImageLoaded|endswith:
          - '\WsmSvc.dll'
          - '\WsmAuto.dll'
          - '\Microsoft.WSMan.Management.ni.dll'
    - OriginalFileName:
          - 'WsmSvc.dll'
          - 'WSMANAUTOMATION.DLL'
          - 'Microsoft.WSMan.Management.dll'

Stage 2: respond_server

respond_server:
    Image|endswith: '\svchost.exe'
    OriginalFileName: 'WsmWmiPl.dll'

Stage 3: not filter*

filter_general:
    Image:
        - 'C:\Program Files (x86)\PowerShell\6\pwsh.exe'
        - 'C:\Program Files (x86)\PowerShell\7\pwsh.exe'
        - 'C:\Program Files\PowerShell\6\pwsh.exe'
        - 'C:\Program Files\PowerShell\7\pwsh.exe'
        - 'C:\Windows\System32\sdiagnhost.exe'
        - 'C:\Windows\System32\services.exe'
        - 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe'
        - 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe'
filter_svchost:
    CommandLine|contains:
        - 'svchost.exe -k netsvcs -p -s BITS'
        - 'svchost.exe -k GraphicsPerfSvcGroup -s GraphicsPerfSvc'
        - 'svchost.exe -k NetworkService -p -s Wecsvc'
        - 'svchost.exe -k netsvcs'
filter_mscorsvw:
    Image|startswith:
        - 'C:\Windows\Microsoft.NET\Framework64\v'
        - 'C:\Windows\Microsoft.NET\Framework\v'
        - 'C:\Windows\Microsoft.NET\FrameworkArm\v'
        - 'C:\Windows\Microsoft.NET\FrameworkArm64\v'
    Image|endswith: '\mscorsvw.exe'
filter_svr_2019:
    Image:
        - 'C:\Windows\System32\Configure-SMRemoting.exe'
        - 'C:\Windows\System32\ServerManager.exe'
filter_nextron:
    Image|startswith: 'C:\Windows\Temp\asgard2-agent\'
filter_citrix:
    Image|startswith: 'C:\Program Files\Citrix\'
filter_upgrade:
    Image|startswith: 'C:\$WINDOWS.~BT\Sources\'
filter_mmc:
    Image|endswith: '\mmc.exe'

Stage 4: not svchost

svchost:
    Image|endswith: '\svchost.exe'

Stage 5: not commandline_null

commandline_null:
    CommandLine: null

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
Imagestarts_withC:\Windows\Microsoft.NET\Framework64\v
Imagestarts_withC:\Windows\Microsoft.NET\FrameworkArm64\v
Imagestarts_withC:\Windows\Microsoft.NET\FrameworkArm\v
Imagestarts_withC:\Windows\Microsoft.NET\Framework\v
Imageends_with\mscorsvw.exe
CommandLinematchsvchost.exe -k GraphicsPerfSvcGroup -s GraphicsPerfSvc
CommandLinematchsvchost.exe -k NetworkService -p -s Wecsvc
CommandLinematchsvchost.exe -k netsvcs -p -s BITS
CommandLinematchsvchost.exe -k netsvcs
Imageends_with\mmc.exe
ImageeqC:\Program Files (x86)\PowerShell\6\pwsh.exe
ImageeqC:\Program Files (x86)\PowerShell\7\pwsh.exe
ImageeqC:\Program Files\PowerShell\6\pwsh.exe
ImageeqC:\Program Files\PowerShell\7\pwsh.exe
ImageeqC:\Windows\System32\Configure-SMRemoting.exe
ImageeqC:\Windows\System32\ServerManager.exe
ImageeqC:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
ImageeqC:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe
ImageeqC:\Windows\System32\sdiagnhost.exe
ImageeqC:\Windows\System32\services.exe
Imagestarts_withC:\$WINDOWS.~BT\Sources\
Imagestarts_withC:\Program Files\Citrix\
Imagestarts_withC:\Windows\Temp\asgard2-agent\
Imageends_with\svchost.exe
CommandLineis_null(no value, null check)

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
Imageends_with
  • \svchost.exe corpus 23 (sigma 23)
ImageLoadedends_with
  • \Microsoft.WSMan.Management.ni.dll
  • \WsmAuto.dll
  • \WsmSvc.dll corpus 2 (sigma 2)
OriginalFileNameeq
  • Microsoft.WSMan.Management.dll
  • WSMANAUTOMATION.DLL
  • WsmSvc.dll
  • WsmWmiPl.dll