The deal comes as ransomware attacks are becoming a larger and more insidious threat to the U.S. and global economies.