Detection rules › Sigma

Windows Defender Exclusions Added - PowerShell

Status
test
Severity
medium
Log source
product windows, category ps_script
Author
Tim Rauch, Elastic (idea)
Source
github.com/SigmaHQ/sigma

Detects modifications to the Windows Defender configuration settings using PowerShell to add exclusions

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Windows Defender Exclusions Added - PowerShell
id: c1344fa2-323b-4d2e-9176-84b4d4821c88
related:
    - id: 17769c90-230e-488b-a463-e05c08e9d48f
      type: similar
status: test
description: Detects modifications to the Windows Defender configuration settings using PowerShell to add exclusions
references:
    - https://www.elastic.co/guide/en/security/current/windows-defender-exclusions-added-via-powershell.html
author: Tim Rauch, Elastic (idea)
date: 2022-09-16
modified: 2022-11-26
tags:
    - attack.defense-impairment
    - attack.t1685
    - attack.execution
    - attack.t1059
logsource:
    category: ps_script
    product: windows
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection_args_exc:
        ScriptBlockText|contains:
            - ' -ExclusionPath '
            - ' -ExclusionExtension '
            - ' -ExclusionProcess '
            - ' -ExclusionIpAddress '
    selection_args_pref:
        ScriptBlockText|contains:
            - 'Add-MpPreference '
            - 'Set-MpPreference '
    condition: all of selection*
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

all of selection*

Stage 1: selection_args_exc

selection_args_exc:
    ScriptBlockText|contains:
        - ' -ExclusionPath '
        - ' -ExclusionExtension '
        - ' -ExclusionProcess '
        - ' -ExclusionIpAddress '

Stage 2: selection_args_pref

selection_args_pref:
    ScriptBlockText|contains:
        - 'Add-MpPreference '
        - 'Set-MpPreference '

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
  • -ExclusionExtension
  • -ExclusionIpAddress
  • -ExclusionPath
  • -ExclusionProcess
  • Add-MpPreference corpus 2 (sigma 1, splunk 1)
  • Set-MpPreference corpus 2 (sigma 1, splunk 1)