Detection rules › Sigma

Important Windows Service Terminated With Error

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

Detects important or interesting Windows services that got terminated for whatever reason

MITRE ATT&CK coverage

TacticTechniques
StealthNo specific technique

Event coverage

Rule body yaml

title: Important Windows Service Terminated With Error
id: d6b5520d-3934-48b4-928c-2aa3f92d6963
related:
    - id: acfa2210-0d71-4eeb-b477-afab494d596c
      type: similar
status: test
description: Detects important or interesting Windows services that got terminated for whatever reason
references:
    - https://www.microsoft.com/en-us/security/blog/2023/04/11/guidance-for-investigating-attacks-using-cve-2022-21894-the-blacklotus-campaign/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-04-14
tags:
    - attack.stealth
logsource:
    product: windows
    service: system
detection:
    selection_eid:
        Provider_Name: 'Service Control Manager'
        EventID: 7023 # The X Service service terminated with the following error
    selection_name:
        - param1|contains:
              # Note that these names are "Display Names" and are language specific. If you're using a non-english system these can and will be different
              - ' Antivirus'
              - ' Firewall'
              - 'Application Guard'
              - 'BitLocker Drive Encryption Service'
              - 'Encrypting File System'
              - 'Microsoft Defender'
              - 'Threat Protection'
              - 'Windows Event Log'
        # Use this If you collect the binary value provided from this event, which is the wide hex encoded value of the service name.
        - Binary|contains:
              - '770069006e0064006500660065006e006400' # windefend (Microsoft Defender Antivirus Service)
              - '4500760065006e0074004c006f006700' # EventLog
              - '6d0070007300730076006300' # mpssvc (Windows Defender Firewall)
              - '530065006e0073006500' # Sense (Windows Defender Advanced Threat Protection Service)
              - '450046005300' # EFS (Encrypting File System)
              - '420044004500530056004300' # BDESVC (BitLocker Drive Encryption Service)
    condition: all of selection_*
falsepositives:
    - Rare false positives could occur since service termination could happen due to multiple reasons
level: high

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_eid

selection_eid:
    Provider_Name: 'Service Control Manager'
    EventID: 7023

Stage 2: selection_name

selection_name:
    - param1|contains:
          - ' Antivirus'
          - ' Firewall'
          - 'Application Guard'
          - 'BitLocker Drive Encryption Service'
          - 'Encrypting File System'
          - 'Microsoft Defender'
          - 'Threat Protection'
          - 'Windows Event Log'
    - Binary|contains:
          - '770069006e0064006500660065006e006400'
          - '4500760065006e0074004c006f006700'
          - '6d0070007300730076006300'
          - '530065006e0073006500'
          - '450046005300'
          - '420044004500530056004300'

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
Binarymatch
  • 420044004500530056004300
  • 450046005300
  • 4500760065006e0074004c006f006700
  • 530065006e0073006500
  • 6d0070007300730076006300
  • 770069006e0064006500660065006e006400
Provider_Nameeq
  • Service Control Manager corpus 50 (sigma 50)
param1match
  • Antivirus
  • Firewall
  • Application Guard
  • BitLocker Drive Encryption Service
  • Encrypting File System
  • Microsoft Defender
  • Threat Protection
  • Windows Event Log