]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
nsh: add minimal detect testing 392/head
authorVictor Julien <victor@inliniac.net>
Thu, 31 Dec 2020 11:36:41 +0000 (12:36 +0100)
committerVictor Julien <victor@inliniac.net>
Thu, 31 Dec 2020 11:36:41 +0000 (12:36 +0100)
tests/decode-nsh-type1/test.rules [new file with mode: 0644]
tests/decode-nsh-type1/test.yaml
tests/decode-nsh-type2/test.rules [new file with mode: 0644]
tests/decode-nsh-type2/test.yaml

diff --git a/tests/decode-nsh-type1/test.rules b/tests/decode-nsh-type1/test.rules
new file mode 100644 (file)
index 0000000..9ccfe57
--- /dev/null
@@ -0,0 +1 @@
+alert udp any any -> any any (content:"data|0a 0a|"; startswith; endswith; sid:1;)
index 4588cd4417064bbfd64d564dcd96ae8b5f6fc84f..0e3e9e9e85eaeb7bd89cb5aca42cdd0e39b16fc7 100644 (file)
@@ -5,6 +5,16 @@ args:
 - -k none
 
 checks:
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        src_ip: 10.0.0.1
+        dest_ip: 10.0.0.2
+        proto: UDP
+        src_port: 52377
+        dest_port: 52464
+        alert.signature_id: 1
   - filter:
       count: 1
       match:
diff --git a/tests/decode-nsh-type2/test.rules b/tests/decode-nsh-type2/test.rules
new file mode 100644 (file)
index 0000000..9ccfe57
--- /dev/null
@@ -0,0 +1 @@
+alert udp any any -> any any (content:"data|0a 0a|"; startswith; endswith; sid:1;)
index 4588cd4417064bbfd64d564dcd96ae8b5f6fc84f..0e3e9e9e85eaeb7bd89cb5aca42cdd0e39b16fc7 100644 (file)
@@ -5,6 +5,16 @@ args:
 - -k none
 
 checks:
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        src_ip: 10.0.0.1
+        dest_ip: 10.0.0.2
+        proto: UDP
+        src_port: 52377
+        dest_port: 52464
+        alert.signature_id: 1
   - filter:
       count: 1
       match: