def rule(event):
    if all(
        [
            "/php" in event.deep_get("Image", default=""),
            " -r " in event.deep_get("CommandLine", default=""),
            "fsockopen" in event.deep_get("CommandLine", default=""),
            any(
                [
                    "ash" in event.deep_get("CommandLine", default=""),
                    "bash" in event.deep_get("CommandLine", default=""),
                    "bsh" in event.deep_get("CommandLine", default=""),
                    "csh" in event.deep_get("CommandLine", default=""),
                    "ksh" in event.deep_get("CommandLine", default=""),
                    "pdksh" in event.deep_get("CommandLine", default=""),
                    "sh" in event.deep_get("CommandLine", default=""),
                    "tcsh" in event.deep_get("CommandLine", default=""),
                    "zsh" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
