def rule(event):
    if all(
        [
            event.deep_get("ParentImage", default="").endswith("/sshd"),
            any(
                [
                    event.deep_get("CommandLine", default="").startswith("bash -c"),
                    event.deep_get("CommandLine", default="").startswith("sh -c"),
                ]
            ),
            event.deep_get("User", default="") == "root",
        ]
    ):
        return True
    return False
