Jake Williams, [a] cybersecurity expert, was dismayed to discover that ... the Shadow Brokers, a mysterious group that had somehow obtained many of the hacking tools the United States used to spy on other countries [had] identified him - correctly - as a former member of the National Security Agency's hacking group, Tailored Access Operations, or T.A.O., a job he had not publicly disclosed. Then the Shadow Brokers astonished him by dropping technical details that made clear they knew about highly classified hacking operations that he had conducted. America's largest and most secretive intelligence agency had been deeply infiltrated. Current and former agency officials say the Shadow Brokers disclosures, which began in August 2016, have been catastrophic for the N.S.A., calling into question its ability to protect potent cyberweapons and its very value to national security. Fifteen months into a wide-ranging investigation by the agency's counterintelligence arm, known as Q Group, and the F.B.I., officials still do not know whether the N.S.A. is the victim of a brilliantly executed hack ... an insider's leak, or both. Three employees have been arrested since 2015 for taking classified files, but there is fear that one or more leakers may still be in place. There is broad agreement that the damage from the Shadow Brokers already far exceeds the harm to American intelligence done by Edward J. Snowden, the former N.S.A. contractor who fled with four laptops of classified material in 2013. For decades after its creation in 1952, the N.S.A. - No Such Agency, in the old joke - was seen as all but leakproof. But since Mr. Snowden flew away with hundreds of thousands of documents in 2013, that notion has been shattered.