Security & Mobility Now
Security is top-of-mind everywhere, especially right here where Juniper experts share their thoughts on the latest security breakthroughs and product advancements
KyleAdams

The Yahoo Breach: Not All SQL Injection Attacks Are Created Equal

by Juniper Employee ‎07-12-2012 01:40 PM - edited ‎07-12-2012 04:00 PM

Early this week, Yahoo joined the ranks of many other large organizations that were successfully and publically breached this summer.  The group claiming responsibility, known as ‘D33Ds Company, claims the breach was intended as a wakeup call to Yahoo’s security team and not as a malicious act.  The breach involved the extraction of sensitive information such as the usernames and passwords or nearly half a million users, as well as the full database architecture of the web application. D33Ds Company was able to steal the information by exploiting a SQL injection vulnerability in an undisclosed Yahoo! web application that some have speculated is related to the company’s VOIP phone service. 

 

To understand how to prevent becoming a victim of this type of attack, it’s important to how SQL Injection works and the different types of attacks. Most modern web applications such as the one breached by D33Ds Company involve two major components to operate. The first is the logic required to operate the application, the second is the database used to store persistent information like user credentials.  When a user submits data such as their username and password into a website, the logic portion of the application makes a request to the database to validate the credentials provided by the user (does the username exist, and is the password correct?).

 

A SQL injection attack is designed to exploit insufficient controls over the types of requests a user can submit, which allows an attacker to request information from the database that it isn’t intended to provide. For instance, asking the database if a user’s password starts with the letter ‘a’, if not, how about ‘b’ etc.  In the Yahoo example, attackers identified this type of vulnerability and leveraged it to extract every byte of information from the database. 

 

However, not all SQL Injection attacks are equal. Some can be more destructive than others. The specific flavor of SQL injection  used in the Yahoo attack, known as Union Based, is arguably the most destructive. This attack enables the attacker to extract extremely large chunks of data in a very short amount of time.  It’s the difference between requesting each password one at a time (normal SQL injection), letter by letter (Blind SQL injection) or requesting hundreds of passwords in one shot (Union Based).  Union Based attacks also make identifying the attack far more difficult because many preventative measures rely on the large volume of requests and time required to extract sensitive information as a way to identify and stop an attack in progress. Union attacks are very quick and require very few requests, making it more difficult to detect abnormal activity.

 

While SQL injection attacks are becoming fairly common, preventing them is not necessarily an easy endeavor.  The preferred method is for companies to perform extensive reviews of the code which interacts with the database.  These reviews help identify cases where an SQL injection attack may be successful, and once identified, the company can update the code to prevent an attack.  This is not always possible, as the code may have been written by developers from other companies, ex-employees, or the code may not be available for review or modification at all.  Aside from that, reviewing code is time consuming, requires skilled eyes, and is a point-in-time solution which must be repeated after every product update.  For these reasons, many companies simply can’t accommodate the level of review necessary to avoid a breach.  With that in mind, companies who are concerned about the possibility of a breach (which should be everyone!), must seek alternate solutions.

 

Mykonos Web Security for example, is a drop in minimal configuration solution that is designed to help address this problem.  When an attacker targets a website, there is an extensive amount of work that must be done before a breach can be successful.  This work involves probing and reverse engineering the web application and attempting to identify specific conditions the original developers had never anticipated.  This is the type of activity that Mykonos looks for and stops.  Once a malicious user is identified, they can be effectively stopped long before any valid exploits are discovered.  Other solutions are available, but primarily focus on detection and less on real-time prevention.  Web application firewalls for example, are effective at stopping known and automated SQL injection attacks, but are not difficult for skilled attackers, such as D33Ds Company, to bypass. You can see a demo of Mykonos here.

 

In addition to external protective measures like Mykonos, companies should also consider implementing tighter restrictions on their database, ensuring that users only have rights to access and manipulate data necessary to do their jobs.  Giving the web application full unrestricted access to all database data and features is a common mistake in many web applications, which dramatically compounds the damage caused by a successful SQL injection attack.  Companies should also consider other protections, such as encrypting sensitive information like passwords, or even storing that information in a secondary database with highly restrictive policies. 

 

From a consumer’s perspective, the Yahoo and other similar breaches could have significant security consequences and they should take action. For one, several people re-use the same password on multiple website, which allows people to compromise multiple accounts at once. As a best practice, people should use different passwords and change them regularly to avoid being a victim.

 

However, ultimately the responsibility to prevent these types of attacks rests squarely on companies that need to protect the information their customers trust with them.

 

Post a Comment
Be sure to enter a unique name. You can't reuse a name that's already in use.
Be sure to enter a unique email address. You can't reuse an email address that's already in use.
Type the characters you see in the picture above.Type the words you hear.
About Security & Mobility Now

Discussing a wide range of topics impacting enterprises and
data center security.

Subscribe RSS Icon

Our Bloggers

Kyle Adams
Senior Software Engineer

Profile | Subscribe

Ritesh Agrawal
Director
Software Engineering

Profile | Subscribe

Erin K. Banks
Senior Technical Marketing Manager

Profile | Subscribe

Ajay Bharadwaj
Product Manager

Profile | Subscribe

Paul Bristow
Senior Director
Product Management

Profile | Subscribe

Michael Callahan
Vice President
Product Marketing

Profile | Subscribe

Henrik Davidsson
Director
Security Sales

Profile | Subscribe

Scott Emo
Director
Product Marketing

Profile | Subscribe

Mora Gozani
Senior Manager
Product Marketing

Profile | Subscribe

Steve Hanna
Distinguished Engineer

Profile | Subscribe

Ashur Kanoon
Sr. Manager
Technical Marketing

Profile | Subscribe

Seema Kathuria
Manager
Product Marketing

Profile | Subscribe

Kevin Kennedy
Senior Director
Product Management

Profile | Subscribe

Dave Killion
Software Engineer

Profile | Subscribe

Rebecca Lawson
Senior Director
Product Marketing

Profile | Subscribe

Rajoo Nagar
Senior Manager
Product Marketing

Profile | Subscribe

Erin O'Malley
Manager
Product Marketing

Profile | Subscribe

Galina Pildush
Strategy & Planning
Architect

Profile | Subscribe

Edward Roberts
Director
Product Marketing

Profile | Subscribe

Bill Shelton
Director Field Sales

Profile | Subscribe

Ashutosh Thakur
Product Line Manager

Profile | Subscribe

Troy Vennon
Software Engineer

Profile | Subscribe

Brad Woodberg
Product Manager

Profile | Subscribe

Labels
Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.