diff --git a/tests/enip-alert/test.yaml b/tests/enip-alert/test.yaml index cdf4f19d3..84c37e639 100644 --- a/tests/enip-alert/test.yaml +++ b/tests/enip-alert/test.yaml @@ -3,7 +3,7 @@ requires: # disables checksum verification args: -- -k none --set stream.midstream=true --set app-layer.protocols.enip.enabled=yes +- -k none --set app-layer.protocols.enip.enabled=yes checks: - filter: diff --git a/tests/enip-keywords/test.yaml b/tests/enip-keywords/test.yaml index af188cda7..d114df964 100644 --- a/tests/enip-keywords/test.yaml +++ b/tests/enip-keywords/test.yaml @@ -2,15 +2,24 @@ requires: min-version: 7 # disables checksum verification +# use stream inline to match Wireshark as last packet does not get acked args: -- -k none --set stream.midstream=true --set app-layer.protocols.enip.enabled=yes +- -k none --set stream.inline=true --set stream.midstream=true --set app-layer.protocols.enip.enabled=yes checks: - filter: + lt-version: 8 count: 41 match: event_type: alert alert.signature_id: 1 + - filter: + # version 8 also works on responses + min-version: 8 + count: 81 + match: + event_type: alert + alert.signature_id: 1 - filter: count: 267 match: diff --git a/tests/enip-log/README.md b/tests/enip-log/README.md new file mode 100644 index 000000000..2059f843e --- /dev/null +++ b/tests/enip-log/README.md @@ -0,0 +1,8 @@ +# Description + +Test ENIP logging +And enip_command keyword with enumeration string + +# PCAP + +The pcap comes from https://redmine.openinfosecfoundation.org/issues/3886 diff --git a/tests/enip-log/suricata.yaml b/tests/enip-log/suricata.yaml new file mode 100644 index 000000000..8c467785c --- /dev/null +++ b/tests/enip-log/suricata.yaml @@ -0,0 +1,19 @@ +%YAML 1.1 +--- + +outputs: + - eve-log: + enabled: yes + filetype: regular #regular|syslog|unix_dgram|unix_stream|redis + filename: eve.json + + types: + - alert + - anomaly + - enip + - flow + +app-layer: + protocols: + enip: + enabled: yes diff --git a/tests/enip-log/test.rules b/tests/enip-log/test.rules new file mode 100644 index 000000000..db36f4335 --- /dev/null +++ b/tests/enip-log/test.rules @@ -0,0 +1 @@ +alert enip any any -> any any (msg:"SURICATA enip test command string";enip_command:ListIdentity ; sid:1;) diff --git a/tests/enip-log/test.yaml b/tests/enip-log/test.yaml new file mode 100644 index 000000000..f154c1814 --- /dev/null +++ b/tests/enip-log/test.yaml @@ -0,0 +1,21 @@ +requires: + min-version: 8 + +pcap: ../enip-alert/enip_test1.pcap + +# disables checksum verification +args: +- -k none + +checks: + - filter: + count: 2 + match: + event_type: alert + alert.signature_id: 1 + - filter: + count: 1 + match: + event_type: enip + enip.request.command: ListIdentity + enip.response.status: Success