A management presentation dating from 2012 explains how the NSA collects information worldwide. In addition, the presentation shows that the intelligence service uses ‘Computer Network Exploitation’ (CNE) in more than 50,000 locations. CNE is the secret infiltration of computer systems achieved by installing malware, malicious software.
via NSA infected 50,000 computer networks with malicious software – nrc.nl.
This article is a bit short on details. It doesn’t say what OSs or exactly how they got malware onto victim machines. The only way to infect a network would be to perhaps get control of its firewall or main router. Since most people use cheap SOHO routers that might not be very difficult to swap out firmware on them that can do all kinds of things unbeknownst to its owner. The article implies that the victim machines are PCs according to this:
One example of this type of hacking was discovered in September 2013 at the Belgium telecom provider Belgacom. For a number of years the British intelligence service – GCHQ – has been installing this malicious software in the Belgacom network in order to tap their customers’ telephone and data traffic. The Belgacom network was infiltrated by GCHQ through a process of luring employees to a false Linkedin page.