-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: add rule type check for flowbits v5 #1512
Closed
hadiqaalamdar
wants to merge
1
commit into
OISF:master
from
hadiqaalamdar:sv-detect-flowbits-6309-v5
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,11 @@ | ||
alert ip any any -> any any (msg:"Flowbit set"; flowbits:set,fb1; sid:1;) | ||
alert ip any any -> any any (msg:"Flowbit set"; flowbits:set,fb2; sid:2;) | ||
alert ip any any -> any any (msg:"Flowbit isset ored flowbits"; flowbits:isset,fb1|fb2; sid:3;) | ||
alert ip any any -> any any (msg:"Flowbit isset ored flowbits"; flowbits:isset,fb3|fb1; sid:4;) | ||
alert ip any any -> any any (msg:"Flowbit isset ored flowbits"; flowbits:isset,fb3|fb4; sid:5;) | ||
alert ip any any -> any any (msg:"Flowbit isnotset ored flowbits"; flowbits:isnotset,fb5|fb6 ; sid:6;) | ||
alert ip any any -> any any (msg:"Flowbit isnotset ored flowbits"; flowbits:isnotset, fb1|fb2 ; sid:7;) | ||
alert ip any any -> any any (msg:"Flowbit unset"; flowbits:unset,fb1; sid:8;) | ||
alert ip any any -> any any (msg:"Flowbit toggle"; flowbits:toggle,fb1; sid:9;) | ||
alert ip any any -> any any (msg:"Flowbit isset"; flowbits:isset,fb1; sid:10;) | ||
alert ip any any -> any any (msg:"Noalert"; flowbits:noalert; content:"GET "; sid:11;) |
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,100 @@ | ||
requires: | ||
min-version: 7.0.0 | ||
pcap: false | ||
|
||
args: | ||
- --engine-analysis | ||
|
||
checks: | ||
- filter: | ||
filename: rules.json | ||
count: 1 | ||
match: | ||
id: 1 | ||
lists.postmatch.matches[0].name: "flowbits" | ||
lists.postmatch.matches[0].flowbits.cmd: "set" | ||
lists.postmatch.matches[0].flowbits.names[0]: "fb1" | ||
- filter: | ||
filename: rules.json | ||
count: 1 | ||
match: | ||
id: 2 | ||
lists.postmatch.matches[0].name: "flowbits" | ||
lists.postmatch.matches[0].flowbits.cmd: "set" | ||
lists.postmatch.matches[0].flowbits.names[0]: "fb2" | ||
- filter: | ||
filename: rules.json | ||
count: 1 | ||
match: | ||
id: 3 | ||
lists.packet.matches[0].name: "flowbits" | ||
lists.packet.matches[0].flowbits.cmd: "isset" | ||
lists.packet.matches[0].flowbits.names[0]: "fb1" | ||
lists.packet.matches[0].flowbits.names[1]: "fb2" | ||
- filter: | ||
filename: rules.json | ||
count: 1 | ||
match: | ||
id: 4 | ||
lists.packet.matches[0].name: "flowbits" | ||
lists.packet.matches[0].flowbits.cmd: "isset" | ||
lists.packet.matches[0].flowbits.names[0]: "fb3" | ||
lists.packet.matches[0].flowbits.names[1]: "fb1" | ||
- filter: | ||
filename: rules.json | ||
count: 1 | ||
match: | ||
id: 5 | ||
lists.packet.matches[0].name: "flowbits" | ||
lists.packet.matches[0].flowbits.cmd: "isset" | ||
lists.packet.matches[0].flowbits.names[0]: "fb3" | ||
lists.packet.matches[0].flowbits.names[1]: "fb4" | ||
- filter: | ||
filename: rules.json | ||
count: 1 | ||
match: | ||
id: 6 | ||
lists.packet.matches[0].name: "flowbits" | ||
lists.packet.matches[0].flowbits.cmd: "isnotset" | ||
lists.packet.matches[0].flowbits.names[0]: "fb5" | ||
lists.packet.matches[0].flowbits.names[1]: "fb6" | ||
- filter: | ||
filename: rules.json | ||
count: 1 | ||
match: | ||
id: 7 | ||
lists.packet.matches[0].name: "flowbits" | ||
lists.packet.matches[0].flowbits.cmd: "isnotset" | ||
lists.packet.matches[0].flowbits.names[0]: "fb1" | ||
lists.packet.matches[0].flowbits.names[1]: "fb2" | ||
- filter: | ||
filename: rules.json | ||
count: 1 | ||
match: | ||
id: 8 | ||
lists.postmatch.matches[0].name: "flowbits" | ||
lists.postmatch.matches[0].flowbits.cmd: "unset" | ||
lists.postmatch.matches[0].flowbits.names[0]: "fb1" | ||
- filter: | ||
filename: rules.json | ||
count: 1 | ||
match: | ||
id: 9 | ||
lists.postmatch.matches[0].name: "flowbits" | ||
lists.postmatch.matches[0].flowbits.cmd: "toggle" | ||
lists.postmatch.matches[0].flowbits.names[0]: "fb1" | ||
- filter: | ||
filename: rules.json | ||
count: 1 | ||
match: | ||
id: 10 | ||
lists.packet.matches[0].name: "flowbits" | ||
lists.packet.matches[0].flowbits.cmd: "isset" | ||
lists.packet.matches[0].flowbits.names[0]: "fb1" | ||
- filter: | ||
filename: rules.json | ||
count: 1 | ||
match: | ||
id: 11 | ||
lists.packet.matches[0].name: "flowbits" | ||
lists.packet.matches[0].flowbits.action: "noalert" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, let's keep
min-version: 8.0
, as we're not sure if we will bring this work to suricata 7, yet :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it.