PowerShell Disable or Remove ETW Trace Sessions

Flags PowerShell commands that remove or disable ETW trace providers to impair Windows telemetry.

FreeReviewedSigma · High · v4
Product
windows
Category
ps_script
Author
Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2022-06-28
Updated
2026-10-13
title: PowerShell Disable or Remove ETW Trace Sessions
id: a77a4d4e-e46e-42af-b4b8-1590fe04ce8f
related:
  - id: a238b5d0-ce2d-4414-a676-7a531b3d13d6
    type: derived
  - id: 115fdba9-f017-42e6-84cf-d5573bf2ddf8
    type: derived
status: test
description: This rule flags PowerShell script block content that removes ETW trace providers or modifies a provider’s Enable property to disable tracing. Such activity can reduce or impair visibility into system and process activity, which attackers may use to evade monitoring. It relies on Script Block Logging telemetry capturing PowerShell cmdlet usage in script block text, matching specific ETW-related cmdlet strings and provider enable values.
references:
  - https://medium.com/palantir/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_script/posh_ps_etw_trace_evasion.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2022-06-28
modified: 2026-10-12
tags:
  - attack.stealth
  - attack.defense-impairment
  - attack.t1070
  - attack.t1685
  - car.2016-04-002
logsource:
  product: windows
  category: ps_script
  definition: "Requirements: Script Block Logging must be enabled"
detection:
  selection_pwsh_remove:
    ScriptBlockText|contains: "Remove-EtwTraceProvider "
  selection_pwsh_set_hex:
    ScriptBlockText|contains|all:
      - "Set-EtwTraceProvider "
      - "0x11"
  selection_pwsh_set_dec:
    - ScriptBlockText|contains|all:
        - "Set-EtwTraceProvider "
        - " 17"
    - ScriptBlockText|contains|all:
        - "Set-EtwTraceProvider "
        - “'17'”
    - ScriptBlockText|contains|all:
        - "Set-EtwTraceProvider "
        - ”17”
  condition: 1 of selection_*
falsepositives:
  - Unknown
level: high
license: DRL-1.1