Detection rules › Sigma

PowerShell Web Access Feature Enabled Via DISM

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Michael Haag
Source
github.com/SigmaHQ/sigma

Detects the use of DISM to enable the PowerShell Web Access feature, which could be used for remote access and potential abuse

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: PowerShell Web Access Feature Enabled Via DISM
id: 7e8f2d3b-9c1a-4f67-b9e8-8d9006e0e51f
status: test
description: Detects the use of DISM to enable the PowerShell Web Access feature, which could be used for remote access and potential abuse
references:
    - https://docs.microsoft.com/en-us/powershell/module/dism/enable-windowsoptionalfeature
    - https://www.cisa.gov/news-events/cybersecurity-advisories/aa24-241a
    - https://gist.github.com/MHaggis/7e67b659af9148fa593cf2402edebb41
author: Michael Haag
date: 2024-09-03
tags:
    - attack.privilege-escalation
    - attack.persistence
    - attack.t1548.002
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\dism.exe'
        - OriginalFileName: 'DISM.EXE'
    selection_cli:
        CommandLine|contains|all:
            - 'WindowsPowerShellWebAccess'
            - '/online'
            - '/enable-feature'
    condition: all of selection_*
falsepositives:
    - Legitimate PowerShell Web Access installations by administrators
level: high

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

selection_img:
    - Image|endswith: '\dism.exe'
    - OriginalFileName: 'DISM.EXE'

Stage 2: selection_cli

selection_cli:
    CommandLine|contains|all:
        - 'WindowsPowerShellWebAccess'
        - '/online'
        - '/enable-feature'

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
  • /enable-feature corpus 2 (sigma 1, splunk 1)
  • /online corpus 4 (sigma 2, splunk 2)
  • WindowsPowerShellWebAccess corpus 2 (sigma 1, splunk 1)
Imageends_with
  • \dism.exe corpus 6 (sigma 6)
OriginalFileNameeq
  • DISM.EXE corpus 3 (elastic 2, sigma 1)