def rule(event):
    if all(
        [
            "\\PDQDeployRunner-" in event.deep_get("ParentImage", default=""),
            any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\bash.exe"),
                            event.deep_get("Image", default="").endswith("\\certutil.exe"),
                            event.deep_get("Image", default="").endswith("\\cmd.exe"),
                            event.deep_get("Image", default="").endswith("\\csc.exe"),
                            event.deep_get("Image", default="").endswith("\\cscript.exe"),
                            event.deep_get("Image", default="").endswith("\\dllhost.exe"),
                            event.deep_get("Image", default="").endswith("\\mshta.exe"),
                            event.deep_get("Image", default="").endswith("\\msiexec.exe"),
                            event.deep_get("Image", default="").endswith("\\regsvr32.exe"),
                            event.deep_get("Image", default="").endswith("\\rundll32.exe"),
                            event.deep_get("Image", default="").endswith("\\scriptrunner.exe"),
                            event.deep_get("Image", default="").endswith("\\wmic.exe"),
                            event.deep_get("Image", default="").endswith("\\wscript.exe"),
                            event.deep_get("Image", default="").endswith("\\wsl.exe"),
                        ]
                    ),
                    any(
                        [
                            ":\\ProgramData\\" in event.deep_get("Image", default=""),
                            ":\\Users\\Public\\" in event.deep_get("Image", default=""),
                            ":\\Windows\\TEMP\\" in event.deep_get("Image", default=""),
                            "\\AppData\\Local\\Temp" in event.deep_get("Image", default=""),
                        ]
                    ),
                    any(
                        [
                            " -decode " in event.deep_get("CommandLine", default=""),
                            " -enc " in event.deep_get("CommandLine", default=""),
                            " -encodedcommand " in event.deep_get("CommandLine", default=""),
                            " -w hidden" in event.deep_get("CommandLine", default=""),
                            "DownloadString" in event.deep_get("CommandLine", default=""),
                            "FromBase64String" in event.deep_get("CommandLine", default=""),
                            "http" in event.deep_get("CommandLine", default=""),
                            "iex " in event.deep_get("CommandLine", default=""),
                            "Invoke-" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
