]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
tests: Add file-data/url_decode test
authorJeff Lucovsky <jeff@lucovsky.org>
Mon, 19 Oct 2020 12:52:40 +0000 (08:52 -0400)
committerJeff Lucovsky <jeff@lucovsky.org>
Sun, 8 Nov 2020 14:34:41 +0000 (09:34 -0500)
tests/bug-3616-urldecode/input.pcap [new file with mode: 0644]
tests/bug-3616-urldecode/test.rules [new file with mode: 0644]
tests/bug-3616-urldecode/test.yaml [new file with mode: 0644]

diff --git a/tests/bug-3616-urldecode/input.pcap b/tests/bug-3616-urldecode/input.pcap
new file mode 100644 (file)
index 0000000..171cfc5
Binary files /dev/null and b/tests/bug-3616-urldecode/input.pcap differ
diff --git a/tests/bug-3616-urldecode/test.rules b/tests/bug-3616-urldecode/test.rules
new file mode 100644 (file)
index 0000000..afb437e
--- /dev/null
@@ -0,0 +1,2 @@
+alert http any any -> any any (msg:"HTTP url_decode CANARY TEST"; file_data; content:"The requested URL /evil%27sqli was not found on this server"; sid:1;)
+alert http any any -> any any (msg:"HTTP url_decode test #1"; file_data; url_decode; content:"The requested URL /evil'sqli was not found on this server"; sid:2;)
diff --git a/tests/bug-3616-urldecode/test.yaml b/tests/bug-3616-urldecode/test.yaml
new file mode 100644 (file)
index 0000000..751bb1e
--- /dev/null
@@ -0,0 +1,18 @@
+requires:
+  min-version: 6
+
+# disables checksum verification
+args:
+  - -k none
+
+checks:
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 1
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 2