-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add tests for smb.version keyword
Signed-off-by: jason taylor <[email protected]>
- Loading branch information
1 parent
e338b7b
commit 500c99e
Showing
7 changed files
with
42 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,4 @@ | ||
TEST | ||
==== | ||
|
||
Test invalid smb.version keyword syntax in signature |
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 @@ | ||
alert smb any any -> any any (msg:"Two smb version declarations"; flow:established; smb.version:2; smb.version:1; sid:1;) |
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,14 @@ | ||
requires: | ||
min-version: 7 | ||
|
||
args: | ||
- -k none | ||
|
||
pcap: ../smb-version-keyword/input.pcap | ||
|
||
checks: | ||
- shell: | ||
args: grep "Can't use 2 or more smb.version declarations" suricata.log | wc -l | xargs | ||
expect: 1 | ||
|
||
exit-code: 1 |
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,4 @@ | ||
TEST | ||
==== | ||
|
||
Test smb.version keyword |
Binary file not shown.
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 smb any any -> any any (msg:"SMBv1 Request"; flow:established; smb.version:1; sid:1;) | ||
alert smb any any -> any any (msg:"SMBv2 Request"; flow:established; smb.version:2; 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,17 @@ | ||
requires: | ||
min-version: 7 | ||
|
||
args: | ||
- -k none | ||
|
||
checks: | ||
- filter: | ||
count: 2 | ||
match: | ||
event_type: alert | ||
alert.signature_id: 1 | ||
- filter: | ||
count: 14 | ||
match: | ||
event_type: alert | ||
alert.signature_id: 2 |