Home Contact Sitemap

Interworld Commnet Blogs

Where innovation begins

building image

rss feed technorati fav

Categories:


Archives:


Our Sevices

  • Mobile Application Development
  • Web Based Application Development
  • Search Engine Optimization
  • Web Site Designing
  • Web Hosting Services
  • Web Crawling Services

Interworld commnet is company dedicated to web design, mobile application,web development and SEO optimization. This blog is dedicated to the most recent technical web and mobile developments , problems and their solutions.

What is SQL Injection?

Published by admin | Filed under SQL Injection

SQL (Structured Query Language) is a standard computer language used for accessing and manipulating databases. But in this article we aren’t going to learn SQL but of course we would learn about SQL Injection. This is an extension of hacking or we can also call it as a web attack.

SQL Injection is one of the many web attack mechanisms used by hackers to steal data from organizations. It is perhaps one of the most common application layer attack techniques used today. It is the type of attack that takes advantage of improper coding of your web applications that allows hacker to inject SQL commands into say a login form to allow them to gain access to the data held within your database. It is a subset of the unverified user input vulnerability and the idea is to convince the application to run SQL code that was not intended. If the application is creating SQL strings naively on the fly and then running them, it’s straightforward to create some real surprises.

We use SQL to manage our database in such a way that it allows visitors to submit and view data in our website(s).It is done by sending SQL queries to the database from our websites. Normally, these queries are combined with any input from user Such as login pages, support and product request forms, feedback forms, search pages, shopping carts and the general delivery of dynamic content, shape modern websites and provide businesses with the means necessary to communicate with prospects and customers. These can be the general fields that a website requires to communicate with their users/customers.

SQL Injection is the hacking technique which attempts to pass SQL commands (statements) through a web application for execution by the backend database. If not sanitized properly, web applications may result in SQL Injection attacks that allow hackers to view information from the database and/or even wipe it out. Through SQL Injection, a visitor can retrieve unauthorized information from our database by mending those queries. A hacker can do certain damages to the database of a website if proper steps (to stop SQL Injection) are not taken at the time of development of website. These damages may include:

  • Retrieving confidential information.
  • Getting access to password protected/unauthorized pages like Admin Panel.
  • Retrieve the design of database.
  • Update data in the tables of database.
  • Drop/Delete any table form database.


Now think, how much dangerous this SQL injection can be to your website. A hacker can have access to confidential Pages/data of your website. Or can change the title of all products or can remove an important table from your database like the Login table. A hacker can totally destroy the database of a website through SQL Injection

How can we get rid of SQL Injection?

  • Validate All Inputs: First off all we need to validate all user inputs in our website by testing type, length, format, and range. We implement precautions against malicious input; consider the architecture and deployment scenarios of your application.

We can validate all the inputs of the user by:

1. We reject entries that contain binary data, escape sequences, and comment characters to verify input from the user.

2. Using Stored Procedures to Validate user Input

3. Test the size and data type of input and enforce appropriate limits.

4. we reject input that contains the following characters:

Query delimiter (,)

Character data string delimiter (‘)

Comment delimiter (–)

Text between /* and */ (/* … */)

  • Use Type-Safe SQL Parameters: We use the Parameters collection so that the input is treated as a literal value instead of as executable code. An additional benefit of using the Parameters collection is that we can enforce type and length checks also because values outside the range will trigger an exception.

  • Using Parameterized Input with Stored Procedures: Stored procedures may be susceptible to SQL injection if they use unfiltered input. So all the input provided to the stored Procedures is provided in the form of parameters with data type and length checks.

  • Filtering Input: Filtering input is also helpful in protecting against SQL injection by removing escape characters. However, because of the large number of characters that may pose problems, this is not a reliable defense. However, we replace a Single Quote (‘) with two Single Quotes (‘’) to filter the input.

  • Limit database permissions and segregate users: The web application ought to use a database connection with the most limited rights possible: query-only access to the members table, and no access to any other table. The effect here is that even a “successful” SQL injection attack is going to have much more limited success. Here, we’d not have been able to do the UPDATE request that ultimately granted us access, so we’d have had to resort to other avenues. It should go almost without saying that System Administrator (sa) rights should never be used for any web-based application.

  • Configure error reporting: The default error reporting for some frameworks includes developer debugging information, and this cannot be shown to outside users. Imagine how much easier a time it makes for an attacker if the full query is shown, pointing to the syntax error involved. This information is useful to developers, but it should be restricted - if possible - to just internal users


When in early days we “Interworld Commnet” got to handle INJECTED websites then we started researching to get ways of saving a website from getting hacked. And now When we have found all the ways how a hacker can inject your website, and we have found all the ways to save your website, We build your website in a way that it can’t be hacked or it can’t be inject easily, our innovative programmers write programs very clearly, and don’t use improper manners of programming, that can help a hacker to have access of unauthorized data. We code in a very proper and professional way that it becomes almost impossible for the web application to be injected easily. We can also use some encryption algorithms for security of web applications if our client demands.

If you want us to solve your problem or you want to get a website built, we “Interworld Commnet” are always here in your service.

Comment now » . January 11th, 2008