SilkETW: Because Free Telemetry is … Free!
In the following example, we will collect process event data from the Kernel provider and use image loads to identify Mimikatz execution. We can collect the required data with this command:
With data in hand it is easy to sort, grep and filter for the properties we are interested in (Figure 2).
Figure 2: PowerShell event filtering
SilkETW has a number of command line flags that allow the user to restrict the events that are captured. These include the event name, the process ID, the process name, and the opcode. To further enhance this capability, Yara support is included to filter or tag trace events. While Yara has immediate defensive connotations, the reader is reminded that Yara rules are equally useful to augment research capabilities.
We can start collecting .NET ETW data with the following command (note here the "-yo" option indicating that we will only write the Yara matches to file!):
We can see at runtime that our Yara rule was hit (Figure 3).
Figure 3: Yara rule hit
Note also that we are only capturing a subset of the "Microsoft-Windows-DotNETRuntime" events (0x2038), specifically: JitKeyword, InteropKeyword, LoaderKeyword and NGenKeyword.
As outlined in the introduction, SilkETW is currently a research focused data-collection tool with robust yet rudimentary capabilities. Upcoming changes for SilkETW include, but are not limited to:
- Offer users the option to write trace data to disk as *.etl files.
- Create a separate instance of SilkETW that operates in a headless mode as a service and reads a configuration file.
- Take input from the community on any features that would be beneficial to ETW research.
SilkETW is currently available for download on GitHub.
Special thanks to the whole Advanced Practices team – and Nick Carr in particular – for their indulgence of my antics! Thanks also to Stephen Davis, Anthony Berglund and Kevin Boyd of the FireEye Labs and Data Science teams for their help on reviewing this project and their prior work on pywintrace. If you are looking for Python ETW bindings you can use programmatically, definitely check out that project.