By Brendan Sasso - 06/07/13 01:27 PM EDT
U.S. officials have determined that the Chinese government hacked into and spied on the 2008 presidential campaigns of Barack ObamaBarack ObamaArmstrong Williams: Obama 'should get on his knees and pray' Obama makes move on 'smart guns' Movie trailer gives peek at Obamas' first date MORE and John McCainJohn McCainRepublicans who vow to never back Trump Russia’s nuclear strategy: It’s a trap! Clinton face-swaps Trump on Snapchat MORE, according to NBC News.
The revelation comes as President Obama is set to meet with Chinese President Xi Jinping in California. The White House has previously said Obama plans to press Xi over China's hacking of U.S. companies and government agencies.
Officials told NBC News that the goal of the 2008 hacking appeared to be to gain access to internal position papers and emails of top advisers.
“They were looking for positions on China, surprises that might be rolled out by campaigns against China,” Dennis Blair, Obama’s director of national intelligence in 2009 and 2010, told NBC.
The spying went undetected for several months before the FBI became involved and helped the campaigns better secure their computer networks, campaign officials said.
David Plouffe, Obama's campaign manager, told NBC that Josh Bolton, then-President George W. Bush’s chief of staff, called him in August 2008 to alert him of the spying.
The hackers apparently sent "phishing" emails to top aides with an attachment claiming to be an agenda for an upcoming meeting. But the attachment was actually a sophisticated virus that spread through the campaigns' networks, quietly spying on their activity.
The Chinese government has denied that it is responsible for cyberattacks.