mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Add Teredo packet analyzer, disable old analyzer
This commit is contained in:
parent
05574ecce1
commit
dc0ecf9811
25 changed files with 683 additions and 91 deletions
|
@ -24,3 +24,4 @@
|
|||
@load base/packet-protocols/ayiya
|
||||
@load base/packet-protocols/geneve
|
||||
@load base/packet-protocols/vxlan
|
||||
@load base/packet-protocols/teredo
|
||||
|
|
1
scripts/base/packet-protocols/teredo/__load__.zeek
Normal file
1
scripts/base/packet-protocols/teredo/__load__.zeek
Normal file
|
@ -0,0 +1 @@
|
|||
@load ./main
|
28
scripts/base/packet-protocols/teredo/main.zeek
Normal file
28
scripts/base/packet-protocols/teredo/main.zeek
Normal file
|
@ -0,0 +1,28 @@
|
|||
module PacketAnalyzer::TEREDO;
|
||||
|
||||
# This needs to be loaded here so the functions are available. Function BIFs normally aren't
|
||||
# loaded until after the packet analysis init scripts are run, and then zeek complains it
|
||||
# can't find the function.
|
||||
@load base/bif/plugins/Zeek_Teredo.functions.bif
|
||||
|
||||
# Needed for port registration for BPF
|
||||
@load base/frameworks/analyzer/main
|
||||
|
||||
export {
|
||||
## Default analyzer
|
||||
const default_analyzer: PacketAnalyzer::Tag = PacketAnalyzer::ANALYZER_IP &redef;
|
||||
}
|
||||
|
||||
const teredo_ports = { 3544/udp };
|
||||
redef likely_server_ports += { teredo_ports };
|
||||
|
||||
event zeek_init() &priority=20
|
||||
{
|
||||
PacketAnalyzer::register_protocol_detection(PacketAnalyzer::ANALYZER_UDP, PacketAnalyzer::ANALYZER_TEREDO);
|
||||
PacketAnalyzer::register_for_ports(PacketAnalyzer::ANALYZER_UDP, PacketAnalyzer::ANALYZER_TEREDO, teredo_ports);
|
||||
}
|
||||
|
||||
event connection_state_remove(c: connection)
|
||||
{
|
||||
remove_teredo_connection(c$id);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue