]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
Add tests for TFTP read and write requests
authorShivani Bhardwaj <shivanib134@gmail.com>
Tue, 18 Jun 2019 16:22:49 +0000 (21:52 +0530)
committerVictor Julien <victor@inliniac.net>
Tue, 9 Jul 2019 15:04:05 +0000 (17:04 +0200)
Closes redmine ticket #3043.

tests/tftp-tx-handling-rrq/input.pcap [new file with mode: 0644]
tests/tftp-tx-handling-rrq/test.yaml [new file with mode: 0644]
tests/tftp-tx-handling-wrq/input.pcap [new file with mode: 0644]
tests/tftp-tx-handling-wrq/test.yaml [new file with mode: 0644]

diff --git a/tests/tftp-tx-handling-rrq/input.pcap b/tests/tftp-tx-handling-rrq/input.pcap
new file mode 100644 (file)
index 0000000..6c5efa8
Binary files /dev/null and b/tests/tftp-tx-handling-rrq/input.pcap differ
diff --git a/tests/tftp-tx-handling-rrq/test.yaml b/tests/tftp-tx-handling-rrq/test.yaml
new file mode 100644 (file)
index 0000000..cb6da2c
--- /dev/null
@@ -0,0 +1,22 @@
+requires:
+  features:
+    - HAVE_LIBJANSSON
+
+args:
+ - -k none
+
+checks:
+- filter:
+    count: 1
+    match:
+      dest_ip: 192.168.0.10
+      dest_port: 69
+      event_type: tftp
+      pcap_cnt: 1
+      proto: UDP
+      src_ip: 192.168.0.253
+      src_port: 50618
+      tftp:
+        file: rfc1350.txt
+        mode: octet
+        packet: read
diff --git a/tests/tftp-tx-handling-wrq/input.pcap b/tests/tftp-tx-handling-wrq/input.pcap
new file mode 100644 (file)
index 0000000..abb986a
Binary files /dev/null and b/tests/tftp-tx-handling-wrq/input.pcap differ
diff --git a/tests/tftp-tx-handling-wrq/test.yaml b/tests/tftp-tx-handling-wrq/test.yaml
new file mode 100644 (file)
index 0000000..74c4862
--- /dev/null
@@ -0,0 +1,22 @@
+requires:
+  features:
+    - HAVE_LIBJANSSON
+
+args:
+ - -k none
+
+checks:
+- filter:
+    count: 1
+    match:
+      dest_ip: 192.168.0.13
+      dest_port: 69
+      event_type: tftp
+      pcap_cnt: 1
+      proto: UDP
+      src_ip: 192.168.0.1
+      src_port: 57509
+      tftp:
+        file: rfc1350.txt
+        mode: octet
+        packet: write