def rule(event):
    if all(
        [
            "python" in event.deep_get("Image", default=""),
            " -c " in event.deep_get("CommandLine", default=""),
            "import" in event.deep_get("CommandLine", default=""),
            "pty" in event.deep_get("CommandLine", default=""),
            "socket" in event.deep_get("CommandLine", default=""),
            "spawn" in event.deep_get("CommandLine", default=""),
            ".connect" in event.deep_get("CommandLine", default=""),
        ]
    ):
        return True
    return False
