Detection rules › Sigma

Security Service Disabled Via Reg.EXE

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Florian Roth (Nextron Systems), John Lambert (idea), elhoim
Source
github.com/SigmaHQ/sigma

Detects execution of "reg.exe" to disable security services such as Windows Defender.

MITRE ATT&CK coverage

TacticTechniques
Defense ImpairmentT1685 Disable or Modify Tools

Event coverage

Rule body yaml

title: Security Service Disabled Via Reg.EXE
id: 5e95028c-5229-4214-afae-d653d573d0ec
status: test
description: Detects execution of "reg.exe" to disable security services such as Windows Defender.
references:
    - https://twitter.com/JohnLaTwC/status/1415295021041979392
    - https://github.com/gordonbay/Windows-On-Reins/blob/e587ac7a0407847865926d575e3c46f68cf7c68d/wor.ps1
    - https://vms.drweb.fr/virus/?i=24144899
    - https://bidouillesecurity.com/disable-windows-defender-in-powershell/
author: Florian Roth (Nextron Systems), John Lambert (idea), elhoim
date: 2021-07-14
modified: 2023-06-05
tags:
    - attack.defense-impairment
    - attack.t1685
logsource:
    category: process_creation
    product: windows
detection:
    selection_reg_add:
        CommandLine|contains|all:
            - 'reg'
            - 'add'
    selection_cli_reg_start:
        CommandLine|contains|all:
            - 'd 4'
            - 'v Start'
        CommandLine|contains:
            - '\AppIDSvc'
            - '\MsMpSvc'
            - '\NisSrv'
            - '\SecurityHealthService'
            - '\Sense'
            - '\UsoSvc'
            - '\WdBoot'
            - '\WdFilter'
            - '\WdNisDrv'
            - '\WdNisSvc'
            - '\WinDefend'
            - '\wscsvc'
            - '\wuauserv'
    condition: all of selection_*
falsepositives:
    - Unlikely
level: high

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_reg_add

selection_reg_add:
    CommandLine|contains|all:
        - 'reg'
        - 'add'

Stage 2: selection_cli_reg_start

selection_cli_reg_start:
    CommandLine|contains|all:
        - 'd 4'
        - 'v Start'
    CommandLine|contains:
        - '\AppIDSvc'
        - '\MsMpSvc'
        - '\NisSrv'
        - '\SecurityHealthService'
        - '\Sense'
        - '\UsoSvc'
        - '\WdBoot'
        - '\WdFilter'
        - '\WdNisDrv'
        - '\WdNisSvc'
        - '\WinDefend'
        - '\wscsvc'
        - '\wuauserv'

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
  • \AppIDSvc
  • \MsMpSvc
  • \NisSrv
  • \SecurityHealthService
  • \Sense
  • \UsoSvc
  • \WdBoot
  • \WdFilter
  • \WdNisDrv
  • \WdNisSvc
  • \WinDefend
  • \wscsvc
  • \wuauserv
  • add corpus 34 (sigma 26, splunk 4, chronicle 2, kusto 2)
  • d 4
  • reg corpus 7 (sigma 5, splunk 1, kusto 1)
  • v Start