Cherry-pick #10006 to 6.x: Populate more ECS fields in the Suricata module#10537
Merged
adriansr merged 2 commits intoelastic:6.xfrom Feb 5, 2019
Merged
Cherry-pick #10006 to 6.x: Populate more ECS fields in the Suricata module#10537adriansr merged 2 commits intoelastic:6.xfrom
adriansr merged 2 commits intoelastic:6.xfrom
Conversation
* Populate more ECS fields in the Suricata module
A few more ECS fields are populated by the ingest pipeline that enriches
Suricata's eve.json events.
Additions:
- http.request.referrer (from suricata.eve.http.http_refer)
- event.action (from suricata.eve.alert.category)
describes the action that caused the event.
Examples: "Attempted Denial of Service", "Successful Administrator Privilege Gain"
- event.outcome (from suricata.eve.alert.action)
Possible values: "allowed", "blocked"
- event.severity (from suricata.eve.alert.severity)
Possible values: 1, 2 or 3.
- network.transport (from suricata.eve.proto)
Examples: "tcp", "udp", "ipv6-icmp"
* Use message for suricata.eve.alert.category
Instead of event.action, which is expected to have a fixed set of
enumeration values.
* Populate destination.domain
When http.hostname is present.
* Populate event.{start,end,duration}
* populate network.protocol
* url.hostname is url.domain
* Populate url.path, url.fragment, url.query
From http.url
* Lowercase http request method
* Source/Destination and aggregated counters
This assumes client=source server=destination.
Populates
- source.{packets|bytes}
- destination.{packets|bytes}
- network.{packets|bytes}
* Updated golden files
* Populate ECS field `http.response.body.bytes`
* Use grok pattern to parse url fields
Replace ugly painless code.
* Avoid pairs of convert/lowercase
Lowercase processor can have a target field so its not neccesary to copy
the field in a previous step.
* Cleanup painless script
* Fix golden data
* Fix golden data (2)
* Copy timestamp to event.end instead of parsing date again
(cherry picked from commit 184149f4a18b4162b0d6c89adba3bb924a2db0b8)
Contributor
Author
|
For those reviewing the golden data, I've diff'ed it with a script: eve-alerts.log-expected.json: eve-small.log-expected.json: -: removed key |
tsg
approved these changes
Feb 4, 2019
andrewkroh
approved these changes
Feb 4, 2019
Member
|
Shouldn't this have a changelog? (I think it was released already) |
webmat
approved these changes
Feb 5, 2019
Contributor
webmat
left a comment
There was a problem hiding this comment.
Missing a changelog. Other than that, LGTM 💯
Contributor
Author
|
Will open a separate PR with the missing changelog |
Contributor
Author
|
jenkins, test this |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of PR #10006 to 6.x branch. Original message:
A few more ECS fields are populated by the ingest pipeline that enriches Suricata's eve.json events.
Additions:
http.request.referrer (from suricata.eve.http.http_refer)
event.action (from suricata.eve.alert.category)
describes the action that caused the event.
Examples: "Attempted Denial of Service", "Successful Administrator Privilege Gain"
event.outcome (from suricata.eve.alert.action)
Possible values: "allowed", "blocked"
event.severity (from suricata.eve.alert.severity)
Possible values: 1, 2 or 3.
network.transport (from suricata.eve.proto)
Examples: "tcp", "udp", "ipv6-icmp"