A computer virus that captures the strokes on a keyboard has infected networks used by pilots who control US air force drones flown on the front line, according to a report.

Wired magazine reported that the spyware has resisted efforts to remove it from computers in the cockpits at Creech air force base in Nevada, where pilots remotely fly Predator and Reaper drones in places such as Iraq and Afghanistan.

The story said there were no confirmed reports that classified data had been stolen and that the virus did not stop pilots from flying missions. Network security specialists were uncertain whether the virus was part of a directed attack or accidentally infected the networks, the story said.

The air force said in a statement that it did not discuss threats to its computer networks because it could help hackers refine their tactics.

"We keep wiping it off, and it keeps coming back," Wired quoted a source as saying. "We think it's benign. But we just don't know."

America uses drones frequently in Afghanistan and, more controversially, across the border in Pakistan, where they have killed Taliban and al-Qaida suspects without the Pakistani government's official approval. On 30 September, a US drone killed Anwar al-Awlaki, a cleric with al-Qaida in the Arabian Peninsula in Yemen.

"Keylogger" viruses are mostly used to capture users' passwords, credit card details and bank account numbers as people type them in. The data is then sent over the web to fraudsters.

The US military has previously found out that insurgents were easily able to capture and record the footage being sent to troops and back to the airbase by cameras on drone planes.