Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick pull #11105 to 7.0 #11125

Merged
merged 1 commit into from
Mar 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ https://github.com/elastic/beats/compare/v7.0.0-beta1...master[Check the HEAD di

- Fix errors in filebeat Zeek dashboard and README files. Add notice.log support. {pull}10916[10916]
- Fix a bug when converting NetFlow fields to snake_case. {pull}10950[10950]
- Add on_failure handler for Zeek ingest pipelines. Fix one field name error for notice and add an additional test
case. {issue}11004[11004] {pull}11105[11105]

*Heartbeat*

Expand Down
10 changes: 8 additions & 2 deletions x-pack/filebeat/module/zeek/connection/ingest/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"script": {
"lang": "painless",
"source": "ctx.event.duration = (long)ctx.temp.duration * params.scale",
"source": "ctx.event.duration = Math.round(ctx.temp.duration * params.scale)",
"params": {
"scale": 1000000000
},
Expand Down Expand Up @@ -74,5 +74,11 @@
"target_field": "source.geo"
}
}
]
],
"on_failure" : [{
"set" : {
"field" : "error.message",
"value" : "{{ _ingest.on_failure_message }}"
}
}]
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"destination.port": 53,
"ecs.version": "1.0.0-beta2",
"event.dataset": "zeek.connection",
"event.duration": 0.0,
"event.duration": 76967000,
"event.id": "CAcJw21BbVedgFnYH3",
"event.module": "zeek",
"fileset.name": "connection",
Expand Down Expand Up @@ -48,7 +48,7 @@
"destination.port": 53,
"ecs.version": "1.0.0-beta2",
"event.dataset": "zeek.connection",
"event.duration": 0.0,
"event.duration": 76967000,
"event.id": "CAcJw21BbVedgFnYH4",
"event.module": "zeek",
"fileset.name": "connection",
Expand Down Expand Up @@ -87,7 +87,7 @@
"destination.port": 53,
"ecs.version": "1.0.0-beta2",
"event.dataset": "zeek.connection",
"event.duration": 0.0,
"event.duration": 76967000,
"event.id": "CAcJw21BbVedgFnYH5",
"event.module": "zeek",
"fileset.name": "connection",
Expand Down
8 changes: 7 additions & 1 deletion x-pack/filebeat/module/zeek/dns/ingest/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,11 @@
"target_field": "source.geo"
}
}
]
],
"on_failure" : [{
"set" : {
"field" : "error.message",
"value" : "{{ _ingest.on_failure_message }}"
}
}]
}
8 changes: 7 additions & 1 deletion x-pack/filebeat/module/zeek/files/ingest/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,11 @@
"if": "ctx.zeek.session_id != null"
}
}
]
],
"on_failure" : [{
"set" : {
"field" : "error.message",
"value" : "{{ _ingest.on_failure_message }}"
}
}]
}
10 changes: 8 additions & 2 deletions x-pack/filebeat/module/zeek/http/ingest/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,11 @@
"ignore_missing": true
}
}
]
}
],
"on_failure" : [{
"set" : {
"field" : "error.message",
"value" : "{{ _ingest.on_failure_message }}"
}
}]
}
2 changes: 1 addition & 1 deletion x-pack/filebeat/module/zeek/notice/config/notice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ processors:
- from: "zeek.notice.src"
to: "source.address"

- from: "zeek.notice.dest"
- from: "zeek.notice.dst"
to: "destination.address"

- from: "zeek.notice.uid"
Expand Down
10 changes: 8 additions & 2 deletions x-pack/filebeat/module/zeek/notice/ingest/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,11 @@
"ignore_missing": true
}
}
]
}
],
"on_failure" : [{
"set" : {
"field" : "error.message",
"value" : "{{ _ingest.on_failure_message }}"
}
}]
}
1 change: 1 addition & 0 deletions x-pack/filebeat/module/zeek/notice/test/notice-json.log
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{"ts":1320435875.879278,"note":"SSH::Password_Guessing","msg":"172.16.238.1 appears to be guessing SSH passwords (seen in 30 connections).","sub":"Sampled servers: 172.16.238.136, 172.16.238.136, 172.16.238.136, 172.16.238.136, 172.16.238.136","src":"172.16.238.1","peer_descr":"bro","actions":["Notice::ACTION_LOG"],"suppress_for":3600.0,"dropped":false}
{"ts":1551393388.426472,"note":"Scan::Port_Scan","msg":"8.42.77.171 scanned at least 15 unique ports of host 207.154.238.205 in 0m0s","sub":"remote","src":"8.42.77.171","dst":"207.154.238.205","peer_descr":"bro","actions":["Notice::ACTION_LOG"],"suppress_for":3600.0,"dropped":false}
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,42 @@
"zeek.notice.peer_descr": "bro",
"zeek.notice.sub": "Sampled servers: 172.16.238.136, 172.16.238.136, 172.16.238.136, 172.16.238.136, 172.16.238.136",
"zeek.notice.suppress_for": 3600
},
{
"@timestamp": 1551393388000,
"destination.address": "207.154.238.205",
"destination.geo.city_name": "New York",
"destination.geo.continent_name": "North America",
"destination.geo.country_iso_code": "US",
"destination.geo.location.lat": 40.7214,
"destination.geo.location.lon": -74.0052,
"destination.geo.region_iso_code": "US-NY",
"destination.geo.region_name": "New York",
"destination.ip": "207.154.238.205",
"ecs.version": "1.0.0-beta2",
"event.dataset": "zeek.notice",
"event.module": "zeek",
"fileset.name": "notice",
"input.type": "log",
"log.offset": 357,
"service.type": "zeek",
"source.address": "8.42.77.171",
"source.geo.city_name": "Longmont",
"source.geo.continent_name": "North America",
"source.geo.country_iso_code": "US",
"source.geo.location.lat": 40.1791,
"source.geo.location.lon": -105.1986,
"source.geo.region_iso_code": "US-CO",
"source.geo.region_name": "Colorado",
"source.ip": "8.42.77.171",
"tags": [
"zeek.notice"
],
"zeek.notice.dropped": false,
"zeek.notice.msg": "8.42.77.171 scanned at least 15 unique ports of host 207.154.238.205 in 0m0s",
"zeek.notice.note": "Scan::Port_Scan",
"zeek.notice.peer_descr": "bro",
"zeek.notice.sub": "remote",
"zeek.notice.suppress_for": 3600
}
]
8 changes: 7 additions & 1 deletion x-pack/filebeat/module/zeek/ssl/ingest/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,11 @@
"target_field": "source.geo"
}
}
]
],
"on_failure" : [{
"set" : {
"field" : "error.message",
"value" : "{{ _ingest.on_failure_message }}"
}
}]
}