Detection rules › Sigma

Disable Windows Defender AV Security Monitoring

Status
test
Severity
high
Log source
product windows, category process_creation
Author
ok @securonix invrep-de, oscd.community, frack113
Source
github.com/SigmaHQ/sigma

Detects attackers attempting to disable Windows Defender using Powershell

MITRE ATT&CK coverage

TacticTechniques
Defense ImpairmentT1685 Disable or Modify Tools

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Disable Windows Defender AV Security Monitoring
id: a7ee1722-c3c5-aeff-3212-c777e4733217
status: test
description: Detects attackers attempting to disable Windows Defender using Powershell
references:
    - https://research.nccgroup.com/2020/06/23/wastedlocker-a-new-ransomware-variant-developed-by-the-evil-corp-group/
    - https://rvsec0n.wordpress.com/2020/01/24/malwares-that-bypass-windows-defender/
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1562.001/T1562.001.md
author: 'ok @securonix invrep-de, oscd.community, frack113'
date: 2020-10-12
modified: 2022-11-18
tags:
    - attack.defense-impairment
    - attack.t1685
logsource:
    category: process_creation
    product: windows
detection:
    selection_pwsh_binary:
        - Image|endswith:
              - '\powershell.exe'
              - '\pwsh.exe'
        - OriginalFileName:
              - 'PowerShell.EXE'
              - 'pwsh.dll'
    selection_pwsh_cli:
        CommandLine|contains:
            - '-DisableBehaviorMonitoring $true'
            - '-DisableRuntimeMonitoring $true'
    selection_sc_binary:
        - Image|endswith: '\sc.exe'
        - OriginalFileName: 'sc.exe'
    selection_sc_tamper_cmd_stop:
        CommandLine|contains|all:
            - 'stop'
            - 'WinDefend'
    selection_sc_tamper_cmd_delete:
        CommandLine|contains|all:
            - 'delete'
            - 'WinDefend'
    selection_sc_tamper_cmd_disabled:
        CommandLine|contains|all:
            - 'config'
            - 'WinDefend'
            - 'start=disabled'
    condition: all of selection_pwsh_* or (selection_sc_binary and 1 of selection_sc_tamper_*)
falsepositives:
    - 'Minimal, for some older versions of dev tools, such as pycharm, developers were known to sometimes disable Windows Defender to improve performance, but this generally is not considered a good security practice.'
level: high

Stages and Predicates

Stage 0: condition

all of selection_pwsh_* or (selection_sc_binary and 1 of selection_sc_tamper_*)

Stage 1: selection_pwsh_binary

selection_pwsh_binary:
    - Image|endswith:
          - '\powershell.exe'
          - '\pwsh.exe'
    - OriginalFileName:
          - 'PowerShell.EXE'
          - 'pwsh.dll'

Stage 2: selection_pwsh_cli

selection_pwsh_cli:
    CommandLine|contains:
        - '-DisableBehaviorMonitoring $true'
        - '-DisableRuntimeMonitoring $true'

Stage 3: selection_sc_binary

selection_sc_binary:
    - Image|endswith: '\sc.exe'
    - OriginalFileName: 'sc.exe'

Stage 4: selection_sc_tamper_cmd_stop

selection_sc_tamper_cmd_stop:
    CommandLine|contains|all:
        - 'stop'
        - 'WinDefend'

Stage 5: selection_sc_tamper_cmd_delete

selection_sc_tamper_cmd_delete:
    CommandLine|contains|all:
        - 'delete'
        - 'WinDefend'

Stage 6: selection_sc_tamper_cmd_disabled

selection_sc_tamper_cmd_disabled:
    CommandLine|contains|all:
        - 'config'
        - 'WinDefend'
        - 'start=disabled'

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
  • -DisableBehaviorMonitoring $true
  • -DisableRuntimeMonitoring $true
  • WinDefend corpus 4 (sigma 3, kusto 1)
  • config corpus 16 (sigma 15, splunk 1)
  • delete corpus 23 (sigma 16, splunk 6, kusto 1)
  • start=disabled corpus 2 (sigma 2)
  • stop corpus 7 (sigma 5, splunk 2)
Imageends_with
  • \powershell.exe corpus 182 (sigma 182)
  • \pwsh.exe corpus 168 (sigma 168)
  • \sc.exe corpus 30 (sigma 30)
OriginalFileNameeq
  • PowerShell.EXE corpus 120 (sigma 84, splunk 30, elastic 6)
  • pwsh.dll corpus 112 (sigma 79, splunk 30, elastic 3)
  • sc.exe corpus 26 (sigma 12, splunk 10, elastic 4)