]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
Adds test about event for failed protocol change
authorPhilippe Antoine <contact@catenacyber.fr>
Mon, 22 Aug 2022 15:46:20 +0000 (17:46 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 13 Sep 2022 09:48:24 +0000 (11:48 +0200)
tests/protocol-change-failed-event/README.md [new file with mode: 0644]
tests/protocol-change-failed-event/input.pcap [new file with mode: 0644]
tests/protocol-change-failed-event/test.rules [new file with mode: 0644]
tests/protocol-change-failed-event/test.yaml [new file with mode: 0644]

diff --git a/tests/protocol-change-failed-event/README.md b/tests/protocol-change-failed-event/README.md
new file mode 100644 (file)
index 0000000..14d04f9
--- /dev/null
@@ -0,0 +1,8 @@
+# Description
+
+Test app-layer-event:http.failed_protocol_change
+
+# PCAP
+
+The pcap comes from oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=45941
+And use of fuzzpcap to get to a real pcap file
diff --git a/tests/protocol-change-failed-event/input.pcap b/tests/protocol-change-failed-event/input.pcap
new file mode 100644 (file)
index 0000000..d77187a
Binary files /dev/null and b/tests/protocol-change-failed-event/input.pcap differ
diff --git a/tests/protocol-change-failed-event/test.rules b/tests/protocol-change-failed-event/test.rules
new file mode 100644 (file)
index 0000000..f0d295b
--- /dev/null
@@ -0,0 +1 @@
+alert http any any -> any any (msg:"SURICATA HTTP failed protocol change"; flow:established; app-layer-event:http.failed_protocol_change; flowint:http.anomaly.count,+,1; classtype:protocol-command-decode; sid:2221053; rev:1;)
diff --git a/tests/protocol-change-failed-event/test.yaml b/tests/protocol-change-failed-event/test.yaml
new file mode 100644 (file)
index 0000000..c7c33fd
--- /dev/null
@@ -0,0 +1,12 @@
+requires:
+    min-version: 7
+
+args:
+  - -k none
+
+checks:
+  - filter:
+      count: 2
+      match:
+        event_type: alert
+        alert.signature_id: 2221053