Created
February 13, 2020 21:44
-
-
Save mpurzynski/96a26c42874898447554531b6df9a4bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Scan; | |
global whitelist_scan_port: set[port] = {5223/udp, 5223/tcp} &redef; | |
global ephemeral_start_udp: port = 32768/udp; | |
global ephemeral_start_tcp: port = 32768/tcp; | |
hook scan_policy(scanner: addr, victim: addr, scanned_port: port) | |
{ | |
if (( victim in whitelist_scan_ip) || ( scanner in whitelist_scan_ip ) || ( scanned_port in whitelist_scan_port) || ( scanned_port > ephemeral_start_udp ) || ( scanned_port > ephemeral_start_tcp )) | |
break; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Scan; | |
type Idx: record { | |
whitelist_ip: subnet; | |
}; | |
global whitelist_scan_ip: set[subnet] = {}; | |
event zeek_init() | |
{ | |
Input::add_table([$source="/etc/zeek/scripts/zeekzilla/whitelist_scan_ip.txt", | |
$name="whitelist_scan_ip", | |
$idx=Idx, | |
$destination=whitelist_scan_ip, | |
$mode=Input::REREAD]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment