Harnessing Automation Against Advanced Threats