zeek/testing/btest/scripts/base/protocols
Arne Welzel abb7f9a509 Introduce global disabling_analyzer() hook to veto disable_analyzer()
This hook can be used to coordinate disabling an analyzer for a given
connection. The contract is simple: Any script can veto a disable_analyzer()
call by breaking from this hook. The decision is local to the script taking
into account any state attached to the connection object or script specific
state stored elsewhere.
A script breaking from the hook takes over the responsibility to call
disable_analyzer() at a later point when it finds the condition due to which
it vetoed fulfilled (which may be never).

Signature:

    disabling_analyzer: hook(c: connection, atype: AllAnalyzers::Tag, aid: count);

Example use-cases are keeping the SSL analyzer enabled for finger-printing
until a certain amount of bytes or packets have been transferred or
similarly the connection duration exceed a certain threshold.

Other example use-cases might be keeping analyzers for SSH, RDP or SSL
enabled for connections from specific subnets.

It's a bit quirky as it makes disable_analyzer() a maybe operation. While log
policy hooks and/or the notice hook have similar semantics, they are not as
stateful. It still seems like a quite powerful primitive.

The disable_analyzer() call in dpd/main.zeek may motivate the addition of a
force flag as a follow-up for situations where the caller "knows better" or
absolutely wants to override.

Closes #1678 #1593.
2022-08-11 09:40:36 +02:00
..
arp Initial implementation of Lower-Level analyzers 2020-09-23 11:13:25 -07:00
bittorrent Adding test for BitTorrent tracker. 2021-12-21 17:48:26 +01:00
conn GH-1252: rename files with colons for Windows compatibility 2020-11-04 10:29:52 -08:00
dce-rpc Fix protocol forwarding in dce_rpc-auth 2021-09-23 08:50:11 -04:00
dhcp Prevent large dhcp log entries 2022-07-28 11:34:18 -07:00
dnp3 General btest cleanup 2020-08-11 11:26:22 -07:00
dns add svcb test case 2021-10-12 17:43:32 -04:00
ftp Implement X509 certificate log caching 2021-06-29 09:41:40 +01:00
http updates for gen-C++ maintenance, including skipping some inappropriate tests 2022-08-01 16:47:17 -07:00
icmp Remove deprecated ICMP events 2021-01-27 10:52:40 -07:00
imap Baseline updates for recent SSL changes. 2021-06-29 15:03:03 +01:00
irc General btest cleanup 2020-08-11 11:26:22 -07:00
krb General btest cleanup 2020-08-11 11:26:22 -07:00
modbus General btest cleanup 2020-08-11 11:26:22 -07:00
mount GH-239: Rename bro to zeek, bro-config to zeek-config, and bro-path-dev to zeek-path-dev. 2019-05-01 21:43:45 +00:00
mqtt GH-474: change MQTT::max_payload_size to be a runtime option 2019-08-05 18:11:54 -07:00
mysql Add btest for GH-1084 2020-07-24 09:28:11 -05:00
ncp General btest cleanup 2020-08-11 11:26:22 -07:00
nfs GH-239: Rename bro to zeek, bro-config to zeek-config, and bro-path-dev to zeek-path-dev. 2019-05-01 21:43:45 +00:00
ntp General btest cleanup 2020-08-11 11:26:22 -07:00
pop3 GH-239: Rename bro to zeek, bro-config to zeek-config, and bro-path-dev to zeek-path-dev. 2019-05-01 21:43:45 +00:00
portmap GH-684: Fix parsing of RPC calls with non-AUTH_UNIX flavors 2019-11-13 13:14:14 -08:00
radius Convert pcapng test suite files to pcap format 2019-11-08 13:08:06 -08:00
rdp Baseline updates for recent SSL changes. 2021-06-29 15:03:03 +01:00
rfb regularize test suite names to avoid custom/outdated suffices 2022-05-12 13:32:49 -07:00
sip GH-1507: Tolerate junk data before SIP requests 2021-04-14 15:34:07 -07:00
smb updates for gen-C++ maintenance, including skipping some inappropriate tests 2022-08-01 16:47:17 -07:00
smtp GH-1352: Added flag to stop processing SMTP headers in attached 2021-01-21 14:55:10 -05:00
snmp General btest cleanup 2020-08-11 11:26:22 -07:00
socks General btest cleanup 2020-08-11 11:26:22 -07:00
ssh Change SSH version field to be &optional. 2021-06-17 09:24:46 +02:00
ssl Introduce global disabling_analyzer() hook to veto disable_analyzer() 2022-08-11 09:40:36 +02:00
syslog General btest cleanup 2020-08-11 11:26:22 -07:00
tcp Add testcase for TCP segment offloading. 2021-11-23 12:37:55 +00:00
xmpp GH-239: Rename bro to zeek, bro-config to zeek-config, and bro-path-dev to zeek-path-dev. 2019-05-01 21:43:45 +00:00