]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
tests: add test for http raw header
authorAngelo Mirabella <amirabella@lastline.com>
Wed, 17 Jun 2020 06:33:21 +0000 (07:33 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 29 Jun 2020 09:15:10 +0000 (11:15 +0200)
tests/http-raw-header/README.md [new file with mode: 0644]
tests/http-raw-header/input.pcap [new file with mode: 0644]
tests/http-raw-header/test.rules [new file with mode: 0644]
tests/http-raw-header/test.yaml [new file with mode: 0644]

diff --git a/tests/http-raw-header/README.md b/tests/http-raw-header/README.md
new file mode 100644 (file)
index 0000000..89ce12a
--- /dev/null
@@ -0,0 +1,7 @@
+# Description
+
+Test signature match on raw http header.
+
+# PCAP
+
+The pcap comes from a redmine ticket (https://redmine.openinfosecfoundation.org/issues/3504).
diff --git a/tests/http-raw-header/input.pcap b/tests/http-raw-header/input.pcap
new file mode 100644 (file)
index 0000000..10f90e8
Binary files /dev/null and b/tests/http-raw-header/input.pcap differ
diff --git a/tests/http-raw-header/test.rules b/tests/http-raw-header/test.rules
new file mode 100644 (file)
index 0000000..62852b2
--- /dev/null
@@ -0,0 +1 @@
+alert http $EXTERNAL_NET any -> $HOME_NET any (flow:established,to_client; content:"Server|3a 20 20 20 20 20 20 20|Yx|28|"; http_raw_header; sid:1;)
diff --git a/tests/http-raw-header/test.yaml b/tests/http-raw-header/test.yaml
new file mode 100644 (file)
index 0000000..d86f7be
--- /dev/null
@@ -0,0 +1,9 @@
+requires:
+  min-version: 4.1.0
+
+checks:
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 1