From: Philippe Antoine Date: Thu, 9 Dec 2021 10:13:49 +0000 (+0100) Subject: Add test about enip keywords X-Git-Tag: suricata-6.0.5~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62204b6023c5eedeafecb7fcbc083a0cb1ea9cd4;p=thirdparty%2Fsuricata-verify.git Add test about enip keywords --- diff --git a/tests/enip-keywords/README.md b/tests/enip-keywords/README.md new file mode 100644 index 000000000..bb85823ae --- /dev/null +++ b/tests/enip-keywords/README.md @@ -0,0 +1,7 @@ +# Description + +Test ENIP keywords + +# PCAP + +The pcap comes from https://github.com/cisagov/icsnpp-enip/blob/main/examples/enip_cip_example.pcap diff --git a/tests/enip-keywords/enip_cip_example.pcap b/tests/enip-keywords/enip_cip_example.pcap new file mode 100644 index 000000000..460a6b231 Binary files /dev/null and b/tests/enip-keywords/enip_cip_example.pcap differ diff --git a/tests/enip-keywords/test.rules b/tests/enip-keywords/test.rules new file mode 100644 index 000000000..8892e1cae --- /dev/null +++ b/tests/enip-keywords/test.rules @@ -0,0 +1,2 @@ +alert ip any any -> any any (cip_service: 10; sid:1; ) +alert ip any any -> any any (enip_command: 112; sid:2; ) diff --git a/tests/enip-keywords/test.yaml b/tests/enip-keywords/test.yaml new file mode 100644 index 000000000..0b9a09800 --- /dev/null +++ b/tests/enip-keywords/test.yaml @@ -0,0 +1,18 @@ +requires: + min-version: 7 + +# disables checksum verification +args: +- -k none --set stream.midstream=true --set app-layer.protocols.enip.enabled=yes + +checks: + - filter: + count: 41 + match: + event_type: alert + alert.signature_id: 1 + - filter: + count: 267 + match: + event_type: alert + alert.signature_id: 2