--- /dev/null
+# Description
+
+TCP async traffic with only the server to client side of a IMAP session
+
+# Pcap
+
+Pcap from https://github.com/mtimebombm/suricata/blob/master/imap-server.pcap
--- /dev/null
+# look for a content match crossing packet payload boundaries
+alert tcp any 143 -> any any (content:"C6 OK ID completed|0d 0a|* 21 EXISTS|0d 0a|* 6 RECENT"; flow:to_client; sid:1;)
--- /dev/null
+requires:
+ features:
+ - HAVE_LIBJANSSON
+ min-version: 5.0.0
+args:
+- --set stream.midstream=true
+- --set stream.async-oneside=true
+
+checks:
+
+ # Check that we only have one alert event type in eve.
+ - filter:
+ count: 1
+ match:
+ event_type: alert
+ src_port: 143
+
+ - filter:
+ count: 1
+ match:
+ event_type: flow
+ dest_port: 143