Detection rules › Sigma

Disable-WindowsOptionalFeature Command PowerShell

Severity
high
Author
frack113
Source
upstream

Detect built in PowerShell cmdlet Disable-WindowsOptionalFeature, Deployment Image Servicing and Management tool. Similar to DISM.exe, this cmdlet is used to enumerate, install, uninstall, configure, and update features and packages in Windows images

MITRE ATT&CK coverage

TacticTechniques
Defense EvasionT1562.001 Impair Defenses: Disable or Modify Tools

Event coverage

ProviderEvent IDTitle
PowerShell4104Creating Scriptblock text (MessageNumber of MessageTotal).

Stages and Predicates

Stage 1: all of selection_cmd

ScriptBlockText|contains: -FeatureName
ScriptBlockText|contains: -Online
ScriptBlockText|contains: Disable-WindowsOptionalFeature

Stage 2: all of selection_feature

or:
ScriptBlockText|contains: Windows-Defender
ScriptBlockText|contains: 'Windows-Defender-ApplicationGuard'
ScriptBlockText|contains: Windows-Defender-Features
ScriptBlockText|contains: Windows-Defender-Gui

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
ScriptBlockTextmatch
  • -FeatureName corpus 2 (sigma 2)
  • -Online corpus 2 (sigma 2)
  • Disable-WindowsOptionalFeature
  • Windows-Defender
  • Windows-Defender-ApplicationGuard
  • Windows-Defender-Features
  • Windows-Defender-Gui

Neighbors

Broader alternatives (more inclusive than this rule)

These rules match a superset of what this rule catches. They cover the same events plus more. Use them if you want wider coverage and can absorb more false positives.