Harnessing Machine Learning and Automation Against Advanced Threats