]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
bypass: adds a test with a UDP flow
authorPhilippe Antoine <pantoine@oisf.net>
Thu, 30 May 2024 12:47:31 +0000 (14:47 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 4 Jul 2024 04:37:20 +0000 (06:37 +0200)
Ticket: 7053

tests/detect-bypass-udp/README.md [new file with mode: 0644]
tests/detect-bypass-udp/input.pcap [new file with mode: 0644]
tests/detect-bypass-udp/test.rules [new file with mode: 0755]
tests/detect-bypass-udp/test.yaml [new file with mode: 0644]

diff --git a/tests/detect-bypass-udp/README.md b/tests/detect-bypass-udp/README.md
new file mode 100644 (file)
index 0000000..82dae7c
--- /dev/null
@@ -0,0 +1,5 @@
+Tests the bypass keyword with a UDP flow
+
+Pcap shared from creator of https://forum.suricata.io/t/bypass-does-this-only-work-with-tcp/4660/2
+
+https://redmine.openinfosecfoundation.org/issues/7053
diff --git a/tests/detect-bypass-udp/input.pcap b/tests/detect-bypass-udp/input.pcap
new file mode 100644 (file)
index 0000000..1959e62
Binary files /dev/null and b/tests/detect-bypass-udp/input.pcap differ
diff --git a/tests/detect-bypass-udp/test.rules b/tests/detect-bypass-udp/test.rules
new file mode 100755 (executable)
index 0000000..9d6abd8
--- /dev/null
@@ -0,0 +1,2 @@
+#this looks for 0x2e, 20 bytes into the UDP payload
+pass udp 192.168.0.2 4500 -> any any (msg:"Bypass packet 3 and 4";content:"|00 00 00 00|"; offset:0; depth:4; content:"|2e|"; offset:20; depth:1; bypass; sid:1003068;)
diff --git a/tests/detect-bypass-udp/test.yaml b/tests/detect-bypass-udp/test.yaml
new file mode 100644 (file)
index 0000000..ffbe5c9
--- /dev/null
@@ -0,0 +1,12 @@
+requires:
+  min-version: 8
+
+args:
+- -k none
+
+checks:
+- filter:
+    count: 1
+    match:
+      event_type: flow
+      flow.state: bypassed