I have done some research regarding the application of machine learning to cyber-security. After these recent attacks (like WannaCry), I think that AI-based cyber defense can prevent them. I have also read about research regarding the same in MIT, and that AI can detect more than 80% of malware. Is AI actually so promising in this department?
There are projects out there attempting to apply Machine Learning / AI to cyber-security in different ways. One that I'm familiar with is Apache Metron. Another related project is Apache Spot. I think if you read over the docs for these two projects respectively, they will probably give you some good insights on this subject.