An Iranian infiltration of the Navy’s biggest unclassified computer network was more extensive and pervasive than previously understood, requiring months of work to finally purge the hackers.