Once upon a time, very smart people in the Pentagon believed that connecting sensitive networks, expensive equipment, and powerful weapons to the open Internet was a swell idea. This ubiquitous connectivity among devices and objects — what we now call the Internet of Things — would allow them to collect performance data to help design new weapons, monitor equipment remotely, and realize myriad other benefits. The risks were less assiduously catalogued.

That strategy has spread huge vulnerabilities across the Defense Department, its networks, and much of what the defense industry has spent the last several decades creating.

“We are trying to overcome decades of a thought process…where we assumed that the development of our weapon systems that external interfaces, if you will, with the outside world were not something to be overly concerned with,” Adm. Michael Rogers, the commander of Cyber Command, told the Senate Armed Services Committee today. “They represented opportunity for us to remotely monitor activity, to generate data as to how aircraft, for example, or ships’ hulls were doing in different sea states around the world. [These are] all positives if you’re trying to develop the next generation of cruiser [or] destroyer for the Navy.”

But in a world where such public interfaces are points of vulnerability, Rogers said, adversaries develop strategies based on stealing Pentagon data, and then fashion copycat weapons like China’s J-31 fighter, which many call a cheaper cousin to the F-35.

“That’s where we find ourselves now. So one of the things I try to remind people is: it took us decades to get here. We are not going to fix this set of problems in a few years,” Rogers told the senators. “We have to prioritize it, figure out where is the greatest vulnerability.”

The 2014 National Defense Authorization Act requires the services to discover and report to the Senate about the cyber vulnerabilities of their weapons and communications systems. That report is overdue, according to Sen. Jeff Sessions, R-Ala.

At the hearing, Deputy Defense Secretary Robert Work said that Frank Kendall, the Pentagon’s top weapons buyer, is going through virtually the entire U.S. arsenal to understand how hackable is each weapon.

“I expect this work to be done very soon,” Work said.

Such vulnerabilities constitute “a big, big problem,“ for Work. He added “Most of the weapons systems that we have today were not built to withstand a concerted cyber threat.”

The Defense Department has only recently begun to attack its problems in this area, but it is making an honest effort. Cybersecurity is now listed as a key performance parameter, along with survivability, for every new weapon. Work also described efforts to reduce the number of exploitable attack surfaces within the military — in other words, to shrink the Internet of Things just a bit.

“We’re going from 15,000 enclaves to less than 500,” he said, referring to smaller computing networks governed by a central authority. “We’re going from 1,000 defendable firewalls to less than 200, somewhere between 50 and 200.”

Considering that more than 50 billion interconnected devices will populate the world by the year 2020, by most estimates, the Pentagon’s limited, early-adopter experience of the Internet of Things is enough to give even the most optimistic futurist some serious pause.