NSA whistleblower Edward Snowden hacked a nuclear laboratory during his teenage years, reporting its vulnerabilities to the authorities. An official from the lab later thanked him for the hack, which helped it fix its security issues.

Snowden wrote about the incident in Permanent Record, his new memoir, which trace his evolution from teenage hacker to NSA contractor and whistleblower.

In the book, Snowden writes about his fascination with technology during his teenage years. He was a gamer, a fan of 1990s games like the Legend of Zelda. And he also dabbled in hacking — after he successfully hacked the Los Alamos Nuclear laboratory, the same facility that developed the atom bomb, he reports its vulnerability to the authorities.

This was an early example of “white hat” hacking. Also known as “ethical hackers,” white hat hackers break into information systems in order to alert their owners to security vulnerabilities. White hat hackers are contrasted with “black hat” hackers, who hack for malicious reasons.

The Los Alamos lab was reportedly grateful to Snowden for exposing its security holes, with an official from the facility later calling Snowden’s mother to thank him.

Snowden ultimately became a subcontractor for the National Security Agency (NSA), where his concerns about the mass surveillance of Americans led him to become a whistleblower in 2013, when he provided documentation that exposed the agency’s surveillance program.

Snowden faces criminal charges in the U.S., initiated by the Obama administration, and now lives in exile in Russia. In an interview with The Guardian to promote his book, he urged citizens around the world to organize against mass surveillance.

Are you an insider at Google, Facebook, Twitter or any other tech company who wants to confidentially reveal wrongdoing or political bias at your company? Reach out to Allum Bokhari at his secure email address allumbokhari@protonmail.com.

Allum Bokhari is the senior technology correspondent at Breitbart News.