def rule(event):
    if all(
        [
            any(
                [
                    any(
                        [
                            "\\j2ee\\cluster\\apps\\sap.com\\irj\\servlet_jsp\\irj\\work"
                            in event.deep_get("ParentImage", default=""),
                            "\\j2ee\\cluster\\apps\\sap.com\\irj\\servlet_jsp\\irj\\root"
                            in event.deep_get("ParentImage", default=""),
                        ]
                    ),
                    any(
                        [
                            "\\j2ee\\cluster\\apps\\sap.com\\irj\\servlet_jsp\\irj\\work"
                            in event.deep_get("CurrentDirectory", default=""),
                            "\\j2ee\\cluster\\apps\\sap.com\\irj\\servlet_jsp\\irj\\root"
                            in event.deep_get("CurrentDirectory", default=""),
                        ]
                    ),
                ]
            ),
            any(
                [
                    event.deep_get("Image", default="").endswith("\\cmd.exe"),
                    event.deep_get("Image", default="").endswith("\\powershell.exe"),
                    event.deep_get("Image", default="").endswith("\\powershell_ise.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("\\regsvr32.exe"),
                    event.deep_get("Image", default="").endswith("\\rundll32.exe"),
                    event.deep_get("Image", default="").endswith("\\mshta.exe"),
                    event.deep_get("Image", default="").endswith("\\certutil.exe"),
                    event.deep_get("Image", default="").endswith("\\bitsadmin.exe"),
                    event.deep_get("Image", default="").endswith("\\python.exe"),
                ]
            ),
        ]
    ):
        return True
    return False
