mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 04:58:21 +00:00
GH-1221: Add unknown_protocols.log for logging packet analyzer lookup failures
This commit is contained in:
parent
efe42bc67b
commit
c3cf36e135
19 changed files with 222 additions and 31 deletions
|
@ -0,0 +1,11 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
#separator \x09
|
||||
#set_separator ,
|
||||
#empty_field (empty)
|
||||
#unset_field -
|
||||
#path unknown_protocols
|
||||
#open XXXX-XX-XX-XX-XX-XX
|
||||
#fields ts analyzer protocol_id first_bytes
|
||||
#types time string string string
|
||||
XXXXXXXXXX.XXXXXX IP 0x87 3b010600d1da0080002a
|
||||
#close XXXX-XX-XX-XX-XX-XX
|
|
@ -1,3 +1,4 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
barnyard2
|
||||
broker
|
||||
capture_loss
|
||||
|
@ -59,6 +60,7 @@ syslog
|
|||
traceroute
|
||||
tunnel
|
||||
unified2
|
||||
unknown_protocols
|
||||
weird
|
||||
weird_stats
|
||||
x509
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
PacketDemo::Bar - Demo packet analyzers (RawLayer, LLC). (dynamic, version 1.0.0)
|
||||
[Packet Analyzer] LLC_Demo (ANALYZER_LLC_DEMO)
|
||||
[Packet Analyzer] Raw_Layer (ANALYZER_RAW_LAYER)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
llc_demo_message (DSAP = 42, SSAP = 42, Control = 3)
|
||||
llc_demo_message (DSAP = 42, SSAP = 42, Control = 3)
|
||||
llc_demo_message (DSAP = 42, SSAP = 42, Control = 3)
|
||||
|
|
|
@ -1,20 +1,11 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
#separator \x09
|
||||
#set_separator ,
|
||||
#empty_field (empty)
|
||||
#unset_field -
|
||||
#path conn
|
||||
#open 2020-10-14-18-47-28
|
||||
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p proto service duration orig_bytes resp_bytes conn_state local_orig local_resp missed_bytes history orig_pkts orig_ip_bytes resp_pkts resp_ip_bytes tunnel_parents
|
||||
#types time string addr port addr port enum string interval count count string bool bool count string count count count count set[string]
|
||||
1599068759.619112 CHhAvVGS1DHFjwGM9 172.22.214.60 8 192.0.78.212 0 icmp - - - - OTH - - 0 - 1 28 0 0 -
|
||||
#close 2020-10-14-18-47-28
|
||||
#separator \x09
|
||||
#set_separator ,
|
||||
#empty_field (empty)
|
||||
#unset_field -
|
||||
#path weird
|
||||
#open 2020-10-14-18-47-28
|
||||
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p name addl notice peer
|
||||
#types time string addr port addr port string string bool string
|
||||
1599068759.647566 - 108.97.116.105 0 110.103.32.73 0 truncated_IPv6 - F zeek
|
||||
#close 2020-10-14-18-47-28
|
||||
#path unknown_protocols
|
||||
#open XXXX-XX-XX-XX-XX-XX
|
||||
#fields ts analyzer protocol_id first_bytes
|
||||
#types time string string string
|
||||
XXXXXXXXXX.XXXXXX ETHERNET 0x88b5 4920616d20656e636170
|
||||
#close XXXX-XX-XX-XX-XX-XX
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
raw_layer_message (Message = 'I am encapsulating IP', Protocol = 4950)
|
||||
#separator \x09
|
||||
#set_separator ,
|
||||
#empty_field (empty)
|
||||
#unset_field -
|
||||
#path conn
|
||||
#open 2020-10-14-18-47-51
|
||||
#open XXXX-XX-XX-XX-XX-XX
|
||||
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p proto service duration orig_bytes resp_bytes conn_state local_orig local_resp missed_bytes history orig_pkts orig_ip_bytes resp_pkts resp_ip_bytes tunnel_parents
|
||||
#types time string addr port addr port enum string interval count count string bool bool count string count count count count set[string]
|
||||
1599068759.647566 ClEkJM2Vm5giqnMf4h 172.22.214.60 8 192.0.78.150 0 icmp - - - - OTH - - 0 - 1 28 0 0 -
|
||||
1599068759.619112 CHhAvVGS1DHFjwGM9 172.22.214.60 8 192.0.78.212 0 icmp - - - - OTH - - 0 - 1 28 0 0 -
|
||||
#close 2020-10-14-18-47-51
|
||||
XXXXXXXXXX.XXXXXX ClEkJM2Vm5giqnMf4h 172.22.214.60 8 192.0.78.150 0 icmp - - - - OTH - - 0 - 1 28 0 0 -
|
||||
XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 172.22.214.60 8 192.0.78.212 0 icmp - - - - OTH - - 0 - 1 28 0 0 -
|
||||
#close XXXX-XX-XX-XX-XX-XX
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# @TEST-REQUIRES: grep -q "#undef ENABLE_MOBILE_IPV6" $BUILD/zeek-config.h
|
||||
#
|
||||
# @TEST-EXEC: zeek -r $TRACES/mobile-ipv6/mip6_back.trace %INPUT
|
||||
# @TEST-EXEC: btest-diff weird.log
|
||||
# @TEST-EXEC: btest-diff unknown_protocols.log
|
||||
|
||||
@load policy/misc/unknown-protocols
|
||||
|
||||
event mobile_ipv6_message(p: pkt_hdr)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# @TEST-EXEC: zeek -r $TRACES/raw_layer.pcap
|
||||
# @TEST-EXEC: zeek -r $TRACES/raw_layer.pcap -e "@load policy/misc/unknown-protocols"
|
||||
# @TEST-EXEC: cat conn.log > output_orig
|
||||
# @TEST-EXEC: cat weird.log >> output_orig
|
||||
# @TEST-EXEC: cat unknown_protocols.log > output_orig
|
||||
# @TEST-EXEC: btest-diff output_orig
|
||||
# @TEST-EXEC: rm -f *.log
|
||||
#
|
||||
|
@ -12,13 +12,15 @@
|
|||
#
|
||||
# @TEST-EXEC: ZEEK_PLUGIN_PATH=`pwd` zeek -r $TRACES/raw_layer.pcap %INPUT > output_raw
|
||||
# @TEST-EXEC: cat conn.log >> output_raw
|
||||
# @TEST-EXEC: test ! -e weird.log
|
||||
# @TEST-EXEC: test ! -e unknown_protocols.log
|
||||
# @TEST-EXEC: btest-diff output_raw
|
||||
# @TEST-EXEC: rm -f *.log
|
||||
#
|
||||
# @TEST-EXEC: ZEEK_PLUGIN_PATH=`pwd` zeek -r $TRACES/raw_packets.trace %INPUT > output_llc
|
||||
# @TEST-EXEC: btest-diff output_llc
|
||||
|
||||
@load policy/misc/unknown-protocols
|
||||
|
||||
event raw_layer_message(msg: string, protocol: count)
|
||||
{
|
||||
print fmt("raw_layer_message (Message = '%s', Protocol = %x)", msg, protocol);
|
||||
|
@ -29,4 +31,3 @@ event llc_demo_message(dsap: count, ssap: count, control: count)
|
|||
print fmt("llc_demo_message (DSAP = %x, SSAP = %x, Control = %x)",
|
||||
dsap, ssap, control);
|
||||
}
|
||||
|
||||
|
|
2
testing/external/commit-hash.zeek-testing
vendored
2
testing/external/commit-hash.zeek-testing
vendored
|
@ -1 +1 @@
|
|||
9611b9d06bef86c16a531e616972f7c9f5737da4
|
||||
a980aa1442f51a0c4e4af1061a04dc80038d3d04
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue