Yesterday i received an email from a guy that our site is vulnerable to SQL injection. The email said:
I tried some classic SQL injection on
your server. This URL contains the
result:
Note that in the above URL, i do not expose my actual domain and have replaced it with mysite.com.
Can any one explain what above URL means as my site is vulnerable to that sort of url and possibly to your sites too.
How to decode that url, what is happening there?
The problem is that you’re concatenating that SQL command on the query string into your SQL command.
Presumably your code says something like
Once you use that QueryString it becomes
EG: He’s made your admin account logins show up on your preview page.
You should always make sure to SQL escape any inputs you get from the user, or even better use parametrized queries and the server will take care of that. Without knowing the language or the type of SQL server I can’t really point you in the direction of what code you’d need to do that.