def rule(event):
    if all(
        [
            event.deep_get("ParentImage", default="").endswith("\\mshta.exe"),
            any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\cmd.exe"),
                            event.deep_get("Image", default="").endswith("\\powershell.exe"),
                            event.deep_get("Image", default="").endswith("\\pwsh.exe"),
                            event.deep_get("Image", default="").endswith("\\wscript.exe"),
                            event.deep_get("Image", default="").endswith("\\cscript.exe"),
                            event.deep_get("Image", default="").endswith("\\sh.exe"),
                            event.deep_get("Image", default="").endswith("\\bash.exe"),
                            event.deep_get("Image", default="").endswith("\\reg.exe"),
                            event.deep_get("Image", default="").endswith("\\regsvr32.exe"),
                            event.deep_get("Image", default="").endswith("\\bitsadmin.exe"),
                        ]
                    ),
                    event.deep_get("OriginalFileName", default="")
                    in [
                        "Cmd.Exe",
                        "PowerShell.EXE",
                        "pwsh.dll",
                        "wscript.exe",
                        "cscript.exe",
                        "Bash.exe",
                        "reg.exe",
                        "REGSVR32.EXE",
                        "bitsadmin.exe",
                    ],
                ]
            ),
        ]
    ):
        return True
    return False
