The House passed legislation Tuesday to combat the criminal use of Internet spyware and scams aimed at stealing personal information from computer users.

Spyware, said bill sponsor Rep. Zoe Lofgren, D-Calif., "is one of the biggest threats to consumers on the Internet." She and other lawmakers cited estimates that up to 90 percent of computers in this country are infected with some form of spyware.

Spyware is software that secretly collects information about a person or organization and sends it to another entity without the user's consent.

Rep. Bob Goodlatte, R-Va., cosponsor of the bill, said it had been written so that it "protects consumers by imposing stiff penalties on the truly bad actors" while protecting legitimate online businesses that are developing new services to keep track of user preferences.

The bill makes it a criminal offense, subject to a prison term of up to five years, to access a computer without authorization to further another federal criminal offense. Obtaining or transmitting personal information with the intent of injuring or defrauding a person or damaging a computer is punishable by up to two years in prison.

The measure approves $10 million a year over the next four years to help the Justice Department fight other computer scams such as "phishing" — the use of fake e-mails or Web sites to trick consumers into providing bank account, credit card or other personal information — and "pharming," where hackers redirect Internet traffic to fake sites in order to steal personal information.

Similar bills have been approved by the House in past sessions of Congress, but have yet to clear the Senate.