Abusing logging and tracing to steal credentials and access tokens
For debugging and monitoring purposes, applications and services emit logs and traces. This enables privileged users on the machine to get more insights into the inner workings of an application during runtime. Windows has a powerful tracing infrastructure called Event Tracing for Windows (ETW). Tracing is often a form of logging that is more technical in nature compared to functional logging. It's often used by engineers to debug the execution flow of a program or to perform performance analysis.
There are tools out of the box in Windows to interact with ETW, and they allow us to start traces, collect data, and stop them, such as wevtutil
and logman
.
Let's dive into a detailed example using logman
, which allows us to manage event tracing sessions. Run the following command to see what providers are available:
logman query providers
This lists all the providers that can emit events. On my machine...