]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
Add test about enip keywords
authorPhilippe Antoine <contact@catenacyber.fr>
Thu, 9 Dec 2021 10:13:49 +0000 (11:13 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 13 Dec 2021 06:28:20 +0000 (07:28 +0100)
tests/enip-keywords/README.md [new file with mode: 0644]
tests/enip-keywords/enip_cip_example.pcap [new file with mode: 0644]
tests/enip-keywords/test.rules [new file with mode: 0644]
tests/enip-keywords/test.yaml [new file with mode: 0644]

diff --git a/tests/enip-keywords/README.md b/tests/enip-keywords/README.md
new file mode 100644 (file)
index 0000000..bb85823
--- /dev/null
@@ -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 (file)
index 0000000..460a6b2
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 (file)
index 0000000..8892e1c
--- /dev/null
@@ -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 (file)
index 0000000..0b9a098
--- /dev/null
@@ -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