zeek/scripts/base/protocols
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
..
conn fix base scripts to include mandatory fields in record constructors 2022-02-28 15:33:46 -08:00
dce-rpc Remove trailing whitespace from script files 2021-10-20 09:57:09 -07:00
dhcp tweaks to base scripts revealed by switch to expression-based initialization 2022-03-23 15:36:35 -07:00
dnp3 Support for log filter policy hooks 2020-09-30 12:32:45 -07:00
dns Remove trailing whitespace from script files 2021-10-20 09:57:09 -07:00
ftp deprecation messages for unused base script functions 2022-05-27 14:36:30 -07:00
http Correct origin documentation of the version field in the HTTP log. 2022-04-04 14:22:58 -07:00
imap Merge remote-tracking branch 'origin/topic/seth/zeek_init' 2019-04-19 11:24:29 -07:00
irc annotate base scripts with &is_used as needed 2022-05-26 17:39:17 -07:00
krb Remove trailing whitespace from script files 2021-10-20 09:57:09 -07:00
modbus Support for log filter policy hooks 2020-09-30 12:32:45 -07:00
mqtt Disable MQTT by default 2019-08-05 17:04:39 -07:00
mysql Support for log filter policy hooks 2020-09-30 12:32:45 -07:00
ntlm Remove trailing whitespace from script files 2021-10-20 09:57:09 -07:00
ntp &is_set => &is_assigned 2021-02-04 12:18:46 -08:00
pop3 Rename all scripts to have ".zeek" file extension 2019-04-11 21:12:40 -05:00
radius deprecation messages for unused base script functions 2022-05-27 14:36:30 -07:00
rdp Add analyzer_confirmation and analyzer_violation events 2021-11-23 19:36:50 -07:00
rfb Support for log filter policy hooks 2020-09-30 12:32:45 -07:00
sip Support for log filter policy hooks 2020-09-30 12:32:45 -07:00
smb deprecation messages for unused base script functions 2022-05-27 14:36:30 -07:00
smtp GH-1589: Avoid extracting IP-like strings from SMTP headers 2021-09-03 17:35:10 +00:00
snmp Support for log filter policy hooks 2020-09-30 12:32:45 -07:00
socks Support for log filter policy hooks 2020-09-30 12:32:45 -07:00
ssh Add analyzer_confirmation and analyzer_violation events 2021-11-23 19:36:50 -07:00
ssl SSL Analyzer: track connection direction by messages 2022-06-24 18:35:44 +01:00
syslog Remove trailing whitespace from script files 2021-10-20 09:57:09 -07:00
tunnels Add Teredo packet analyzer, disable old analyzer 2021-11-23 19:36:50 -07:00
xmpp Merge remote-tracking branch 'origin/topic/seth/zeek_init' 2019-04-19 11:24:29 -07:00