WannaCry and Not-Petya Ransomware were exploited due to the vulnerability in Microsoft's SMB. Microsoft released a patch MS17-010 on March 14th 2017 to address this vulnerability. However since most of the Microsoft users have not updated this patch and due to the ongoing Phishing attacks these Ransomware attacks are on the rise.