Suricata 7.0.5 installed from the PPA in the docker image ubuntu:22.04
My actual problem is related to TLS not being analyzed in Geneve encoded packets, but during the process of debugging, I found out I can’t even make my simple SNI alert work with a single https request in a pcap file.
So I noticed that the alert works when running in “online” mode and doesn’t work if I capture the same traffic using wireshark and run in “offline” mode with it. The pcap file was captured using wireshark on the host machine.
online command: suricata -c /etc/suricata/suricata.yaml -i eth0
offline command: suricata -c /etc/suricata/suricata.yaml -r capture.pcap
(I also tried stream.midstream=true but doesn’t seem to make difference)
suricata.yaml (83.2 KB) (I’m almost sure I just changed the rules to remove suricata.rules and added my.rules)
capture.pcap (28.7 KB)
my.rules (only a single rule): alert tls any any -> any any (msg:"SNI example.com Detected"; tls.sni; content:"example.com"; nocase; classtype:policy-violation; sid:1000001; rev:1;)
Stats.log (which seems to indicate it read the pcap file correctly):
------------------------------------------------------------------------------------
Date: 5/14/2024 -- 02:24:11 (uptime: 0d, 00h 00m 00s)
------------------------------------------------------------------------------------
Counter | TM Name | Value
------------------------------------------------------------------------------------
decoder.pkts | Total | 87
decoder.bytes | Total | 28002
decoder.ipv4 | Total | 87
decoder.sll | Total | 87
decoder.tcp | Total | 87
tcp.syn | Total | 3
tcp.synack | Total | 3
tcp.rst | Total | 6
decoder.avg_pkt_size | Total | 321
decoder.max_pkt_size | Total | 2948
flow.total | Total | 3
flow.tcp | Total | 3
flow.tcp_reuse | Total | 1
flow.wrk.spare_sync_avg | Total | 100
flow.wrk.spare_sync | Total | 2
flow.wrk.flows_evicted | Total | 1
tcp.invalid_checksum | Total | 51
flow.end.state.new | Total | 3
flow.mgr.rows_per_sec | Total | 6553
flow.spare | Total | 9800
memcap_pressure | Total | 5
memcap_pressure_max | Total | 5
flow.recycler.recycled | Total | 2
flow.recycler.queue_max | Total | 2
tcp.memuse | Total | 3637248
tcp.reassembly_memuse | Total | 688128
flow.memuse | Total | 7154304
eve.json (5.4 KB)