The majority of comments to blogs and other Web 2.0 websites are spam or contain malicious code, according to a new report.

A study by security firm Websense says that social networks that allow user-generated content have become a top target for hackers. Now, 95 percent of user-generated comments to blogs, chat rooms and message boards are spam or  malicious

It's State of the Internet Security report also said that hackers are increasingly targeting sites that most assume to be secure, like popular search engines.

Nearly 14 percent of searches for hot news led to malware. Search engine optimization poisoning attacks target the top searches enabling hackers to drive traffic to their sites.

Malicious hackers are really focusing their efforts to ensure they're driving their victims straight to them, said Websense Chief Technology Officer Dan Hubbard By poisoning search results and focusing on Web 2.0 sites, their efforts are often more efficient and effective.

The research revealed there had been a 225 percent surge in the number of malicious sites on the web, while 71 percent of these websites were legitimate sites that had been compromised.

Furthermore 35 percent of all malicious web attacks included code designed to steal sensitive personal data and 58 percent of all incidences of data stealing took place on the web.

The hackers are becoming smarter, said Carl Leonard, Websense's senior research manager, exchanging the traditional scattergun approach for carefully considered attacks.