]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
tests: add issue 3267 test 405/head
authorVictor Julien <victor@inliniac.net>
Mon, 18 Jan 2021 09:48:14 +0000 (10:48 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 18 Jan 2021 09:56:41 +0000 (10:56 +0100)
tests/issue-3267-tcphdr/tcphdr_http.pcap [new file with mode: 0644]
tests/issue-3267-tcphdr/test.rules [new file with mode: 0644]
tests/issue-3267-tcphdr/test.yaml [new file with mode: 0644]

diff --git a/tests/issue-3267-tcphdr/tcphdr_http.pcap b/tests/issue-3267-tcphdr/tcphdr_http.pcap
new file mode 100644 (file)
index 0000000..0d7f70f
Binary files /dev/null and b/tests/issue-3267-tcphdr/tcphdr_http.pcap differ
diff --git a/tests/issue-3267-tcphdr/test.rules b/tests/issue-3267-tcphdr/test.rules
new file mode 100644 (file)
index 0000000..51bb0e4
--- /dev/null
@@ -0,0 +1,4 @@
+alert tcp-pkt any any -> any 80 (msg:"tcp.hdr test1 SYN pkt 1"; tcp.hdr; content:"|00 50|"; offset:2; depth:2; tcp.hdr; content:"|80 c2 20 00|"; sid:1; rev:1;)
+alert tcp-pkt any any -> any 80 (msg:"tcp.hdr test2 SYN pkt 2"; tcp.hdr; content:"|00 00 00 00|"; offset:8; depth:4; sid:2; rev:1;)
+alert tcp-pkt any any -> any 80 (msg:"tcp.hdr test3 GET pkt 1"; content:"GET"; tcp.hdr; content:"|00 50|"; offset:2; depth:2; tcp.hdr; content:"|50 18|"; distance:8; within:2; sid:3; rev:1;)
+alert tcp-pkt any any -> any 80 (msg:"tcp.hdr test4 GET pkt 2"; content:"GET"; tcp.hdr; content:"|00 50|"; offset:2; depth:2; sid:4; rev:1;)
diff --git a/tests/issue-3267-tcphdr/test.yaml b/tests/issue-3267-tcphdr/test.yaml
new file mode 100644 (file)
index 0000000..430c86e
--- /dev/null
@@ -0,0 +1,51 @@
+requires:
+  min-version: 5.0.0
+
+args:
+- -k none
+
+checks:
+- filter:
+    count: 1
+    match:
+      alert.signature_id: 1
+      dest_ip: 10.0.0.199
+      dest_port: 80
+      event_type: alert
+      pcap_cnt: 1
+      proto: TCP
+      src_ip: 10.0.0.111
+      src_port: 2904
+- filter:
+    count: 1
+    match:
+      alert.signature_id: 2
+      dest_ip: 10.0.0.199
+      dest_port: 80
+      event_type: alert
+      pcap_cnt: 1
+      proto: TCP
+      src_ip: 10.0.0.111
+      src_port: 2904
+- filter:
+    count: 1
+    match:
+      alert.signature_id: 3
+      dest_ip: 10.0.0.199
+      dest_port: 80
+      event_type: alert
+      pcap_cnt: 4
+      proto: TCP
+      src_ip: 10.0.0.111
+      src_port: 2904
+- filter:
+    count: 1
+    match:
+      alert.signature_id: 4
+      dest_ip: 10.0.0.199
+      dest_port: 80
+      event_type: alert
+      pcap_cnt: 4
+      proto: TCP
+      src_ip: 10.0.0.111
+      src_port: 2904