-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Update Suricata for ECS DNS #13329
Update Suricata for ECS DNS #13329
Conversation
771af5a
to
4b71724
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far!
I agree with populating event.end
strictly with flow.end
for flow events.
Can't wait to see the final version!
Have one important comment on DNS v1 answers, afaict it's a non-issue.
return; | ||
} | ||
evt.Put("dns.answers", [answer]); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's a DNS version 1 event, this will continue to create a single event per DNS answer still, correct?
I guess for backwards compatibility for users that use Suricata as a source, we don't really have a choice to keep it like that. But the semantics for DNS answers will not match ECS, therefore I'm not sure we'll be able to depend on Suricata DNS version 1 as a source for DNS answers.
I think for now SIEM only looks at queries, however. Correct?
cc @cwurm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SIEM app has two DNS queries:
Top DNS domains
table: Terms agg ondns.question.etld_plus_one
, sub-aggs ondns.question.name
,source.bytes
, anddestination.bytes
DNS queries
KPI: Checks ifdns.question.name
exists among other things.
Since there is no filter on just queries or just answers I think we will miscount if there are several documents (for query and answer or one per answer).
@@ -0,0 +1,231 @@ | |||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a straight JSON to YAML conversion, or were there other changes to this pipeline?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a lowercase
filter for the network.transport
. And made the aforementioned event.end
change.
"ttl": 299, | ||
"type": "A" | ||
} | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
This updates the Suricata module to populate the ECS DNS fields. It does not remove existing `suricata.eve.dns.*` fields to preserve backward compatibility. This also enhances the pipeline to handle the Suricata detailed DNS format (aka version 2). It requires that when using EVE DNS `version: 2` that `formats: [detailed]` is used (`grouped` can be enabled too but it is ignored). `log.original` is now populated with the original JSON log data. `source.address` and `destination.address` are now populated. `event.end` is populated with the `flow.end` value now and hence some events that did not contain `flow.end` no longer have an `event.end`. Relates elastic#13320
4b71724
to
0f55384
Compare
Pinging @elastic/siem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, once Changelog is rebased
Travis flailing with the exact same error as #13324, so pretty sure it's unrelated:
|
This updates the Suricata module to populate the ECS DNS fields. It does not remove existing
suricata.eve.dns.*
fields to preserve backward compatibility.This also enhances the pipeline to handle the Suricata detailed DNS format (aka version 2). It requires that when using EVE DNS
version: 2
thatformats: [detailed]
is used (grouped
can be enabled too but it is ignored).log.original
is now populated with the original JSON log data.source.address
anddestination.address
are now populated.event.end
is populated with theflow.end
value now and hence some events that did not containflow.end
no longer have anevent.end
.Relates #13320
Needs: