forked from OISF/suricata-verify
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
detect: add test for flow.rate keyword
Feature 7438
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
alert tcp any any -> any any (msg:"Flow rate is 500 bytes per second"; flow.rate:500; sid:1;) | ||
pass tcp any any -> any any (msg:"Flow rate is greater than 5 mbytes per second"; flow.rate:>5mb; alert; sid:2;) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
requires: | ||
min-version: 8.0 | ||
pcap: false | ||
|
||
args: | ||
- --engine-analysis | ||
|
||
checks: | ||
- filter: | ||
filename: rules.json | ||
count: 1 | ||
match: | ||
id: 1 | ||
lists.packet.matches[0].name: "flow.rate" | ||
lists.packet.matches[0].flow_rate.equal: 500 | ||
- filter: | ||
filename: rules.json | ||
count: 1 | ||
match: | ||
id: 2 | ||
lists.packet.matches[0].name: "flow.rate" | ||
lists.packet.matches[0].flow_rate.gt: 5242880 |