How attackers exploit exposed databases for extortion—and the defenses that work.