Since they're using SQL Server (hint is that they are checking for "xp_"), you can get a list of all of their databases with "SELECT name FROM sys.databases", then loop through and drop them. Hope the web login doesn't have drop permissions.
How not to protect against SQL injection (view source)
11–20 of 125 posts
Re: How not to protect against SQL injection (view source)
#12Earlier quoted context omitted.
I was thinking the same thing. Let's hope that's true.
It would seem kind of stupid if they were smart enough to implement validation but not smart enough to limit user access to it. Of course there's no accounting for the depths of stupidity.
function getTime() {
}
It's not at all improbable that somebody told them their site was vulnerable to SQL injection, so they took a brief glance at the Wikipedia page and said, "I know, I'll just stop people from writing this stuff." So they open up the page where people might be entering the malicious text and write some code that will stop them. They run it in their browser and it works — none of their SQL strings make it through. They have now fixed the problem, as far as they are concerned, and the site owner doesn't know enough to tell them how utterly braindead their approach is.Re: How not to protect against SQL injection (view source)
#13Doing web security well is hard, too hard. Everyone gets caught with a security bug sooner or later, even google. It's easy to laugh with silly coding like this, but I blame the technology for allowing SQL injection in the first place. SQL is simply a bad API to be using in a web app.
Re: How not to protect against SQL injection (view source)
#14Re: How not to protect against SQL injection (view source)
#15Re: How not to protect against SQL injection (view source)
#16Re: How not to protect against SQL injection (view source)
#17Upvote here if you too have discovered sql injection vulnerabilities in your own web apps.
Re: How not to protect against SQL injection (view source)
#18The saddest part is that tons of people will be reading this thinking that they're way smarter than that guy, while in fact their sites are wide open to exploitation as well. That last statement probably applies to me too. Doing web security well is hard, too hard. Everyone gets caught with a security bug sooner or later, even google. It's easy to laugh with silly coding like this, but I blame the technology for allo…
sql_query('SELECT * FROM mytable WHERE name = ?', name)
(I'm aware that this defeats the purpose of prepared statements to be reusable - this is just an API that's better than the current methods)Re: How not to protect against SQL injection (view source)
#19Re: How not to protect against SQL injection (view source)
#20Looking at it that way makes it a much more understandable (and all-too-common, unfortunately) oversight.