Nearly a quarter of website hacks that took place last year were about vandalising the site rather than financial gain, says the Web Application Security Consortium.
According to the consortium's web hacking incidents database annual report, stealing money and data is not always the overriding motivation for hackers, although it has been a rising trend in recent years.
"While financial gain is certainly a big driver for web hacking, ideological hacking cannot be ignored," the report, which was sponsored by vendor Breach Security, said.
Although there were hundreds of thousands of website attacks in 2008, the report set a strict criteria for its analysis: it looked at only those incidents that were publicly reported, were associated with web application security problems and had an identifiable impact on an organisation.
These criteria allow people to understand the potential business impacts as opposed to just the technical failure, which is important in order to manage risk, the researchers said.
Website vandalism may carry a lower risk for organisations than a financial attack, but still highlights insecure web pages.
The report found the majority of defacements "were of a political nature, targeting political parties, candidates and government departments, often with a very specific message related to a campaign. Others have a cultural aspect, mainly Islamic hackers defacing western websites".
Government, law enforcement and political websites were the most targeted categories. The second most popular motivation was stealing sensitive information, which occurred in 19 percent of the 57 hacks. That was followed by planting malware, at 16 percent, and causing monetary loss, at 13 percent.
The remaining attacks caused downtime for a website, planted worms and linked spam and information warfare.
The most common style of attack was SQL injection, which involves inputting commands into web-based forms or URLs in order to return data held in back-end databases or plant malware in order to infect computers visiting the site. Of the attacks, 30 percent were carried out by SQL injection.
In early 2008, security experts were stunned by a wave of attacks that used automated tools to seek out weak websites to compromise by SQL injection. It has been estimated that up to 500,000 websites fell victim to hacks.
SQL injection attacks subsequently displaced cross-site scripting as the most common attack method. A cross-site scripting flaw can allow data or malicious code to be drawn from another a website, which can potentially cause a data breach.
Cross-site scripting flaws are easier to find but it is "somewhat harder to take advantage of them for profit-driven attacks", indicating a cause for the surge in SQL injection, the report said.
See also: Security firm Kaspersky's website hacked