SQL injections
what is SQL Injection?
SQL injection is defined as a technique that takes advantage of non-validated input vulnerabilities and inject SQL commands through a web application that are executed in a back-end database. Programmers use sequential SQL command with client supplied parameters making it easier for attackers to inject commands. Attackers can easily execute random SQL queries on the database server through a web application.
how does it work?
While performing SQL injection, attackers look for pages which allows the submission of data to the backend database, such pages are login page, search page, feedback page, registration page.
Attackers use simple test to find vulnearabilities by simply passing single quotation mark in fields.
how to retrieve any data?
To check for input vulnerabilities, use single quotes. For e.g type in use name text box ' OR 1=1--
this can be used in input box or even in the URL of the web page.
If there is a match, it will login without valid username and password.
Followings are few more inputs attakers may try
- ' OR 1=1--
- " OR 1=1--
- ' OR 'a'='a
- " OR 'a'='a
- ') OR ('a'='a
SQL injection tools
- SQLDict
- SQLExec
- sqlbf
- SQLSMack
- SQL2.exe
- SQlPoke
- NGSSQLCrack
- SQLPing
- sqlmap
- sqlninja
- SQLIer
Preventing sql injection attacks
- Never trust the input of users: check the text box entires by using the validation controls, regular expressions, code etc
- Never use dynamic SQL
- Do not connect to a database using an root level account, use a limited access account.
- Do not reveal much information in error messages.
Comments
Post a Comment