]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
tests: test for security ticket 4710 610/head
authorVictor Julien <victor@inliniac.net>
Fri, 8 Oct 2021 10:26:37 +0000 (12:26 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 14 Dec 2021 19:34:00 +0000 (20:34 +0100)
tests/security-4710-01/input.pcap [new file with mode: 0644]
tests/security-4710-01/test.rules [new file with mode: 0644]
tests/security-4710-01/test.yaml [new file with mode: 0644]
tests/security-4710-02/input.pcap [new file with mode: 0644]
tests/security-4710-02/test.rules [new file with mode: 0644]
tests/security-4710-02/test.yaml [new file with mode: 0644]

diff --git a/tests/security-4710-01/input.pcap b/tests/security-4710-01/input.pcap
new file mode 100644 (file)
index 0000000..82a8f6f
Binary files /dev/null and b/tests/security-4710-01/input.pcap differ
diff --git a/tests/security-4710-01/test.rules b/tests/security-4710-01/test.rules
new file mode 100644 (file)
index 0000000..c34827c
--- /dev/null
@@ -0,0 +1,2 @@
+reject tcp any any -> any any (msg: "Bad keyword detected!"; content: "ultrasurf"; http_uri; sid: 1;)
+alert tcp any any -> any any (msg:"SURICATA STREAM suspected RST injection"; stream-event:suspected_rst_inject; classtype:protocol-command-decode; sid:2210058; rev:1;)
diff --git a/tests/security-4710-01/test.yaml b/tests/security-4710-01/test.yaml
new file mode 100644 (file)
index 0000000..d39c1f9
--- /dev/null
@@ -0,0 +1,23 @@
+args:
+- -k none
+
+checks:
+  - filter:
+      count: 2
+      match:
+        event_type: alert
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 1
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 2210058
+  - filter:
+      count: 1
+      match:
+        event_type: http
+        http.url: /ultrasurf.html
diff --git a/tests/security-4710-02/input.pcap b/tests/security-4710-02/input.pcap
new file mode 100644 (file)
index 0000000..55a730e
Binary files /dev/null and b/tests/security-4710-02/input.pcap differ
diff --git a/tests/security-4710-02/test.rules b/tests/security-4710-02/test.rules
new file mode 100644 (file)
index 0000000..9c1d6e2
--- /dev/null
@@ -0,0 +1,2 @@
+reject tcp any any -> any any (content: "/"; http_uri; startswith; endswith; sid: 1;)
+alert tcp any any -> any any (msg:"SURICATA STREAM suspected RST injection"; stream-event:suspected_rst_inject; classtype:protocol-command-decode; sid:2210058; rev:1;)
diff --git a/tests/security-4710-02/test.yaml b/tests/security-4710-02/test.yaml
new file mode 100644 (file)
index 0000000..d5eca19
--- /dev/null
@@ -0,0 +1,23 @@
+args:
+- -k none
+
+checks:
+  - filter:
+      count: 2
+      match:
+        event_type: alert
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 1
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 2210058
+  - filter:
+      count: 1
+      match:
+        event_type: http
+        http.url: /