An investigation by the BBC into cybercrime may itself have broken UK computer crime law.

BBC Click got its hands on a botnet of 22,000 compromised PCs from an underground forum. It used these machines to send spam to two accounts it had established with Gmail and Hotmail. The programme also used these zombie machines to show how they might be used in a denial of service attack.

After getting permission from security firm Prevx, which commented on camera but did not otherwise participate in the investigation, BBC Click used the compromised machines to flood a backup site run by the security firm with junk traffic.

BBC Click found that only 60 compromised machines were needed to render Prevx's site inaccessible.

The broadcaster then warned the owners of the infected computers that their machines were compromised, and advised on how to clean them, by changing their screensaver.

BBC Click claimed that "If the exercise had been done with criminal intent it would be breaking the law".

But this position has been disputed by lawyers and security experts contacted by El Reg. While acknowledging that the BBC acted with the best intentions, they describe its action as naive and potentially criminal.

"The BBC appears to have broken the Computer Misuse Act by causing 22,000 computers to send spam," said Struan Robertson, editor of out-law.com and legal director at solicitors Pinsent Masons. "It does not matter that the emails were sent to the BBC's own accounts and criminal intent is not necessary to establish an offence of unauthorised access to a computer."

"The Act requires that a computer has been made to perform a function with intent to secure access to any program or data on the computer. Using the botnet to sending an email is likely to satisfy that requirement. It also requires that the access is unauthorised - which the BBC appears to acknowledge. It does not matter that the BBC's intent was not criminal or that someone else created the botnet in the first place."

"The maximum penalty for this offence is two years' imprisonment. But it is very unlikely that any prosecution will follow because the BBC's actions probably caused no harm. On the contrary, it probably did prompt many people to improve their security."

Graham Cluley, senior technology consultant at security firm Sophos, added that changing people's desktop wallpaper to present a message from BBC Click (see end of video clip here) clearly crossed the line.

"Even if it was done with the best intentions and in the public interest, that is unauthorised modification of a computer and an offence under the Computer Misuse Act," Cluley told El Reg.

"The computer security industry has found itself in the situation before where it has been able to do this (or remove malware on a botnet-infected computer) without permission of the computer user (after all, we don't know where they are based in the world) but has NOT because it's illegal for us to change people's computers without their permission."

Cluley added that even though it was unlikely that anyone would be prosecuted it was still a "dangerous precedent for others to turn a blind eye to our computer crime legislation". Sophos has been invited to participate in similar exercises in the past but declined. Cluley explained that it was possible to illustrate the computer security risk posed by botnets without breaking the law. ®