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

Flow bytes pkts either/v2 #2079

Closed
wants to merge 2 commits 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
13 changes: 13 additions & 0 deletions tests/detect-flow-pkts-either/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Test
====

Test `flow.pkts:either`.. and `flow.bytes:either`.. keywords

PCAP
====

From existing s-v test.

Related tickets
==============
https://redmine.openinfosecfoundation.org/issues/5646
1 change: 1 addition & 0 deletions tests/detect-flow-pkts-either/test.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alert ip any any -> any any (msg:"Flow has more than 3000 bytes and 10 pkts in either direction";flow.pkts:either,=10;flow.bytes:either,>3000; sid:1;)
14 changes: 14 additions & 0 deletions tests/detect-flow-pkts-either/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
requires:
min-version: 8

pcap: ../decode-teredo-01/input.pcap

args:
- -k none

checks:
- filter:
count: 3
match:
event_type: alert
alert.signature_id: 1
2 changes: 1 addition & 1 deletion tests/detect-flow-pkts/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Test
====

Test `flow.pkts_toclient` and alike (bytes, server) keywords
Test `flow.pkts:toclient`.. and alike (bytes, server) keywords

PCAP
====
Expand Down
2 changes: 1 addition & 1 deletion tests/detect-flow-pkts/test.rules
Original file line number Diff line number Diff line change
@@ -1 +1 @@
alert ip any any -> any any (msg:"Flow has 10 packets"; flow.pkts_toclient:10; flow.pkts_toserver:10; flow.bytes_toserver:<3000; flow.bytes_toclient:>8000; sid:1;)
alert ip any any -> any any (msg:"Flow has 10 packets"; flow.pkts:toclient,10; flow.pkts:toserver,=10; flow.bytes:toserver,<3000; flow.bytes:toclient,>8000; sid:1;)
Loading