A computer hacker responsible for creating armies of computers to launch internet-based attacks and selling those 'botnets' to spammers and other miscreants pleaded guilty yesterday to federal criminal charges in Los Angeles, according to a prosecutor with the US Attorney's Office.

Jeanson James Ancheta pleaded guilty in a US District Court in Los Angeles to four felony charges and could face from five to 25 years in prison, said James Aquilina, assistant US attorney with the cyber and intellectual property crimes section of the US Attorney's Office.

The case is the first time in the US that a hacker has been convicted not only for creating and spreading malicious code but also for making money from it, Aquilina said.

A sentencing hearing for Ancheta has been scheduled for 1 May in the US District Court of California, Central Division. Judge R Gary Klausner is presiding over the case and must approve the plea agreement.

Last November the FBI arrested 20-year-old Ancheta, whom they believe to be part of a 'botmaster underground' that seizes control of computers and sells those computer armies to people who want to commit cybercrimes.

Ancheta pleaded guilty to two counts of conspiracy, one for selling botnets that were used to launch internet-based attacks and send spam, and the other for directing botnets to adware servers that downloaded adware surreptitiously to the hijacked systems, Aquilina said.

Ancheta made about a profit of about $3,000 (approximately £1,700) from selling botnets, and about $60,000 (£33,700) from the adware scam, Aquilina said.

The hacker also pleaded guilty to government intrusion for breaking into computers at the Weapons Division of the United States Naval Air Warfare Center in China Lake, California, and DISA, the Defense Information Systems Agency, a component of the US Department of Defense. The last count in the guilty plea is computer fraud, for accessing computers without authorisation with the intent of profiting from it, Aquilina said.

Under the terms of the plea agreement, which was entered on Friday, Ancheta must surrender more than $58,000 (£32,600) in profits and give up a BMW he purchased with money from illegal activity, as well as computers and other evidence seized in the investigation, Aquilina said. In addition, Ancheta has agreed to pay the US government restitution of about $20,000 (£11,200) for infecting computers at China Lake and DISA, the attorney said.