Detection rules › Sigma

Suspicious Windows Trace ETW Session Tamper Via Logman.EXE

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

Detects the execution of "logman" utility in order to disable or delete Windows trace sessions

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Suspicious Windows Trace ETW Session Tamper Via Logman.EXE
id: cd1f961e-0b96-436b-b7c6-38da4583ec00
status: test
description: Detects the execution of "logman" utility in order to disable or delete Windows trace sessions
references:
    - https://twitter.com/0gtweet/status/1359039665232306183?s=21
    - https://ss64.com/nt/logman.html
author: Florian Roth (Nextron Systems)
date: 2021-02-11
modified: 2023-02-21
tags:
    - attack.defense-impairment
    - attack.t1685
    - attack.t1685.005
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\logman.exe'
        - OriginalFileName: 'Logman.exe'
    selection_action:
        CommandLine|contains:
            - 'stop '
            - 'delete '
    selection_service:
        CommandLine|contains:
            - 'Circular Kernel Context Logger'
            - 'EventLog-' # Cover multiple traces starting with EventLog-*
            - 'SYSMON TRACE'
            - 'SysmonDnsEtwSession'
    condition: all of selection*
falsepositives:
    - Legitimate deactivation by administrative staff
    - Installer tools that disable services, e.g. before log collection agent installation
level: high

Stages and Predicates

Stage 0: condition

all of selection*

Stage 1: selection_img

selection_img:
    - Image|endswith: '\logman.exe'
    - OriginalFileName: 'Logman.exe'

Stage 2: selection_action

selection_action:
    CommandLine|contains:
        - 'stop '
        - 'delete '

Stage 3: selection_service

selection_service:
    CommandLine|contains:
        - 'Circular Kernel Context Logger'
        - 'EventLog-'
        - 'SYSMON TRACE'
        - 'SysmonDnsEtwSession'

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
  • Circular Kernel Context Logger
  • EventLog-
  • SYSMON TRACE
  • SysmonDnsEtwSession
  • delete corpus 4 (sigma 4)
  • stop
Imageends_with
  • \logman.exe
OriginalFileNameeq
  • Logman.exe corpus 2 (sigma 1, elastic 1)