Detection rules › Sigma

Suspicious Scripting in a WMI Consumer

Status
test
Severity
high
Log source
product windows, category wmi_event
Author
Florian Roth (Nextron Systems), Jonhnathan Ribeiro
Source
github.com/SigmaHQ/sigma

Detects suspicious commands that are related to scripting/powershell in WMI Event Consumers

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Suspicious Scripting in a WMI Consumer
id: fe21810c-2a8c-478f-8dd3-5a287fb2a0e0
status: test
description: Detects suspicious commands that are related to scripting/powershell in WMI Event Consumers
references:
    - https://in.security/an-intro-into-abusing-and-identifying-wmi-event-subscriptions-for-persistence/
    - https://github.com/Neo23x0/signature-base/blob/615bf1f6bac3c1bdc417025c40c073e6c2771a76/yara/gen_susp_lnk_files.yar#L19
    - https://github.com/RiccardoAncarani/LiquidSnake
author: Florian Roth (Nextron Systems), Jonhnathan Ribeiro
date: 2019-04-15
modified: 2023-09-09
tags:
    - attack.execution
    - attack.t1059.005
logsource:
    product: windows
    category: wmi_event
detection:
    selection_destination:
        - Destination|contains|all:
              - 'new-object'
              - 'net.webclient'
              - '.downloadstring'
        - Destination|contains|all:
              - 'new-object'
              - 'net.webclient'
              - '.downloadfile'
        - Destination|contains:
              - ' iex('
              - ' -nop '
              - ' -noprofile '
              - ' -decode '
              - ' -enc '
              - 'WScript.Shell'
              - 'System.Security.Cryptography.FromBase64Transform'
    condition: selection_destination
falsepositives:
    - Legitimate administrative scripts
level: high

Stages and Predicates

Stage 0: condition

selection_destination

Stage 1: selection_destination

selection_destination:
    - Destination|contains|all:
          - 'new-object'
          - 'net.webclient'
          - '.downloadstring'
    - Destination|contains|all:
          - 'new-object'
          - 'net.webclient'
          - '.downloadfile'
    - Destination|contains:
          - ' iex('
          - ' -nop '
          - ' -noprofile '
          - ' -decode '
          - ' -enc '
          - 'WScript.Shell'
          - 'System.Security.Cryptography.FromBase64Transform'

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
Destinationmatch
  • -decode
  • -enc
  • -nop
  • -noprofile
  • iex(
  • .downloadfile
  • .downloadstring
  • System.Security.Cryptography.FromBase64Transform
  • WScript.Shell
  • net.webclient
  • new-object