]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
test/event: Test for reassembly depth reached event
authorJeff Lucovsky <jlucovsky@oisf.net>
Tue, 12 Jul 2022 13:18:09 +0000 (09:18 -0400)
committerVictor Julien <victor@inliniac.net>
Tue, 13 Sep 2022 09:57:46 +0000 (11:57 +0200)
Issue: 3512

This commit adds a test to validate that the stream reassembly depth
event fire.

tests/stream-depth-reached-event/input.pcap [new file with mode: 0644]
tests/stream-depth-reached-event/test.rules [new file with mode: 0644]
tests/stream-depth-reached-event/test.yaml [new file with mode: 0644]

diff --git a/tests/stream-depth-reached-event/input.pcap b/tests/stream-depth-reached-event/input.pcap
new file mode 100644 (file)
index 0000000..49c7116
Binary files /dev/null and b/tests/stream-depth-reached-event/input.pcap differ
diff --git a/tests/stream-depth-reached-event/test.rules b/tests/stream-depth-reached-event/test.rules
new file mode 100644 (file)
index 0000000..af8bae2
--- /dev/null
@@ -0,0 +1 @@
+alert tcp any any -> any any (msg:"SURICATA STREAM reassembly depth reached"; stream-event:reassembly_depth_reached; classtype:protocol-command-decode; sid:2210062; rev:1;)
diff --git a/tests/stream-depth-reached-event/test.yaml b/tests/stream-depth-reached-event/test.yaml
new file mode 100644 (file)
index 0000000..2a293f4
--- /dev/null
@@ -0,0 +1,18 @@
+requires:
+    min-version: 7
+
+args:
+- --set stream.reassembly.depth=50 --set outputs.1.eve-log.types.2.anomaly.types.stream=yes
+
+checks:
+  - filter:
+      count: 2
+      match:
+        event_type: anomaly
+        anomaly.event: stream.reassembly_depth_reached
+
+  - filter:
+      count: 2
+      match:
+        event_type: alert
+        alert.signature_id: 2210062