-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathfilter_noise_ssl.zeek
executable file
·28 lines (24 loc) · 1.04 KB
/
filter_noise_ssl.zeek
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Contributor(s):
# Michal Purzynski [email protected]
#
module LogFilter;
const ignore_ports_resp: set[port] = {53/udp, 53/tcp, 123/udp, 137/udp, 161/udp, 514/udp, 514/tcp, 5355/udp, 5666/tcp, 8443/tcp} &redef;
event zeek_init()
{
Log::remove_default_filter(SSL::LOG);
Log::add_filter(SSL::LOG, [$name = "ssl-noise",
$pred(rec: SSL::Info) = {
if (rec$id$resp_p in ignore_ports_resp)
return F;
if ((rec$id$orig_h in drop_ip_from_log) || (rec$id$resp_h in drop_ip_from_log))
return F;
if ((rec?$server_name) && (/aus3\.mozilla\.org|aus4\.mozilla\.org|aus5\.mozilla\.org/ in rec$server_name))
return F;
return T;
}
]);
}