The following rule, does not match with packets that are forwarded on the box running Suricata:
alert http any any → any any (msg:“delete detected”; content:“delete”; http_uri; nocase; sid:1; rev:1)
However, it does match with packets that are originate from or are targeted at the box itself. (Tested on both Linux Suricata 3.2.2 and FreeBSD Suricata 4.0.0 and 5.0.1). I tested this both in netmap and libpcap capture modes.
However, as soon as the HTTP protocol detection module gets out of the way, it starts to work as expected:
alert ip any any → any any (msg:“delete detected”; content:“delete”; nocase; sid:1; rev:1)
This rule does match with forwarded packets.
Can you please let me know if I am missing something?
I got the same issue than Amin when running Suricata on a pcap with only http requests. Only the first packet triggers an alert and the rest of the capture is not seen as http flow. When splitting the pcap in single-packet pcaps, each pcap triggers the alert as expected. Can be reproduced by keeping only client to server requests from this pcap.
stream.midstream and stream.async-oneside are enabled. It works fine when seeing the whole trafic but any idea why Suricata is not able to detect in this case ? According to FAQ, Suricata HTTP detection is expected to use “patterns. Detection only on response also works.”