Skip to content

Commit

Permalink
sip: adds checks for stat code keyword
Browse files Browse the repository at this point in the history
Ticket: 7295

Ensures that stat-code and method do not share the same buffer
in different directions
  • Loading branch information
catenacyber authored and victorjulien committed Nov 24, 2024
1 parent b195d4b commit a56568c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/sip-method/test.rules
Original file line number Diff line number Diff line change
@@ -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;)
6 changes: 6 additions & 0 deletions tests/sip-method/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions tests/sip-stat-code/test.rules
Original file line number Diff line number Diff line change
@@ -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;)
6 changes: 6 additions & 0 deletions tests/sip-stat-code/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a56568c

Please sign in to comment.