Signed-off-by: jason taylor <jtfas90@gmail.com>
+++ /dev/null
-
-alert tcp any any -> any any (msg:"SMB1 Request"; smb.version:1;sid:1;)
-alert tcp any any -> any any (msg:"SMB2 Request"; smb.version:2;sid:2;)
--- /dev/null
+TEST
+====
+
+Test invalid smb.version keyword syntax in signature
--- /dev/null
+alert smb any any -> any any (msg:"Two smb version declarations"; flow:established; smb.version:2; smb.version:1; sid:1;)
--- /dev/null
+requires:
+ min-version: 7
+
+args:
+- -k none
+
+pcap: ../smb-version-keyword/input.pcap
+
+checks:
+- shell:
+ args: grep "Can't use 2 or more smb.version declarations" suricata.log | wc -l | xargs
+ expect: 1
+
+exit-code: 1
--- /dev/null
+Test
+====
+
+Test alerts with the smb.version keyword
+
+PCAP
+----
+
+The pcap is a sample of network traffic provided by the original author.
+
+Related Issues
+--------------
+
+https://redmine.openinfosecfoundation.org/issues/5075
--- /dev/null
+alert smb any any -> any any (msg:"SMBv1 Request"; smb.version:1; sid:1;)
+alert smb any any -> any any (msg:"SMBv2 Request"; smb.version:2; sid:2;)