Cyberattacks keep inflicting more expensive damage, but firms are responding decisively to the challenge.