zeek/scripts/policy/protocols/ssl
Johanna Amann e14eddeb97 SSL Analyzer: track connection direction by messages
This PR changes the way in which the SSL analyzer tracks the direction
of connections. So far, the SSL analyzer assumed that the originator of
a connection would send the client hello (and other associated
client-side events), and that the responder would be the SSL servers.

In some circumstances this is not true, and the initiator of a
connection is the server, with the responder being the client. So far
this confused some of the internal statekeeping logic and could lead to
mis-parsing of extensions.

This reversal of roles can happen in DTLS, if a connection uses STUN -
and potentially in some StartTLS protocols.

This PR tracks the direction of a TLS connection using the hello
request, client hello and server hello handshake messages. Furthermore,
it changes the SSL events from providing is_orig to providing is_client,
where is_client is true for the client_side of a connection. Since the
argument positioning in the event has not changed, old scripts will
continue to work seamlessly - the new semantics are what everyone
writing SSL scripts will have expected in any case.

There is a new event that is raised when a connection is flipped. A
weird is raised if a flip happens repeatedly.

Addresses GH-2198.
2022-06-24 18:35:44 +01:00
..
decryption.zeek SSL Analyzer: track connection direction by messages 2022-06-24 18:35:44 +01:00
dpd-v2.sig Match DPD TLS signature on one-sided connections. 2022-02-01 16:51:21 +00:00
expiring-certs.zeek Remove trailing whitespace from script files 2021-10-20 09:57:09 -07:00
extract-certs-pem.zeek Deprecate extract-certs-pem.zeek and add log-certs-base64.zeek 2021-06-29 09:45:18 +01:00
heartbleed.zeek SSL Analyzer: track connection direction by messages 2022-06-24 18:35:44 +01:00
known-certs.zeek update uses of "when" in base scripts to include captures 2022-01-07 14:53:33 -08:00
log-certs-base64.zeek Deprecate extract-certs-pem.zeek and add log-certs-base64.zeek 2021-06-29 09:45:18 +01:00
log-hostcerts-only.zeek Change SSL and X.509 logging format 2021-06-29 09:26:43 +01:00
notary.zeek update uses of "when" in base scripts to include captures 2022-01-07 14:53:33 -08:00
ssl-log-ext.zeek SSL Analyzer: track connection direction by messages 2022-06-24 18:35:44 +01:00
validate-certs.zeek More bro-to-zeek renaming in scripts and other files 2019-05-16 02:36:41 -05:00
validate-ocsp.zeek SSL Analyzer: track connection direction by messages 2022-06-24 18:35:44 +01:00
validate-sct.zeek SSL Analyzer: track connection direction by messages 2022-06-24 18:35:44 +01:00
weak-keys.zeek Include certificate information in SSL::Weak_Key notice 2022-05-11 18:56:04 +01:00