]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
tests: add ERSPAN II test
authorVictor Julien <victor@inliniac.net>
Mon, 18 Jan 2021 17:01:54 +0000 (18:01 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 18 Jan 2021 18:25:45 +0000 (19:25 +0100)
tests/decode-erspan-typeII-01/README.md [new file with mode: 0644]
tests/decode-erspan-typeII-01/input.pcap [new file with mode: 0644]
tests/decode-erspan-typeII-01/test.rules [new file with mode: 0644]
tests/decode-erspan-typeII-01/test.yaml [new file with mode: 0644]

diff --git a/tests/decode-erspan-typeII-01/README.md b/tests/decode-erspan-typeII-01/README.md
new file mode 100644 (file)
index 0000000..463b816
--- /dev/null
@@ -0,0 +1,4 @@
+PCAP
+====
+
+Pcap found here https://www.cloudshark.org/captures/76ce4261df29
diff --git a/tests/decode-erspan-typeII-01/input.pcap b/tests/decode-erspan-typeII-01/input.pcap
new file mode 100644 (file)
index 0000000..100acd7
Binary files /dev/null and b/tests/decode-erspan-typeII-01/input.pcap differ
diff --git a/tests/decode-erspan-typeII-01/test.rules b/tests/decode-erspan-typeII-01/test.rules
new file mode 100644 (file)
index 0000000..5b34d4a
--- /dev/null
@@ -0,0 +1,2 @@
+alert icmp any any -> any any (itype:0; sid:1;)
+alert icmp any any -> any any (itype:8; prefilter; sid:2;)
diff --git a/tests/decode-erspan-typeII-01/test.yaml b/tests/decode-erspan-typeII-01/test.yaml
new file mode 100644 (file)
index 0000000..36eaf2d
--- /dev/null
@@ -0,0 +1,49 @@
+requires:
+  min-version: 6
+
+args:
+- -k none
+
+checks:
+- filter:
+    count: 1
+    match:
+      dest_ip: 23.0.0.3
+      event_type: flow
+      flow.age: 0
+      flow.alerted: true
+      flow.bytes_toclient: 244
+      flow.bytes_toserver: 244
+      flow.pkts_toclient: 2
+      flow.pkts_toserver: 2
+      flow.reason: shutdown
+      flow.state: established
+      icmp_code: 0
+      icmp_type: 8
+      proto: ICMP
+      response_icmp_code: 0
+      response_icmp_type: 0
+      src_ip: 23.0.0.2
+      vlan[0]: 23
+- filter:
+    count: 2
+    match:
+      dest_ip: 23.0.0.3
+      event_type: alert
+      icmp_code: 0
+      icmp_type: 8
+      proto: ICMP
+      src_ip: 23.0.0.2
+      vlan[0]: 23
+      alert.signature_id: 2
+- filter:
+    count: 2
+    match:
+      dest_ip: 23.0.0.2
+      event_type: alert
+      icmp_code: 0
+      icmp_type: 0
+      proto: ICMP
+      src_ip: 23.0.0.3
+      vlan[0]: 23
+      alert.signature_id: 1