Created
October 5, 2019 05:05
-
-
Save Cyb3rWard0g/f7434baa0a408d6cb96dc889a47ee018 to your computer and use it in GitHub Desktop.
This file contains 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