On The Causes and Cures of Malware