How confident is the National Security Agency about its ability to wage cyberwarfare? Enough so that it's bragging about it. A new round of Edward Snowden leaks published by Der Spiegel reveal that the institution has not only been gearing up for a future of digital battles (it asked for $1 billion to improve its cyberattacks back in 2013), but boasts about what it can already do. For example, it touts that it can "drink your milkshake" (There Will Be Blood style) if you dare attack American government computers. When China hacked the Department of Defense in 2009, the NSA not only pinpointed the source of attack, but broke into China's intelligence network and monitored the country's spying efforts. This "fourth party collection," as the NSA calls it, lets the agency find out what's happening without doing all the hard work.
The NSA also makes it a point to use the tools and methods of their attackers against them, and to develop its own attacks against critical systems (like energy grids) in case they're needed. Its agents aren't all that worried about getting caught, either. They regularly cover their tracks, such as by placing data on the servers of "scapegoat" targets to throw people off the scent.
It's not surprising that the NSA would turn the tables on its foes. However, it's willing to use "fourth party" techniques on any country that isn't part of the Five Eyes Alliance (Australia, Canada, New Zealand, the UK and the US), including its allies. And there's a concern that the US is shifting too much of its attention toward offensive capabilities, rather than focusing on defense -- it's hard to claim the moral high ground in cyberwarfare when you're willing and able to inflict serious damage.