Skip to content

AndreiMuntea/etwkm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

etwkm

A Windows kernel-mode ETW (Event Tracing for Windows) real-time consumer driver. Subscribes to manifest-based ETW providers from kernel mode, decodes event payloads using the binary instrumentation manifest (WEVT_TEMPLATE / CRIM), and prints decoded fields to the kernel debugger.

This is a research/fun project. In production, ETW events should be consumed from user mode via the documented ProcessTrace / OpenTrace APIs. Kernel-mode consumption requires using undocumented syscalls, spawning a minimal process for shared-memory buffer hosting, and manifest parsing.

What it does

  • Creates a minimal process to satisfy ETW's user-mode address validation (EtwpRealtimeConnect is doing some ProbeForWrite calls on buffer pointers)
  • Starts an ETW real-time trace session via ZwTraceControl
  • Enables the Microsoft-Windows-Kernel-Process and Microsoft-Windows-Threat-Intelligence providers
  • Spawns a consumer thread that drains event buffers
  • Loads provider schemas from DLL manifests at runtim
  • Prints every field to the kernel debugger via DbgPrintEx

Building

Requires:

MSBuild etwkm.vcxproj /p:Configuration=Debug /p:Platform=x64

Tested on

  • Windows 11 24H2 (build 26100) only

Disclaimer

This driver uses undocumented Windows internals that may change without notice. It is not intended for production use. The ETW buffer processing, CRIM manifest parsing were extracted from sechost.dll and tdh.dll (see source attributions in code comments).

For production ETW consumption, use the documented user-mode APIs:

License

see LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages