]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
dcerpc: test for bug 4198
authorShivani Bhardwaj <shivanib134@gmail.com>
Sat, 20 Feb 2021 14:46:31 +0000 (20:16 +0530)
committerVictor Julien <victor@inliniac.net>
Tue, 23 Feb 2021 20:03:24 +0000 (21:03 +0100)
tests/dcerpc/zerologon/input.pcap [new file with mode: 0644]
tests/dcerpc/zerologon/test.rules [new file with mode: 0644]
tests/dcerpc/zerologon/test.yaml [new file with mode: 0644]

diff --git a/tests/dcerpc/zerologon/input.pcap b/tests/dcerpc/zerologon/input.pcap
new file mode 100644 (file)
index 0000000..a158c5d
Binary files /dev/null and b/tests/dcerpc/zerologon/input.pcap differ
diff --git a/tests/dcerpc/zerologon/test.rules b/tests/dcerpc/zerologon/test.rules
new file mode 100644 (file)
index 0000000..9b886d4
--- /dev/null
@@ -0,0 +1,2 @@
+alert dcerpc any any -> any ![139,445] (msg:"Possible Zerologon Attempt"; flow:established,to_server; dce_opnum:26; content:"|00 00 00 00 00 00 00 00 ff ff 2f 21|"; endswith; reference:url,https://github.com/corelight/zerologon; classtype:attempted-admin; sid:20166330; rev:2;)
+alert dcerpc any any -> any ![139,445] (msg:"Possible Zerologon Password Reset"; flow:established,to_server; dce_opnum:30; content:"|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|"; endswith; reference:url,https://github.com/corelight/zerologon; classtype:attempted-admin; sid:20166331; rev:2;)
diff --git a/tests/dcerpc/zerologon/test.yaml b/tests/dcerpc/zerologon/test.yaml
new file mode 100644 (file)
index 0000000..91a7409
--- /dev/null
@@ -0,0 +1,33 @@
+requires:
+  features:
+    - HAVE_LIBJANSSON
+  min-version: 6.0.0
+
+args:
+ - -k none
+
+checks:
+  - filter:
+      count: 21
+      match:
+        event_type: alert
+        alert:
+          gid: 1
+          signature_id: 20166330
+          rev: 2
+          signature: "Possible Zerologon Attempt"
+          category: Attempted Administrator Privilege Gain
+          severity: 1
+          action: "allowed"
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert:
+          gid: 1
+          signature_id: 20166331
+          rev: 2
+          signature: "Possible Zerologon Password Reset"
+          category: Attempted Administrator Privilege Gain
+          severity: 1
+          action: "allowed"