Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ETWhat is a Windows utility that determines whether Event Tracing for Windows (ETW) providers operate in kernel mode or user mode.

License

Notifications You must be signed in to change notification settings

olafhartong/ETWhat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ETWhat - ETW Provider Type Detector

ETWhat is a Windows utility that determines whether Event Tracing for Windows (ETW) providers operate in kernel mode or user mode. It analyzes the actual system registration data to make accurate determinations without relying on hardcoded lists or heuristics.

Features

  • Single Provider Analysis: Check individual ETW providers by GUID
  • Batch Processing: Process multiple providers from JSON files
  • Table Output: Clean, formatted table display with detection methods
  • OS-Based Detection: Uses actual Windows registry and configuration data
  • Flexible GUID Input: Accepts GUIDs with or without curly braces
  • Detection Method Tracking: Shows exactly how each determination was made

Installation

Prerequisites

  • Windows operating system
  • Go 1.19 or later

Build from Source

git clone <repository-url>
cd ETWhat
go mod init ETWhat
go get golang.org/x/sys/windows
go build -o ETWhat.exe

Usage

Single Provider Query

# With curly braces
.\ETWhat.exe "{F4E1897C-BB5D-5668-F1D8-040F4D8DD344}"

# Without curly braces  
.\ETWhat.exe "F4E1897C-BB5D-5668-F1D8-040F4D8DD344"

Batch Processing from JSON

.\ETWhat.exe -json providers.json

JSON Format

[
  {
    "providerGuid": "f4e1897c-bb5d-5668-f1d8-040f4d8dd344",
    "name": "Microsoft-Windows-Threat-Intelligence"
  },
  {
    "providerGuid": "{2f07e2ee-15db-40f1-90ef-9d7ba282188a}",
    "name": "Microsoft-Windows-TCPIP"
  }
]

Sample Output

Single Provider

Provider GUID: {F4E1897C-BB5D-5668-F1D8-040F4D8DD344}
Provider Name: Microsoft-Windows-Threat-Intelligence
Schema Source: XML (0)
Detection Method: MANIFEST_KERNEL
Provider Type: KERNEL MODE

Batch Processing

GUID                                    NAME                                    TYPE    SCHEMA  METHOD
----                                    ----                                    ----    ------  ------
{F4E1897C-BB5D-5668-F1D8-040F4D8DD344}  Microsoft-Windows-Threat-Intelligence  KERNEL  XML     MANIFEST_KERNEL
{16C6501A-FF2D-46EA-868D-8F96CB0CB52D}  Microsoft-Windows-SEC                   KERNEL  XML     KERNEL_AUTOLOG
{2F07E2EE-15DB-40F1-90EF-9D7BA282188A}  Microsoft-Windows-TCPIP                 USER    XML     MANIFEST_USER
{1C95126E-7EEA-49A9-A3FE-A378B03DDB4D}  Microsoft-Windows-DNS-Client            USER    XML     MANIFEST_USER

Summary: 4 total providers (2 kernel, 2 user)

How It Works

ETWhat uses a multi-layered approach to determine provider types by analyzing actual Windows system configuration:

Detection Methods

1. Autologger Registration Analysis (KERNEL_AUTOLOG / USER_AUTOLOG)

  • Location: HKLM\SYSTEM\CurrentControlSet\Control\WMI\Autologger\*
  • Process: Dynamically enumerates all autologger sessions and checks if the provider is registered
  • Kernel Sessions: EventLog-System, EventLog-Security, Kernel Logger, NT Kernel Logger, etc.
  • User Sessions: EventLog-Application, ReadyBoot, etc.
  • Reliability: Very High - Direct indication of intended usage

2. Event Log Source Registration (EVENTLOG_SYS / EVENTLOG_APP)

  • Location: HKLM\SYSTEM\CurrentControlSet\Services\EventLog\*
  • Process: Checks if provider is registered as an event source
  • System/Security Logs: Indicates kernel mode operation
  • Application Log: Indicates user mode operation
  • Reliability: High - Shows where events are logged

3. Manifest-Based Analysis (MANIFEST_KERNEL / MANIFEST_USER)

  • Location: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\*
  • Process: Examines provider manifest registration and resource files
  • Kernel Indicators:
    • Resource files in system32, drivers directories
    • References to ntoskrnl, win32k, fltmgr
    • Provider names containing "kernel", "security-auditing", "threat-intelligence"
  • Reliability: Medium-High - Based on implementation location

4. WMI Provider Registration (WMI_PROVIDER)

  • Location: HKLM\SOFTWARE\Microsoft\WBEM\Providers\*
  • Process: Checks WMI provider and CLSID registrations
  • Indication: Typically user mode
  • Reliability: Medium - WMI can be used by both modes

Detection Flow

1. Query TdhEnumerateProviders() → Get provider name and schema source
2. Check Autologger Registration → Most reliable method
3. Check Event Log Registration → High confidence indicator  
4. Check Manifest Registration → Analyze resource files and names
5. Check WMI Registration → Fallback method
6. Default to USER mode → Conservative approach

Technical Implementation

Registry Analysis

  • Uses golang.org/x/sys/windows/registry for safe registry access
  • Dynamically discovers autologger sessions rather than hardcoding
  • Handles both GUID and provider name-based registrations

ETW API Integration

  • Uses TdhEnumerateProviders() from tdh.dll to get official provider information
  • Parses provider enumeration structures to extract names and schema sources
  • Validates provider existence before analysis

Error Handling

  • Gracefully handles missing providers in JSON batch mode
  • Provides detailed error messages for invalid GUIDs
  • Continues processing on individual failures

Common Provider Types

Kernel Mode Providers

  • Security Auditing: Microsoft-Windows-Security-Auditing
  • Threat Intelligence: Microsoft-Windows-Threat-Intelligence
  • Filter Manager: Microsoft-Windows-FilterManager
  • Win32k: Microsoft-Windows-Win32k
  • Kernel APIs: Microsoft-Windows-Kernel-*

User Mode Providers

  • Network Services: Microsoft-Windows-TCPIP, Microsoft-Windows-DNS-Client
  • Applications: Microsoft-Windows-DotNETRuntime
  • User Services: Microsoft-Windows-PowerShell

Limitations

  • Requires Windows operating system
  • Some providers may not be registered if not currently active
  • Detection accuracy depends on proper system configuration
  • May require elevated privileges for some registry access

About

ETWhat is a Windows utility that determines whether Event Tracing for Windows (ETW) providers operate in kernel mode or user mode.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages