def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("/rsync"),
                    event.deep_get("Image", default="").endswith("/rsyncd"),
                ]
            ),
            " -e " in event.deep_get("CommandLine", default=""),
            any(
                [
                    "/ash " in event.deep_get("CommandLine", default=""),
                    "/bash " in event.deep_get("CommandLine", default=""),
                    "/dash " in event.deep_get("CommandLine", default=""),
                    "/csh " in event.deep_get("CommandLine", default=""),
                    "/sh " in event.deep_get("CommandLine", default=""),
                    "/zsh " in event.deep_get("CommandLine", default=""),
                    "/tcsh " in event.deep_get("CommandLine", default=""),
                    "/ksh " in event.deep_get("CommandLine", default=""),
                    "'ash " in event.deep_get("CommandLine", default=""),
                    "'bash " in event.deep_get("CommandLine", default=""),
                    "'dash " in event.deep_get("CommandLine", default=""),
                    "'csh " in event.deep_get("CommandLine", default=""),
                    "'sh " in event.deep_get("CommandLine", default=""),
                    "'zsh " in event.deep_get("CommandLine", default=""),
                    "'tcsh " in event.deep_get("CommandLine", default=""),
                    "'ksh " in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
