]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
Adds test with HTTP connect followed by parser failure
authorPhilippe Antoine <contact@catenacyber.fr>
Wed, 30 Sep 2020 12:35:33 +0000 (14:35 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 6 Oct 2020 09:27:44 +0000 (11:27 +0200)
tests/http-connect/http-connect-fail/README.md [new file with mode: 0644]
tests/http-connect/http-connect-fail/input.pcap [new file with mode: 0644]
tests/http-connect/http-connect-fail/input.txt [new file with mode: 0644]
tests/http-connect/http-connect-fail/test.yaml [new file with mode: 0644]

diff --git a/tests/http-connect/http-connect-fail/README.md b/tests/http-connect/http-connect-fail/README.md
new file mode 100644 (file)
index 0000000..9798989
--- /dev/null
@@ -0,0 +1,7 @@
+# Description
+
+Test HTTP CONNECT followed by TLS with decode failure
+
+# PCAP
+
+The pcap comes from running txt2pcap.py with input.txt
diff --git a/tests/http-connect/http-connect-fail/input.pcap b/tests/http-connect/http-connect-fail/input.pcap
new file mode 100644 (file)
index 0000000..d438060
Binary files /dev/null and b/tests/http-connect/http-connect-fail/input.pcap differ
diff --git a/tests/http-connect/http-connect-fail/input.txt b/tests/http-connect/http-connect-fail/input.txt
new file mode 100644 (file)
index 0000000..3f58077
--- /dev/null
@@ -0,0 +1,3 @@
+c2s CONNECT abc:443 HTTP/1.1\r\nUser-Agent: Victor/1.0\r\n\r\n
+s2c HTTP/1.1 200 OK\r\nServer: VictorServer/1.0\r\n\r\n
+s2c \x05\x00\x00\x05\x00
diff --git a/tests/http-connect/http-connect-fail/test.yaml b/tests/http-connect/http-connect-fail/test.yaml
new file mode 100644 (file)
index 0000000..6ece99e
--- /dev/null
@@ -0,0 +1,29 @@
+requires:
+  features:
+    - HAVE_LIBJANSSON
+
+# disables checksum verification
+args:
+  - -k none
+
+checks:
+
+  # Check that there is one file event with content range.
+  - filter:
+      count: 1
+      match:
+        event_type: http
+        tx_id: 0
+        http.http_method: CONNECT
+        http.protocol: HTTP/1.1
+        http.status: 200
+  - filter:
+      count: 1
+      match:
+        event_type: flow
+        app_proto: dcerpc
+        app_proto_orig: http
+  - filter:
+      count: 0
+      match:
+        event_type: dcerpc