By the middle of 2012, the NSA had infected more than 50,000 computer systems around the world with malware.