Prevent large dhcp log entries

A flood of DHCP traffic can result if very large log entries consisting
of many uids and/or msg_types. Such large log entries can disrupt a SIEM
ingestion pipeline. This change forcing a log entry to be written when
the number of uids or the number of msg_Types exceed a certain value.
The values are treated as options for easy configuration.
This commit is contained in:
Peter Cullen 2022-07-28 11:34:18 -07:00
parent d461033978
commit fb4858d42b
6 changed files with 173 additions and 0 deletions

View file

@ -0,0 +1,7 @@
# This tests that DHCP log entries do not contain large numbers
# of msg_types.
# @TEST-EXEC: zeek -b -r $TRACES/dhcp/dhcp_flood.pcap -e ' redef DHCP::max_uids_per_log_entry=500; redef DHCP::max_msg_types_per_log_entry=8;' %INPUT
# @TEST-EXEC: btest-diff dhcp.log
@load base/protocols/dhcp

View file

@ -0,0 +1,7 @@
# This tests that DHCP log entries do not contain large numbers
# of uids.
# @TEST-EXEC: zeek -b -r $TRACES/dhcp/dhcp_flood.pcap -e ' redef DHCP::max_uids_per_log_entry=5' %INPUT
# @TEST-EXEC: btest-diff dhcp.log
@load base/protocols/dhcp