Detection rules › Sigma

Disable Windows Event Logging Via Registry

Status
test
Severity
high
Log source
category registry_set, product windows
Author
frack113, Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects tampering with the "Enabled" registry key in order to disable Windows logging of a Windows event channel

Known false positives

  • Rare falsepositives may occur from legitimate administrators disabling specific event log for troubleshooting

MITRE ATT&CK coverage

Telemetry coverage

Rule body

title: Disable Windows Event Logging Via Registry
id: 2f78da12-f7c7-430b-8b19-a28f269b77a3
status: test
description: Detects tampering with the "Enabled" registry key in order to disable Windows logging of a Windows event channel
references:
    - https://twitter.com/WhichbufferArda/status/1543900539280293889
    - https://github.com/DebugPrivilege/CPP/blob/c39d365617dbfbcb01fffad200d52b6239b2918c/Windows%20Defender/RestoreDefenderConfig.cpp
author: frack113, Nasreddine Bencherchali (Nextron Systems)
date: 2022-07-04
modified: 2024-03-25
tags:
    - attack.defense-impairment
    - attack.t1685.001
logsource:
    category: registry_set
    product: windows
detection:
    selection:
        TargetObject|contains: '\Microsoft\Windows\CurrentVersion\WINEVT\Channels\'
        TargetObject|endswith: '\Enabled'
        Details: 'DWORD (0x00000000)'
    filter_main_wevutil:
        Image: 'C:\Windows\system32\wevtutil.exe' # FP generated during installation of manifests via wevtutil
    filter_main_iis:
        Image|startswith: 'C:\Windows\winsxs\'
        Image|endswith: '\TiWorker.exe'  # Many different TargetObjects
    filter_main_svchost:
        Image: 'C:\Windows\System32\svchost.exe'
        TargetObject|contains:
            - '\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-FileInfoMinifilter'
            - '\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-ASN1\'
            - '\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Kernel-AppCompat\'
            - '\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Runtime\Error\'
            - '\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-CAPI2/Operational\'
    filter_main_trusted_installer:
        Image: C:\Windows\servicing\TrustedInstaller.exe
        TargetObject|contains: '\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Compat-Appraiser'
    filter_optional_empty: # This filter is related to aurora. Should be removed when fix is deployed. # TODO: Remove later
        Image: ''
    filter_optional_null: # This filter is related to aurora. Should be removed when fix is deployed. # TODO: Remove later
        Image: null
    condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
    - Rare falsepositives may occur from legitimate administrators disabling specific event log for troubleshooting
level: high

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_* and not 1 of filter_optional_*

Stage 1: selection

selection:
    TargetObject|contains: '\Microsoft\Windows\CurrentVersion\WINEVT\Channels\'
    TargetObject|endswith: '\Enabled'
    Details: 'DWORD (0x00000000)'

Stage 2: not filter_main_*

filter_main_wevutil:
    Image: 'C:\Windows\system32\wevtutil.exe'
filter_main_iis:
    Image|startswith: 'C:\Windows\winsxs\'
    Image|endswith: '\TiWorker.exe'
filter_main_svchost:
    Image: 'C:\Windows\System32\svchost.exe'
    TargetObject|contains:
        - '\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-FileInfoMinifilter'
        - '\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-ASN1\'
        - '\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Kernel-AppCompat\'
        - '\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Runtime\Error\'
        - '\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-CAPI2/Operational\'
filter_main_trusted_installer:
    Image: C:\Windows\servicing\TrustedInstaller.exe
    TargetObject|contains: '\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Compat-Appraiser'

Stage 3: not filter_optional_*

filter_optional_empty:
    Image: ''
filter_optional_null:
    Image: null

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
TargetObjectmatch\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-ASN1\excludes:TargetObject field:"TargetObject" value:"\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-ASN1\"
TargetObjectmatch\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-CAPI2/Operational\excludes:TargetObject field:"TargetObject" value:"\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-CAPI2/Operational\"
TargetObjectmatch\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-FileInfoMinifilterexcludes:TargetObject field:"TargetObject" value:"\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-FileInfoMinifilter"
TargetObjectmatch\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Kernel-AppCompat\excludes:TargetObject field:"TargetObject" value:"\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Kernel-AppCompat\"
TargetObjectmatch\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Runtime\Error\excludes:TargetObject field:"TargetObject" value:"\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Runtime\Error\"
ImageeqC:\Windows\System32\svchost.exeexcludes:Image field:"Image" value:"C:\Windows\System32\svchost.exe"
Imageends_with\TiWorker.exeexcludes:Image field:"Image" value:"\TiWorker.exe"
Imagestarts_withC:\Windows\winsxs\excludes:Image field:"Image" value:"C:\Windows\winsxs\"
ImageeqC:\Windows\servicing\TrustedInstaller.exeexcludes:Image field:"Image" value:"C:\Windows\servicing\TrustedInstaller.exe"
TargetObjectmatch\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Compat-Appraiserexcludes:TargetObject field:"TargetObject" value:"\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Compat-Appraiser"
ImageeqC:\Windows\system32\wevtutil.exeexcludes:Image field:"Image" value:"C:\Windows\system32\wevtutil.exe"
Imageis_null(no value, null check)excludes:Image

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Detailseq
  • DWORD (0x00000000) corpus 38 (sigma 36, chronicle 2)
field:"Details" kind:eq value:"DWORD (0x00000000)"
TargetObjectends_with
  • \Enabled corpus 3 (sigma 3)
field:"TargetObject" kind:ends_with value:"\Enabled"
TargetObjectmatch
  • \Microsoft\Windows\CurrentVersion\WINEVT\Channels\ corpus 2 (sigma 2)
field:"TargetObject" kind:match value:"\Microsoft\Windows\CurrentVersion\WINEVT\Channels\"