The Pentagon has spent $100m (£68m) deflecting and cleaning up after online attacks in the past six months, according to the head of the US Strategic Command.
US Air Force general Kevin Chilton told a cyber security conference in Nebraska that the money was being spent on computer equipment, contractors and manpower to clean up after external attacks and internal mistakes.
"The important thing is that we recognise that we are under assault from the least sophisticated - what I would call the bored teenager - all the way up to the sophisticated nation state, with some pretty criminal elements sandwiched in between," Chilton told Associated Press. "This is indeed our big challenge as we think about how to defend it."
Chilton declined to say what percentage of the attacks came from outside the military's systems, or to comment on the likelihood that some attempts were being made by foreign governments.
Brigadier general John Davis, the US Army's deputy commander for network operations, said that investment needed to be made into hardening the defences of military systems, rather than spending funds fire-fighting after the event.
"You can either pay me now, or you can pay me later," he said. "It would be nice to spend that money proactively, rather than fixing things after the fact. "
Use the same password for every website? It might be time to change them all
Applicants for parking bay suspensions put at risk of credit card fraud by Islington Council
Robert Swan appointed interim CEO after Brian Krzanich's departure
Should you link your data sets to add value, or leave them separate to reduce risk?