On Friday, Wired revealed that a virus of unknown origin has been consistently tracking the remote piloting of US military drones down to each keystroke, and that attempts to remove the intrusion have failed. Although the origin and intent of this virus remain unknown, with military analysts positing that it may be typical malware rather than a successful espionage bid, the incident provides the media with a practical opportunity to finally start examining the processes that determine our republic's ability to protect itself from foreign cyber threats. That examination needs to focus on a particular system of the sort that is most dangerous to any republic – a system that grows ever more consequential while remaining largely invisible even to those who are charged with overseeing it.

Even most members of Congress are unaware of the extent to which both the military and intelligence community have come to depend on private contractors to provide the software and ingenuity necessary for both conventional and information warfare in the 21st century. In 2005, experts estimated that 30% of the US intelligence budget was being outsourced, and this intelligence contracting industry has grown markedly since.

On the surface, this practice makes sense; the modern military tends not to attract sufficient technical talent for its needs, and in a few notable cases, the once-legendary hackers who run crucial firms have felony convictions that would prevent them from doing equivalent work from inside the state. Meanwhile, competition for projects promotes the incubation of new and more powerful capabilities from within the industry, and the bidding system ensures that the US gets the best of these for the least money – at least, in theory.

But as evidenced by the drone virus affair and other, more serious incidents, the overall contracting process is deeply flawed. The "free market" competition for contracts that would otherwise bring gains is corrupted by the industry's thorough overlap with its state customers. Former Department of Homeland Security head Michael Chertoff joined the board of directors of contractor BAE Systems ahead of that firm being awarded a $270m contract last week, followed by another US Army contract for $67m; before bringing on the well-connected ex-secretary, the firm was becoming notorious for losing such crucial business.

A glance at the boards and executive listings of similar firms, replete with former military officers and government officials, reveals the revolving door that connects potential clients with a state customer for which money is no object, such money being taxed from an electorate too distracted by other offenses to notice. Of course, America's penchant for overspending on defense would be more defensible if it received what it paid for. The revelations regarding the failure of Halliburton, Mantech and other state-intertwined contractors to provide invoiced services to troops have been so endless as almost to be discounted, rather than add to the popular outrage.

This familiar tendency on the part of the US government to spend money it doesn't have on things it doesn't get is now directed at developing procedures it shouldn't use. The intelligence contracting industry, which includes firms that provide security applications to the entire US government and military, has been encouraged lately to direct more of its collective time and capabilities to the task of monitoring, misinforming and sometimes outright attacking American citizens and others abroad – and benefit from the protection of the state and the incompetence of the media in order to make such attacks with impunity.

The Team Themis affair, which united three such firms to go after journalists, activists and WikiLeaks was revealed by Anonymous earlier this year thanks to the seizure of 70,000 emails from coordinating firm HBGary Federal. The little-known and sinister persona management capability – a state-sponsored "sockpuppet" propaganda program – has been found in widespread development; the National Security Agency-linked Endgame Systems has been revealed to offer comprehensive offensive cyber capabilities, with targets in place, to customers other than the US government; a few months ago, I released a report on a worrying surveillance apparatus known as Romas/COIN.

The shift from infrastructure defense to surveillance and offensive capability comes in the wake of the Chinese-orchestrated Aurora attacks against US state and corporate targets – an operation that continues to reveal itself as even more damaging than initially thought as additional targets admit theft of crucial data. The problem with the changing priorities of the US's cyber-contractor complex are two-fold: by neglecting government systems' vulnerabilities – and the drone virus provides a perfect instance – the state loses face with adversaries, real or potential, who respect only force; and by treating its own citizenry as the leading threat to its security, it loses the loyalty of those who respect truth and the rule of law.