mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
IPBasedAnalyzer: Don't flip connections when destination is broadcast
Closes #3235
This commit is contained in:
parent
de65671a0a
commit
ba04f4c31d
5 changed files with 17 additions and 1 deletions
4
NEWS
4
NEWS
|
@ -78,6 +78,10 @@ Changed Functionality
|
||||||
``policy/protocols/conn/community-id-logging.zeek`` was loaded before. This
|
``policy/protocols/conn/community-id-logging.zeek`` was loaded before. This
|
||||||
was fairly unusual and hard to debug behavior.
|
was fairly unusual and hard to debug behavior.
|
||||||
|
|
||||||
|
- Connections to broadcast addresses are not flipped based on ``likely_server_ports``
|
||||||
|
anymore. Previously, broadcast packets originating from a likely server port
|
||||||
|
resulted in 255.255.255.255 being the originator in ``conn.log``.
|
||||||
|
|
||||||
Removed Functionality
|
Removed Functionality
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,7 @@ zeek::Connection* IPBasedAnalyzer::NewConn(const ConnTuple* id, const detail::Co
|
||||||
pkt->ip_hdr->FlowLabel(), pkt);
|
pkt->ip_hdr->FlowLabel(), pkt);
|
||||||
conn->SetTransport(transport);
|
conn->SetTransport(transport);
|
||||||
|
|
||||||
if ( flip )
|
if ( flip && ! id->dst_addr.IsBroadcast() )
|
||||||
conn->FlipRoles();
|
conn->FlipRoles();
|
||||||
|
|
||||||
BuildSessionAnalyzerTree(conn);
|
BuildSessionAnalyzerTree(conn);
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
|
ts uid id.orig_h id.orig_p id.resp_h id.resp_p history
|
||||||
|
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.1 40190 255.255.255.255 7437 D
|
BIN
testing/btest/Traces/udp-broadcast.pcap
Normal file
BIN
testing/btest/Traces/udp-broadcast.pcap
Normal file
Binary file not shown.
9
testing/btest/core/udp-broadcast-no-flip.zeek
Normal file
9
testing/btest/core/udp-broadcast-no-flip.zeek
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# @TEST-DOC: Pcap contains broadcast with port 40190 to port 7437. Set likely_server_ports to 40190 but don't expect this connection to be flipped.
|
||||||
|
|
||||||
|
# @TEST-EXEC: zeek -b -r $TRACES/udp-broadcast.pcap %INPUT
|
||||||
|
# @TEST-EXEC: zeek-cut -m ts uid id.orig_h id.orig_p id.resp_h id.resp_p history < conn.log > conn.log.cut
|
||||||
|
# @TEST-EXEC: btest-diff conn.log.cut
|
||||||
|
|
||||||
|
@load base/protocols/conn
|
||||||
|
|
||||||
|
redef likely_server_ports += { 40190/udp };
|
Loading…
Add table
Add a link
Reference in a new issue