def rule(event):
    if all(
        [
            event.deep_get("ParentImage", default="").endswith("\\spoolsv.exe"),
            event.deep_get("IntegrityLevel", default="") in ["System", "S-1-16-16384"],
            any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\gpupdate.exe"),
                            event.deep_get("Image", default="").endswith("\\whoami.exe"),
                            event.deep_get("Image", default="").endswith("\\nltest.exe"),
                            event.deep_get("Image", default="").endswith("\\taskkill.exe"),
                            event.deep_get("Image", default="").endswith("\\wmic.exe"),
                            event.deep_get("Image", default="").endswith("\\taskmgr.exe"),
                            event.deep_get("Image", default="").endswith("\\sc.exe"),
                            event.deep_get("Image", default="").endswith("\\findstr.exe"),
                            event.deep_get("Image", default="").endswith("\\curl.exe"),
                            event.deep_get("Image", default="").endswith("\\wget.exe"),
                            event.deep_get("Image", default="").endswith("\\certutil.exe"),
                            event.deep_get("Image", default="").endswith("\\bitsadmin.exe"),
                            event.deep_get("Image", default="").endswith("\\accesschk.exe"),
                            event.deep_get("Image", default="").endswith("\\wevtutil.exe"),
                            event.deep_get("Image", default="").endswith("\\bcdedit.exe"),
                            event.deep_get("Image", default="").endswith("\\fsutil.exe"),
                            event.deep_get("Image", default="").endswith("\\cipher.exe"),
                            event.deep_get("Image", default="").endswith("\\schtasks.exe"),
                            event.deep_get("Image", default="").endswith("\\write.exe"),
                            event.deep_get("Image", default="").endswith("\\wuauclt.exe"),
                            event.deep_get("Image", default="").endswith("\\systeminfo.exe"),
                            event.deep_get("Image", default="").endswith("\\reg.exe"),
                            event.deep_get("Image", default="").endswith("\\query.exe"),
                        ]
                    ),
                    all(
                        [
                            any(
                                [
                                    event.deep_get("Image", default="").endswith("\\net.exe"),
                                    event.deep_get("Image", default="").endswith("\\net1.exe"),
                                ]
                            ),
                            not "start" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    all(
                        [
                            event.deep_get("Image", default="").endswith("\\cmd.exe"),
                            not any(
                                [
                                    ".spl" in event.deep_get("CommandLine", default=""),
                                    "route add" in event.deep_get("CommandLine", default=""),
                                    "program files" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                    all(
                        [
                            event.deep_get("Image", default="").endswith("\\netsh.exe"),
                            not any(
                                [
                                    "add portopening" in event.deep_get("CommandLine", default=""),
                                    "rule name" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                    all(
                        [
                            any(
                                [
                                    event.deep_get("Image", default="").endswith(
                                        "\\powershell.exe"
                                    ),
                                    event.deep_get("Image", default="").endswith("\\pwsh.exe"),
                                ]
                            ),
                            not ".spl" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    all(
                        [
                            any(
                                [
                                    event.deep_get("Image", default="").endswith("\\rundll32.exe"),
                                    event.deep_get("OriginalFileName", default="")
                                    == "RUNDLL32.EXE",
                                ]
                            ),
                            event.deep_get("CommandLine", default="").endswith("rundll32.exe"),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
