Firms scramble to recover from wave of cyberattacks