SQL Injection
SQL Injection
your database.
techniques.
1) In-band SQLi
2) Inferential SQLi
3) Out-of-band SQLi
In-band SQLi
The two most common types of in-band SQL Injection are Error-
based SQLi and Union-based SQLi.
In-band SQLi
Error-based SQLi :
is an in-band SQL Injection technique that relies on error messages
thrown by the database server to obtain information about the
structure of the database.
Union-based SQLi:
is an in-band SQL injection technique that leverages the UNION SQL
operator to combine the results of two or more SELECT statements
into a single result
Inferential SQLi (blind SQLi)
A hacker might get access to user names and passwords in a database by simply inserting " OR
""=" into the user name or password text box:
The code at the server will create a valid SQL statement like this:
SELECT * FROM Users WHERE Name ="" or ""="" AND Pass ="" or ""=""
The SQL above is valid and will return all rows from the "Users" table, since OR ""="" is always
TRUE.
SQL Injection Prevention