Skip to content

Instantly share code, notes, and snippets.

@crisroura
Created June 12, 2014 11:11
Show Gist options
  • Save crisroura/da6d8931992e76f02a17 to your computer and use it in GitHub Desktop.
Save crisroura/da6d8931992e76f02a17 to your computer and use it in GitHub Desktop.
How to index Windows EventLogs with Splunk
1. Parse evtx logs with evtxdump.py (https://github.com/williballenthin/python-evtx)
2. Create custom Splunk sourcetype "winevtx":
Edit $SPLUNK_HOME/etc/system/local/props.conf
[winevtx]
NO_BINARY_CHECK = 1
SHOULD_LINEMERGE = true
BREAK_ONLY_BEFORE = ^\<Event xmlns=
TIME_PREFIX = SystemTime=
REPORT-extract-data = extract_data
KV_MODE = xml
Edit $SPLUNK_HOME/etc/system/local/transforms.conf
[extract_data]
REGEX = \<Data Name="(?<_KEY_1>[^\>]*)"\>(?<_VAL_1>[^\<]+)
3. Index XML EventLog files assigning this new sourcetype "winevtx".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment