def rule(event):
    if all(
        [
            any(
                [
                    "tomcat" in event.deep_get("ParentImage", default=""),
                    any(
                        [
                            event.deep_get("ParentImage", default="").endswith("\\amigo.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\browser.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\chrome.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\firefox.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\httpd.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\iexplore.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\jbosssvc.exe"),
                            event.deep_get("ParentImage", default="").endswith(
                                "\\microsoftedge.exe"
                            ),
                            event.deep_get("ParentImage", default="").endswith(
                                "\\microsoftedgecp.exe"
                            ),
                            event.deep_get("ParentImage", default="").endswith(
                                "\\MicrosoftEdgeSH.exe"
                            ),
                            event.deep_get("ParentImage", default="").endswith("\\mshta.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\nginx.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\outlook.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\php-cgi.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\regsvr32.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\rundll32.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\safari.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\services.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\sqlagent.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\sqlserver.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\sqlservr.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\vivaldi.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\w3wp.exe"),
                        ]
                    ),
                ]
            ),
            any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\powershell.exe"),
                            event.deep_get("Image", default="").endswith("\\pwsh.exe"),
                        ]
                    ),
                    any(
                        [
                            "/c powershell" in event.deep_get("CommandLine", default=""),
                            "/c pwsh" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    event.deep_get("Description", default="") == "Windows PowerShell",
                    event.deep_get("Product", default="") == "PowerShell Core 6",
                    event.deep_get("OriginalFileName", default="")
                    in ["PowerShell.EXE", "pwsh.dll"],
                ]
            ),
        ]
    ):
        return True
    return False
