In an article in PC World, it indicated that documents obtained by Edward Snowden revealed that the NSA has intercepted shipments of computers, including parts such as hard drives, to allow them to install spyware. Read the full details here:
http://www.pcworld.com/article/2083300/report-nsa-intercepts-computer-deliveries-to-plant-spyware.html
That is only the tip of the iceberg apparently. Reports of hundreds of thousands infects via fake facebook page, other articles indicate there was a way to infiltrate iphones and more:
http://www.pcworld.com/article/2066840/nsa-reportedly-compromised-more-than-50000-networks-worldwide.html
http://www.networkworld.com/news/2014/031214-nsa39s-plans-reportedly-involve-infecting-279666.html
However the NSA denies this: http://bgr.com/2014/03/14/nsa-malware-denial-issued/