]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
Adds test case for http_header while closing
authorPhilippe Antoine <contact@catenacyber.fr>
Tue, 7 May 2019 14:22:42 +0000 (16:22 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 20 Aug 2019 13:11:35 +0000 (15:11 +0200)
tests/http-close-headers/README.md [new file with mode: 0644]
tests/http-close-headers/input.pcap [new file with mode: 0644]
tests/http-close-headers/test.rules [new file with mode: 0644]
tests/http-close-headers/test.yaml [new file with mode: 0644]

diff --git a/tests/http-close-headers/README.md b/tests/http-close-headers/README.md
new file mode 100644 (file)
index 0000000..b99379a
--- /dev/null
@@ -0,0 +1,7 @@
+# Description
+
+Test http_header keywors for signature support when connection closes during the headers transmission.
+
+# PCAP
+
+The pcap comes from https://redmine.openinfosecfoundation.org/issues/2969
diff --git a/tests/http-close-headers/input.pcap b/tests/http-close-headers/input.pcap
new file mode 100644 (file)
index 0000000..dabf45b
Binary files /dev/null and b/tests/http-close-headers/input.pcap differ
diff --git a/tests/http-close-headers/test.rules b/tests/http-close-headers/test.rules
new file mode 100644 (file)
index 0000000..99e2eba
--- /dev/null
@@ -0,0 +1 @@
+alert http any any -> any any (msg: "'ng1nx' Server header found"; flow: established, from_server; content: "ng1nx"; nocase; http_header; classtype: attempted-admin; sid: 1; rev: 1; )
diff --git a/tests/http-close-headers/test.yaml b/tests/http-close-headers/test.yaml
new file mode 100644 (file)
index 0000000..c4f81fb
--- /dev/null
@@ -0,0 +1,14 @@
+requires:
+  features:
+    - HAVE_LIBJANSSON
+
+# disables checksum verification
+args:
+  - -k none
+
+checks:
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 1