Created
October 3, 2019 04:20
-
-
Save Cyb3rWard0g/3afcbcbe4974ab127fb437fb3e16d6d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HELK winevent-silkservice filter conf file | |
# HELK build Stage: Alpha | |
# Author: Roberto Rodriguez (@Cyb3rWard0g) | |
# License: GPL-3.0 | |
# Reference: https://github.com/Cyb3rWard0g/HELK/blob/master/docker/helk-logstash/pipeline/1010-winevent-winlogbeats-filter.conf | |
filter { | |
if [log_name] == "SilkService-Log"{ | |
mutate { add_field => { "z_logstash_pipeline" => "1536" } } | |
json { | |
source => "param1" | |
} | |
ruby { | |
code => " | |
xmleventdatafields = event.get('XmlEventData') | |
# Sometimes does not exist, so check that first -- then move the nests | |
if !xmleventdatafields.nil? | |
xmleventdatafields.each {|k, v| | |
if xmleventdatafields.to_s != '(NULL)' | |
event.set(k, v) | |
end | |
} | |
end | |
# Finally remove the nest completely | |
event.remove('XmlEventData') | |
event.remove('param1') | |
" | |
tag_on_exception => "ruby_exception_silkservice_cleanup" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment