def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("\\sc.exe"),
            "config" in event.deep_get("CommandLine", default=""),
            "binPath" in event.deep_get("CommandLine", default=""),
            any(
                [
                    "powershell" in event.deep_get("CommandLine", default=""),
                    "cmd " in event.deep_get("CommandLine", default=""),
                    "mshta" in event.deep_get("CommandLine", default=""),
                    "wscript" in event.deep_get("CommandLine", default=""),
                    "cscript" in event.deep_get("CommandLine", default=""),
                    "rundll32" in event.deep_get("CommandLine", default=""),
                    "svchost" in event.deep_get("CommandLine", default=""),
                    "dllhost" in event.deep_get("CommandLine", default=""),
                    "cmd.exe /c" in event.deep_get("CommandLine", default=""),
                    "cmd.exe /k" in event.deep_get("CommandLine", default=""),
                    "cmd.exe /r" in event.deep_get("CommandLine", default=""),
                    "cmd /c" in event.deep_get("CommandLine", default=""),
                    "cmd /k" in event.deep_get("CommandLine", default=""),
                    "cmd /r" in event.deep_get("CommandLine", default=""),
                    "C:\\Users\\Public" in event.deep_get("CommandLine", default=""),
                    "\\Downloads\\" in event.deep_get("CommandLine", default=""),
                    "\\Desktop\\" in event.deep_get("CommandLine", default=""),
                    "\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\"
                    in event.deep_get("CommandLine", default=""),
                    "C:\\Windows\\TEMP\\" in event.deep_get("CommandLine", default=""),
                    "\\AppData\\Local\\Temp" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
