The cost of a ransomware attack can be hundreds of thousands of dollars, if not millions — and the sum grows every year.