-
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.
detect/bytemath: Test multiplier operator
Issue: 6070 This commit adds a test for the byte-math multiplication operator. The operator was missing from 6.0.x; however, this test applies to 6.0.x and later once the Suricata PR is merged.
- Loading branch information
Showing
4 changed files
with
26 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,11 @@ | ||
Description | ||
=========== | ||
Test byte_math multiplication operator | ||
|
||
PCAP | ||
==== | ||
PCAP comes from the suricata verify test[detect-bytemath-01] | ||
|
||
Redmine ticket | ||
============== | ||
https://redmine.openinfosecfoundation.org/issues/6070 |
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,6 @@ | ||
alert tcp any any -> any any (msg:"byte_math multiplication operator"; \ | ||
ipv4.hdr; \ | ||
byte_extract: 1, 0, extracted_val, relative; \ | ||
byte_math: bytes 1, offset 1, oper *,rvalue extracted_val, result var; \ | ||
byte_test: 1, != , var, 0; \ | ||
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,9 @@ | ||
requires: | ||
min-version: 6.0.12 | ||
|
||
checks: | ||
- filter: | ||
count: 1 | ||
match: | ||
event_type: alert | ||
alert.signature_id: 1 |