
How To Test SQL Injection
SQL injection is a web security vulnerability that replaces the OWASP (Open Web Application Security Project) Top 10 every year. In shortly, SQL injection is caused by the fact that the data from the user is directly included in the SQL query.
In the example below, there is a simple login page written in asp language.
FUsername = Request.Form("username")
FPassword = Request.Form("password")
Set RsLogin = SQLConn.Execute("SELECT * FROM Members WHERE username = '" & FUsername & "' AND Password = '" & FPassword & "'")
If RsLogin.EOF AND RsLogin.BOF Then
Response.Redirect "/error.asp"
Else
Session("login") = RsLogin("user_id")
Response.Redirect "../"
End If
Let’s examine this code.



