def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("ParentImage", default="").endswith("\\winlogon.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\services.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\lsass.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\csrss.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\smss.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\wininit.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\spoolsv.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\searchindexer.exe"),
                ]
            ),
            any(
                [
                    "AUTHORI" in event.deep_get("User", default=""),
                    "AUTORI" in event.deep_get("User", default=""),
                ]
            ),
            any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\powershell.exe"),
                            event.deep_get("Image", default="").endswith("\\pwsh.exe"),
                            event.deep_get("Image", default="").endswith("\\cmd.exe"),
                        ]
                    ),
                    event.deep_get("OriginalFileName", default="")
                    in ["PowerShell.EXE", "pwsh.dll", "Cmd.Exe"],
                ]
            ),
            not all(
                [
                    " route " in event.deep_get("CommandLine", default=""),
                    " ADD " in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
