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

Adds a test about flow.pkts_toclient keyword #1267

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

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

PCAP
====

Pcap found in the Bro github https://github.com/bro/bro/blob/master/testing/btest/Traces/tunnels/Teredo.pcap

1 change: 1 addition & 0 deletions tests/detect-flow-pkts/test.rules
Original file line number Diff line number Diff line change
@@ -0,0 +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;)
14 changes: 14 additions & 0 deletions tests/detect-flow-pkts/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
requires:
min-version: 7

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

args:
- -k none

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