Skip to content
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

detect/bytemath: Test multiplier operator #1244

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tests/detect-bytemath-mult-04/README.md
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]
jasonish marked this conversation as resolved.
Show resolved Hide resolved

Redmine ticket
==============
https://redmine.openinfosecfoundation.org/issues/6070
6 changes: 6 additions & 0 deletions tests/detect-bytemath-mult-04/test.rules
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, 5, extracted_val, relative; \
byte_math: bytes 1, offset 1, oper *,rvalue extracted_val, result var; \
byte_test: 1, = , var, 1; \
sid: 1;)
11 changes: 11 additions & 0 deletions tests/detect-bytemath-mult-04/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
requires:
min-version: 6.0.12

pcap: ../detect-bytemath-01/input.pcap

checks:
- filter:
count: 1
match:
event_type: alert
alert.signature_id: 1