def rule(event):
    if any(
        [
            all(
                [
                    event.deep_get("ParentImage", default="").endswith("\\action1_agent.exe"),
                    "\\Windows\\Action1\\package_downloads\\"
                    in event.deep_get("Image", default=""),
                ]
            ),
            all(
                [
                    any(
                        [
                            event.deep_get("ParentImage", default="").endswith("\\cmd.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\powershell.exe"),
                        ]
                    ),
                    any(
                        [
                            "\\Action1\\scripts\\Run_Command_"
                            in event.deep_get("ParentCommandLine", default=""),
                            "\\Action1\\scripts\\Run_PowerShell_"
                            in event.deep_get("ParentCommandLine", default=""),
                        ]
                    ),
                ]
            ),
            event.deep_get("Image", default="").endswith("\\agent1_remote.exe"),
        ]
    ):
        return True
    return False
