Skip to content

Commit

Permalink
Add test about enip stats with _udp prefix
Browse files Browse the repository at this point in the history
Ticket: 6304
  • Loading branch information
catenacyber committed Dec 14, 2023
1 parent 9a064c3 commit 6d9ead8
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/enip-stats-udp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Description

Test ENIP stats always have `_udp` or `_tcp` prefix

# Issue

https://redmine.openinfosecfoundation.org/issues/6304

# PCAP

The pcap is reused enip-alert test
18 changes: 18 additions & 0 deletions tests/enip-stats-udp/suricata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
%YAML 1.1
---

outputs:
- eve-log:
enabled: yes
filetype: regular
filename: eve.json
types:
- flow
- stats

app-layer:
protocols:
enip:
enabled: detection-only
detection-ports:
dp: 44818
28 changes: 28 additions & 0 deletions tests/enip-stats-udp/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
requires:
min-version: 8

pcap: ../enip-alert/enip_test1.pcap

# disables checksum verification
args:
- -k none

checks:
- filter:
count: 1
match:
event_type: flow
app_proto: enip
- filter:
count: 1
match:
event_type: stats
# not stats.app_layer.flow.enip
stats.app_layer.flow.enip_tcp: 1
stats.app_layer.flow.enip_udp: 0
- filter:
count: 0
match:
event_type: stats
# this key does not exist in eve output
stats.app_layer.flow.enip: 0

0 comments on commit 6d9ead8

Please sign in to comment.