Weighing the perils of state-sponsored cyberattacks