President Obama is not happy. Amid an onslaught of cyberattacks traced back to Russia, China, Iran and other American adversaries, the U.S. military remains unable to officially connect the attacks to the governments in question, limiting the capacity to launch a legal response.

“Offense is moving a lot faster than defense,” Obama told the Pentagon's new cyberwarfare unit at Fort Meade, Maryland, last Friday, according to a New York Times article published Tuesday. “There comes a point at which we consider this a core national security threat,” he said, adding that if the attacks continue to escalate, “we can choose to make this an area of competition, which I guarantee you we'll win if we have to.”

The warning comes just days before Chinese President Xi Jingping is scheduled to visit the United States. The Obama administration revealed Saturday that an envoy from Beijing spent four days in Washington debating the “rules of the road” when it comes to cyber activity between the two giants. One unnamed source who sat in on the meetings with the Chinese representatives told the Times the negotiations turned “pretty ugly.”

The White House is also preparing sanctions against the individual Chinese hackers known to be responsible for a number of hacks against American organizations, including the Office of Personnel Management breach that lost sensitive information on 25 million U.S. government workers.

But American intelligence officials have stressed to Congress that the OPM hack wasn't a “cyberattack,” but “espionage,” -- the same kind the U.S. frequently deploys against Chinese networks. They have also repeatedly asked Congress not to make any new international agreements that would limit the United States' ability to gather information, or use cyberweapons against American enemies, as it did with the Stuxnet virus against Iran in 2009.