]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
ldap: add test for abandon request 2236/head 2237/head
authorAlice Akaki <akakialice@gmail.com>
Tue, 14 Jan 2025 01:26:42 +0000 (21:26 -0400)
committerAlice Akaki <akakialice@gmail.com>
Tue, 14 Jan 2025 21:48:23 +0000 (17:48 -0400)
Ticket: #7477

tests/ldap-abandon/Makefile [new file with mode: 0644]
tests/ldap-abandon/README.md [new file with mode: 0644]
tests/ldap-abandon/ldap.pcap [new file with mode: 0644]
tests/ldap-abandon/ldap.syn [new file with mode: 0644]
tests/ldap-abandon/test.yaml [new file with mode: 0644]

diff --git a/tests/ldap-abandon/Makefile b/tests/ldap-abandon/Makefile
new file mode 100644 (file)
index 0000000..318ba91
--- /dev/null
@@ -0,0 +1,3 @@
+ldap.pcap: ldap.syn
+       flowsynth.py -f pcap -w $@ $^
+
diff --git a/tests/ldap-abandon/README.md b/tests/ldap-abandon/README.md
new file mode 100644 (file)
index 0000000..d8007d2
--- /dev/null
@@ -0,0 +1,9 @@
+# Test Purpose
+
+Test that LDAP Abandon operation is parsed correctly.
+
+## PCAP
+
+This PCAP was generated with flowsynth using
+this documentation as a reference:
+https://ldap.com/ldapv3-wire-protocol-reference-abandon/
diff --git a/tests/ldap-abandon/ldap.pcap b/tests/ldap-abandon/ldap.pcap
new file mode 100644 (file)
index 0000000..68699ef
Binary files /dev/null and b/tests/ldap-abandon/ldap.pcap differ
diff --git a/tests/ldap-abandon/ldap.syn b/tests/ldap-abandon/ldap.syn
new file mode 100644 (file)
index 0000000..e012d5c
--- /dev/null
@@ -0,0 +1,2 @@
+flow default tcp 1.1.1.1:5555 > 2.2.2.2:389 (tcp.initialize; mss:9000;);
+default > (content:"\x30\x06\x02\x01\x06\x50\x01\x05";);
\ No newline at end of file
diff --git a/tests/ldap-abandon/test.yaml b/tests/ldap-abandon/test.yaml
new file mode 100644 (file)
index 0000000..63fc1d4
--- /dev/null
@@ -0,0 +1,15 @@
+requires:
+  min-version: 8
+
+args:
+  - -k none
+
+pcap: ldap.pcap
+
+checks:
+  - filter:
+      count: 1
+      match:
+        event_type: ldap
+        ldap.request.message_id: 6
+        ldap.request.operation: abandon_request