Event Trace Log file reader in pure Python
etl-parser has no system dependencies, and will work well on both Windows and Linux.
ETL and why is it a pain to work with? Consider
ETL as a container, like
AVI is for video files. Reading
ETL is similarly frustrating as reading an
AVI file without the right codec.
etl-parser tries to solve this problem by including parsers for the following well known log formats:
- ETW manifest base provider
- MOF for kernel log
etl-parser offers two scripts. The first script,
etl2xml transforms all known ETL events into XML:
etl2xml -i example.etl -o example.xml
The second script,
etl2pcap transforms network captures created through
netsh into the
pcap file format:
netsh start trace capture=yesnetsh stop traceetl2pcap -i NetTrace.etl -o NetTrace.pcap
You can also use
etl-parser as a library:
from etl.etl import IEtlFileObserver, build_from_streamfrom etl.system import SystemTraceRecordfrom etl.perf import PerfInfofrom etl.event import Eventfrom etl.trace import Tracefrom etl.wintrace import WinTraceclass EtlFileLogger(IEtlFileObserver): def on_system_trace(self, event: SystemTraceRecord): """Mof kernel message with Process Id and Thread Id""" mof = event.get_mof() # Invoke MOF parser def on_perfinfo_trace(self, event: PerfInfo): """Mof kernel message with timestamp""" mof = event.get_mof() # Invoke MOF parser def on_trace_record(self, event: Trace): """unknown""" def on_event_record(self, event: Event): """ETW event this is what you search""" # Choose the "parse_" function which corresponds to your event message = event.parse_tracelogging() # Invoke TraceLogging parser me ssage = event.parse_etw() # Invoke Manifest based parser def on_win_trace(self, event: WinTrace): """unknown""" etw = event.parse_etw()with open("example.etl", "rb") as etl_file: etl_reader = build_from_stream(etl_file.read()) etl_reader.parse(EtlFileLogger())
etl-parser is available from pip:
pip install etl-parser
Alternatively, you can install
git clone https://github.com/airbus-cert/etl-parser.gitcd etl-parserpip install -e .
Missing a parser?
If you encounter a parsing error, please open an issue on the Airbus CERT GitHub repository.
Why an ETL Parser?
EVTX log format is fairly well documented, with lots of libraries and tools available today. This is not true for
ETL: at time of development, there is no significant open-source project that we know of and the
ETL format is not well documented.
ETL is massively used by Windows system programmers to log useful artifacts:
A lot of new APIs such as
WPP are based on ETW. These APIs are used extensively by Microsoft developers for Windows.
Tracelogging is addressed by
WPP will be addressed in a future release.
Microsoft offers a lot of consumers that create ETL traces, such as
We believe it is a gold mine for DFIR analysts.
- This project is under copyright of the Airbus Computer Emergency Response Team (CERT) and distributed under the Apache 2.0 license
- Geoff Chappel for all information on his blog
etl-parser is released under the Apache 2.0 license.