The following is not contained in an article but is common knowledge among security professionals that ALL malware that uses SMB (starting with the Blaster worm in 2000) can be blocked using a firewall. Initially Blaster was stopped by blocking TCP ports 139 and 445. We have been blocking those ports permanently since that time.Additionally, for WannaCry, you should block TCP port 137 and UDP ports 137 and 138.
So my question is how do i block these in comodo firewall??