def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("ParentImage", default="").endswith("\\tomcat8.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\tomcat9.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\tomcat10.exe"),
                ]
            ),
            "confluence" in event.deep_get("ParentCommandLine", default=""),
            any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\cmd.exe"),
                            event.deep_get("Image", default="").endswith("\\powershell.exe"),
                        ]
                    ),
                    event.deep_get("OriginalFileName", default="") in ["Cmd.Exe", "PowerShell.EXE"],
                ]
            ),
        ]
    ):
        return True
    return False
