Skip to content

Commit

Permalink
Adds a test about flow.pkts_toclient keyword
Browse files Browse the repository at this point in the history
And the similar keywords about packets and bytes of a flow
  • Loading branch information
catenacyber committed Aug 30, 2023
1 parent e338b7b commit cfe6e05
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
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

0 comments on commit cfe6e05

Please sign in to comment.