]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
Adds test with http over IPv6
authorPhilippe Antoine <contact@catenacyber.fr>
Wed, 21 Jul 2021 12:01:31 +0000 (14:01 +0200)
committerJason Ish <jason.ish@oisf.net>
Tue, 16 Nov 2021 16:25:46 +0000 (10:25 -0600)
and absence of anomalies

tests/http-ipv6/README.md [new file with mode: 0644]
tests/http-ipv6/input.pcap [new file with mode: 0644]
tests/http-ipv6/test.rules [new file with mode: 0644]
tests/http-ipv6/test.yaml [new file with mode: 0644]

diff --git a/tests/http-ipv6/README.md b/tests/http-ipv6/README.md
new file mode 100644 (file)
index 0000000..d27f59e
--- /dev/null
@@ -0,0 +1,9 @@
+# Description
+
+Test http over IPv6
+
+# PCAP
+
+The pcap comes from running
+`python -m SimpleHTTPServer 8000` or `python3 -m http.server` as a server  and the following command
+`curl "[::1]:8000/"` as a client
diff --git a/tests/http-ipv6/input.pcap b/tests/http-ipv6/input.pcap
new file mode 100644 (file)
index 0000000..dc12da2
Binary files /dev/null and b/tests/http-ipv6/input.pcap differ
diff --git a/tests/http-ipv6/test.rules b/tests/http-ipv6/test.rules
new file mode 100644 (file)
index 0000000..f7a6f23
--- /dev/null
@@ -0,0 +1,2 @@
+alert http any any -> any any (msg:"SURICATA HTTP Host header invalid"; flow:established,to_server; app-layer-event:http.request_header_host_invalid; flowint:http.anomaly.count,+,1; classtype:protocol-command-decode; sid:2221028; rev:1;)
+
diff --git a/tests/http-ipv6/test.yaml b/tests/http-ipv6/test.yaml
new file mode 100644 (file)
index 0000000..6e93175
--- /dev/null
@@ -0,0 +1,18 @@
+requires:
+  features:
+    - HAVE_LIBJANSSON
+
+# disables checksum verification
+args:
+  - -k none
+
+checks:
+  - filter:
+      count: 0
+      match:
+        event_type: anomaly
+  # no false positive
+  - filter:
+      count: 0
+      match:
+        event_type: alert