Ransomware: Understanding and Preventing Modern Attacks