views:

144

answers:

4

I'll provide a simple one here:

$query = "select id from accounts where email='$_POST[email]' and psw='$_POST[password]'";
$result = mysql_query($query,$con);
if($row = mysql_fetch_assoc($result))
    return true;
else
    return false;

If the password is 1' or '1'='1,then will do the trick!

What other tips have you known?

A: 

SQL Injection - Forms of Vulnerability

Ben S
A: 

These are other popular forms of SQL Injection Detection and Testing:

  • Union Query SQL Injection Testing
  • Blind SQL Injection Testing
  • Stored Procedure Injection

Testing For SQL Injection

Shankar Ramachandran
+1  A: 

Probably the most popuplar example of SQL injection ( from XKCD):

alt text

MadCoder