While there are a number of security risks in the world of electronic commerce, SQL injection is one of the most common Web site attack techniques used to steal customer data such as credit card numbers, hold customer data hostage by encrypting it or destroy data outright.
Where a Web server only understands and speaks the HTTP protocol, a database's native tongue is Structured Query Language (SQL), which is essentially a set of command statements that instruct a database to execute specific actions. Every database server has a similar series of commands to query its tables, narrow down results to a few specific entries, and combine information from one table to another.
Here is an example SQL query:
SELECT -- FROM users WHERE Email = '" + Email + "' AND Password = '" + Password + "';
The WHERE specifies a condition, that an e-mail address and password combination match data present in the "users" table. When this command is given to the database server, it returns true if a match is found and a false if there is no match.
When clients send data on the Web, they use URLs and forms to assemble the database query statements. The following URL represents an example login page for a Web application:
GET /shopping_cart/login.asp?Email=jdoe@example.com&Password=$ecret123 HTTP/1.1
This URL shows that the destination application is a Microsoft ASP page and it is accepting two parameters, one called "Email" and the other called "Password." If the user credentials are correct then the result of this query will provide response data that represents a successful authentication and will be used to allow the client to proceed to the corresponding Web page.
Developers of traditional application code generally trust user input. They believe that database queries are coming from a trusted source, namely the database server itself, rather than from an untrusted user's Web browser. SQL injection is an attack technique where an untrusted user inserts SQL query data into input fields sent to back-end databases in an attempt to trick the database into executing the commands.
The Web application firewall in the example was configured in a "detection only" mode where it was logging alerts and events but not blocking any inbound attacks or outbound data leakages. Due to this configuration, the inbound SQL injection attack from the previous section was allowed to continue on to the vulnerable Web application when it would have been blocked.
The Web page returned indicates that the SQL injection reconnaissance probe was successful, giving the hacker valuable information, including the exact version of the database and the database user. Armed with this information, the attacker can fine tune the attack and execute further reconnaissance probes to enumerate more information about the database itself, such as the table and column names. After a number of intermediary reconnaissance probes, the attacker has the information needed to send a complex SQL injection attack, attempting to extract customer record details. By targeting specific customer data such as credit card name, expiration data and security code, the attacker can extract a vast amount of sensitive customer data.
Read up on the latest ideas and technologies from companies that sell hardware, software and services. Look before you leap | Key considerations for moving to 802.11n
Controlling storage costs with Oracle database 11g
How to improve employee productivity in small and medium businesses
The state of Middleware
Making the Business Case for IT Consolidation
IT Service Management Needs and Adoption Trends: An Analysis of a Global Survey of IT Executives
The Case for an Untethered Enterprise
Zones provide focussed content from Computerworld and leading technology partners.Discover how SOA can create smarter outcomes for your business.
Attend and learn:
- How SOA is helping leading companies to become more agile
- Where you should be applying SOA processes in your company
- The top SOA implementation mistakes to avoid
Click here for more information.
- +
Computerworld Live Podcast #97: The Future of Enterprise Networking 25/07/2008 09:45:36
This week CW Live chats with Mark Thompson, global sales and marketing manager for HP ProCurve, on the future of the enterprise networking. Mark discusses the trends we can expect to see in the near future and how the right infrastructure can ensure your enterprise network is secure. - +
Computerworld Live Podcast #96: Security at the Edge 11/06/2008 09:22:22
CW Live speaks with Amol Mitra, HP ProCurve Director of Marketing for Asia Pacific and Japan. Today's topic: how enterprises are starting to shift away from simply controlling security via server logins, firewalls and moving to more adaptive security frameworks. - +
Data Management Edition #10: Multi-Petascale Systems 02/05/2008 09:12:33
This week we look at sustainability and the development of multicore technologies to build multi-petascale systems. - +
IT Security Edition #11: How to poison the Storm botnet 01/05/2008 08:51:55
This week CW Live presents a case study on how to poison the notorious Storm botnet . Plus we take a look at Cisco's plans for Ironport. - +
IT Security Edition #10: Cyber-battles fought and won 24/04/2008 11:09:47
Vendors bow to end user pressure to improve product security, and we take a look at the latest concepts shaping the cyber-battlefield of the future.
Borderless corporate networks to shift focus to secure content management in Australia in 2009 2008-12-04 16:06:00+11
IDC Says Asia/Pacific Excluding Japan IT Market Will Remain The Bright Spot... 2008-12-04 15:04:00+11
MySpot SOS "Panic Button" Smartphone Application could save lone worker lives 2008-12-04 13:34:00+11
Charles Sturt University Commences Unified Communications Deployment With Interactive Intelligence 2008-12-04 08:30:00+11
AOC Launches 18.5” Widescreen Green 16:9 LCD Monitor in Australia and New Zealand 2008-12-03 15:30:00+11
Email Archiving 101—Customer Case Study
Join Lee Benjamin, a Microsoft Exchange MVP and Ryan Shipkowski, network administrator for Matthews, to discuss the process and ROI of implementing an email archiving solution, with emphasis on a case study from Matthews International.












