Akamai's Threat Research Division has identified a sophisticated search engine optimization (SEO) campaign that uses SQL injections to attack targeted websites.
An advisory on the subject, written by Ryan Barnett of the company's cloud security intelligence team, is available here.
Barnett writes that affected websites distribute hidden Hypertext Markup Language (HTML) links that dupe search engine bots and skew page rankings to the point where they're no longer accurate.
Over the course of a two week period in Q3 2015, Threat Research analyzed data gathered from the Akamai Intelligent Platform and saw attacks on more than 3,800 websites and 348 unique IP addresses participating in the various campaigns.
When searching the Internet for the HTML links that were used as part of this campaign, Threat Research identified hundreds of web applications containing these malicious links.
When searching for a combination of common words such as "cheat" and "story", it was apparent that the "cheating stories" application appeared on the first page of the leading search engines.
Threat Research looked at Alexa analytics and the ranking of the "cheating stories" application dramatically increased during the three month span.
Search engines use specific algorithms to determine page rankings and indexing for sites on the web, and the number and reputation of links that redirect to the web application influence these rankings. The SEO attackers created a chain of external links that direct to stories of cheating and infidelity on the web to mimic normal web content and impact search engine algorithms.
"The ability to manipulate page rankings is an enticing proposition and business for attackers," said Stuart Scholly, Senior Vice President and General Manager, Security Business Unit, Akamai. "If successful, attacks can impact revenue and, most importantly, the reputation of many organizations and companies using the Internet."
Attacks in the campaign have demonstrated a unique understanding of search engine operations, and accordingly, Threat Research recommends the following defense techniques:
For Web Application Developers
Ensure that you have implemented proper input validation checks for all user-supplied data that will be used within a back-end database query. Reference: https://www.owasp.org/index.php/Input_Validation_Cheat_Sheet
Only use prepared statements with parameterized queries when constructing SQL queries based on user-supplied data. Reference: https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet
For Web Application Defenders
Deploy a Web Application Firewall (WAF) that is configured in a blocking mode for SQL Injection attacks.
Consider profiling and monitoring the HTML response body format to help identify if there are significant changes such as an increase in the the number of web links.
Akamai continues to monitor ongoing SEO attack campaigns leveraging SQL injection techniques.