def rule(event):
    if any(
        [
            all(
                [
                    event.deep_get("type", default="") == "EXECVE",
                    event.deep_get("a0", default="") == "chmod",
                    event.deep_get("a1", default="") == 777,
                ]
            ),
            all(
                [
                    event.deep_get("type", default="") == "EXECVE",
                    event.deep_get("a0", default="") == "chmod",
                    event.deep_get("a1", default="") == "u+s",
                ]
            ),
            all(
                [
                    event.deep_get("type", default="") == "EXECVE",
                    event.deep_get("a0", default="") == "cp",
                    event.deep_get("a1", default="") == "/bin/ksh",
                ]
            ),
            all(
                [
                    event.deep_get("type", default="") == "EXECVE",
                    event.deep_get("a0", default="") == "cp",
                    event.deep_get("a1", default="") == "/bin/sh",
                ]
            ),
        ]
    ):
        return True
    return False
