]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
sip: adds checks for stat code keyword 2136/head
authorPhilippe Antoine <pantoine@oisf.net>
Wed, 2 Oct 2024 09:06:09 +0000 (11:06 +0200)
committerVictor Julien <victor@inliniac.net>
Sun, 24 Nov 2024 10:18:08 +0000 (11:18 +0100)
Ticket: 7295

Ensures that stat-code and method do not share the same buffer
in different directions

tests/sip-method/test.rules
tests/sip-method/test.yaml
tests/sip-stat-code/test.rules
tests/sip-stat-code/test.yaml

index 1fd849f78d19c03f3622a63c5f3b3c42c526140d..af25bc77291f45f35f23f5e61d7b10922e0c4a61 100644 (file)
@@ -1 +1,2 @@
 alert sip any any -> any any (flow:to_server; sip.method; content:"REGISTER"; sid:1;)
+alert sip any any -> any any (sip.stat_code; content:"REGISTER"; sid:2;)
index 53bcefc01d00c030ece1ecba6eb7e5e4fe55ab46..dc443f742ecdc836612ed7e220494214a3fec4e7 100644 (file)
@@ -14,3 +14,9 @@ checks:
       count: 18
       match:
         event_type: alert
+  - filter:
+  # only sid 1 triggered the 7 alerts
+      count: 18
+      match:
+        event_type: alert
+        alert.signature_id: 1
\ No newline at end of file
index 0a2e46c0fab648ba71184a2bc59f34c08aea7a53..609c74c239f8cff2451d44d8b9f126dea017e3de 100644 (file)
@@ -1 +1,2 @@
 alert sip any any -> any any (flow:to_client; sip.stat_code; content:"100"; sid:1;)
+alert sip any any -> any any (sip.method; content:"100"; sid:2;)
index 281716af94fcfa5762ee592c6ff0b7841a473bea..a83e9dcc851f4a0cf1d0b5ab6d629de225038f94 100644 (file)
@@ -14,3 +14,9 @@ checks:
       count: 7
       match:
         event_type: alert
+  - filter:
+  # only sid 1 triggered the 7 alerts
+      count: 7
+      match:
+        event_type: alert
+        alert.signature_id: 1
\ No newline at end of file