SAN FRANCISCO — Hackers are discovering that it is far more profitable to hold your data hostage than it is to steal it.