From de905c2410ad2d63ca33d7601c33e43a4e65efb8 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 18 Jan 2021 18:01:54 +0100 Subject: [PATCH] tests: add ERSPAN II test --- tests/decode-erspan-typeII-01/README.md | 4 ++ tests/decode-erspan-typeII-01/input.pcap | Bin 0 -> 1679 bytes tests/decode-erspan-typeII-01/test.rules | 2 + tests/decode-erspan-typeII-01/test.yaml | 49 +++++++++++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 tests/decode-erspan-typeII-01/README.md create mode 100644 tests/decode-erspan-typeII-01/input.pcap create mode 100644 tests/decode-erspan-typeII-01/test.rules create mode 100644 tests/decode-erspan-typeII-01/test.yaml diff --git a/tests/decode-erspan-typeII-01/README.md b/tests/decode-erspan-typeII-01/README.md new file mode 100644 index 000000000..463b816b4 --- /dev/null +++ b/tests/decode-erspan-typeII-01/README.md @@ -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 index 0000000000000000000000000000000000000000..100acd791364ea37ebd00defcb924db5bbc0b254 GIT binary patch literal 1679 zc-rlg&ui0A9KgRXY1deS%prC#l;=Tcp=pz5t8Gt~E|cPZNHe?MN|t78U`oU>UynKwVf0$J5DVXjW!yMh)$UzdbJXDNL<~G z@Mo&Erfsg49URm{SV|`1LQIroyxhd@OQ_AdV^r#d-_j!_yizmQj1pEg2g{-`r`ZCD zmXawkL31j4%{E{J#yYoQQV&TK#XK-@h87Q@Hh2O6Ea`!(=Bl=AI*L;^Y|C(@NK7W0 zI1+aed~n)tSup;-h2R35>(8D5FKiQ+KV}%%As%=B 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 index 000000000..36eaf2df2 --- /dev/null +++ b/tests/decode-erspan-typeII-01/test.yaml @@ -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 -- 2.47.2