Merge pull request #70 from defensivedepth/osquery

Osquery - tweaks to initial config
This commit is contained in:
Mike Reeves
2019-01-02 09:54:19 -05:00
committed by GitHub
4 changed files with 11 additions and 10 deletions

View File

@@ -107,3 +107,5 @@
/usr/share/logstash/pipeline.dynamic/9500_output_beats.conf /usr/share/logstash/pipeline.dynamic/9500_output_beats.conf
/usr/share/logstash/pipeline.dynamic/9600_output_ossec.conf /usr/share/logstash/pipeline.dynamic/9600_output_ossec.conf
/usr/share/logstash/pipeline.dynamic/9998_output_test_data.conf /usr/share/logstash/pipeline.dynamic/9998_output_test_data.conf
/usr/share/logstash/pipeline.dynamic/7100_osquery_wel.conf
/usr/share/logstash/pipeline.dynamic/9100_output_osquery.conf

View File

@@ -25,7 +25,7 @@ filter {
add_field => { "syslog-host_from" => "%{[beat][name]}" } add_field => { "syslog-host_from" => "%{[beat][name]}" }
remove_field => [ "beat", "prospector", "input", "offset" ] remove_field => [ "beat", "prospector", "input", "offset" ]
} }
}
if [type] == "osquery" { if [type] == "osquery" {
mutate { mutate {
remove_tag => ["beat"] remove_tag => ["beat"]
@@ -35,6 +35,5 @@ filter {
source => "message" source => "message"
target => "osquery" target => "osquery"
} }
} }
} }

View File

@@ -1,23 +1,23 @@
# Author: Josh Brower # Author: Josh Brower
# Last Update: 12/28/2018 # Last Update: 12/28/2018
# If log is tagged osquery and there is an eventid column, then cleanup and parse out the EventData column # If log is tagged osquery and there is an eventid column - then cleanup and parse out the EventData column
filter { filter {
if "osquery" in [tags] and [osquery][columns][eventid] { if "osquery" in [tags] and [osquery][columns][eventid] {
mutate { mutate {
gsub => ["[osquery][columns][data]", "\\x0A", ""] gsub => ["[osquery][columns][data]", "\\x0A", ""]
} }
json { json {
source => "[osquery][columns][data]" source => "[osquery][columns][data]"
target => "[osquery][columns][data]" target => "[osquery][columns][data]"
} }
mutate { mutate {
merge => { "[osquery][columns]" => "[osquery][columns][data]" } merge => { "[osquery][columns]" => "[osquery][columns][data]" }
remove_field => ["[osquery][columns][data]"] remove_field => ["[osquery][columns][data]"]
} }
} }
} }

View File

@@ -4,7 +4,7 @@
{%- set ES = salt['pillar.get']('node:mainip', '') -%} {%- set ES = salt['pillar.get']('node:mainip', '') -%}
{%- endif %} {%- endif %}
# Author: Josh Brower # Author: Josh Brower
# Last Update: 12/28/2018 # Last Update: 12/29/2018
# Output to ES for osquery tagged logs # Output to ES for osquery tagged logs