Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/detect-ldap-dn/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Test ldap.request.dn and
ldap.responses.dn keywords.

PCAP from ../ldap-search/ldap.pcap

Redmine ticket: https://redmine.openinfosecfoundation.org/issues/7471
2 changes: 2 additions & 0 deletions tests/detect-ldap-dn/test.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alert ldap any any -> any any (msg:"Test ldap request dn"; ldap.request.dn; content:"dc=example,dc=com"; startswith; endswith; sid:1;)
alert ldap any any -> any any (msg:"Test ldap responses dn"; ldap.responses.dn; content:"dc=example,dc=com"; startswith; endswith; sid:2;)
25 changes: 25 additions & 0 deletions tests/detect-ldap-dn/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
requires:
min-version: 8

pcap: ../ldap-search/ldap.pcap

args:
- -k none --set stream.inline=true

checks:
- filter:
count: 1
match:
event_type: alert
pcap_cnt: 4
ldap.request.operation: search_request
ldap.request.search_request.base_object: dc=example,dc=com
alert.signature_id: 1
- filter:
count: 1
match:
event_type: alert
pcap_cnt: 6
ldap.responses[0].operation: search_result_entry
ldap.responses[0].search_result_entry.base_object: dc=example,dc=com
alert.signature_id: 2
Loading