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

Add test about enip stats with _udp prefix #1547

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
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
Loading