In most cases the server administrator will close all port that is not in use and block all ports except port 80 to be exposed to the web as most of the web application we use today uses either port 80 for HTTP of port 443 for HTTPS.
This seems to be a very secure setup as all of us know that attackers will try to use any available ports to hack into the server or system to do their nasty stuff. For hacker who uses SQL injection they will still be happy if the programmer did not handle what type of input data the program is supposed to take in as SQL injection does not required any other port other than port 80.
This is due to most of the enterprise databases will support some types of stored procedure or server side scripting and some of it will be executed by highly privilege application. Therefore SQL Injection has been a very popular technical for attackers.
2.1. Purpose of SQL Injection
The attacker intent of using SQL injection is to expose the security vulnerability occurring in the database layer of an application like queries so to extract or manipulate the web application’s data.
Other than to be able to extract or manipulate the web application’s data, attacker also will be able to understand the database architecture, such as table names. The next steps for the attacker will be to access and view data in important tables or to add data to tables, such as adding new accounts or user names and passwords. Things will get even worse if they have the administrative access to the database as they will be able to do virtually anything to it.
2.2. Current Situation
Up till today we can see that SQL Injection is still the most popular avenue for the attacker as show in the graphs below:
(Graph taken from IBM X-Force 2012 Mid-year Trend and Risk Report, Pg.15)
We can see from the chart above that there is a steady increase in the number of SQL Injection attack from July 2011 to June 2012.