A payment of $40 million marked the largest ransom paid to reverse the effects of a ransomware attack.