Exploit mysql_real_escape_string()
Date: December 17, 2009 04:37AM
The function mysql_real_escape_string() is used to add a \ in front of "dangerous characters" like single quote.
From ha.ckers.com:
<Evading escapes with backslashes (this assumes the application comments out a single quote with another single quote and by introducing a backslash before it, it comments out the singlequote that is added by the filter). This type of filter is applied by mySQL's mysql_real_escape_string()>
With an sql injection example:
\';
Using the follwing example it possible to get an error message because you end the statement but I wasnt able to create a correct one (blind sql)
admin\' or \'1\'=\'1
Gives me the follwing error:
Error Executing Database Query.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\''1\''=\''1' and password = 'IyVeVEwK' and extranetuser =' at line 3
Any idee how I could make it works?