Hackers are increasingly using AI to find and exploit weaknesses in corporate networks, prompting cybersecurity firms to build defenses that can detect and respond to threats more quickly.