Live data from Hacker News

MySQL.com compromised via (guess what?) SQL injection

blog.sucuri.net

71–80 of 117 posts

Re: MySQL.com compromised via (guess what?) SQL injection

#71
post #42

Same guys hit Sun.com via SQL Injection as well - http://tinkode27.baywords.com/sun-com-sun-mycrosystems-vulne... Shameless self plug: Netsparker ( My startup: http://www.netsparker.com/ ) could have identified both of these vulnerabilities.

You're right: that's an annoying plug. Please don't do that.

Why? It's a pretty relevant plug -- I think that's ok!

Re: MySQL.com compromised via (guess what?) SQL injection

#72
post #42

Earlier quoted context omitted.

You're right: that's an annoying plug. Please don't do that.

Why? It's a pretty relevant plug -- I think that's ok!

It's one of a large variety of tools that addresses this problem, which begs for a response clarifying where his product fits in and what its strengths and weaknesses are. Now we're no longer talking about SQLI on MYSQL.COM; we're talking about scanners... because a vendor wants us to.

But, more to the point, how annoying would it be if every time I responded to a comment on HN, I added "this is one of the many things we take care of it you get us to review your applications"?

When threads are about products, I think it's fine --- helpful, even! --- to point out competing offerings and alternatives. But on news stories, let's just keep the commercial offerings off the threads.

Re: MySQL.com compromised via (guess what?) SQL injection

#73
post #45

Earlier quoted context omitted.

Metasploit mostly focuses on Infrastructure and exploiting known vulnerabilities. Netsparker is solely focused on web application security (detection & exploitation). For example Netsparker can crawl AJAX/Javascript apps, support form authentication etc. Metasploit on the other hand possibly will never do that kind of stuff.

You are comparing a $1000 commercial product to open source Ruby code. Metasploit is sponsored by Rapid7, which does in fact have a product that is competitive with your offering. Do we need to get into a detailed discussion of why I think the plug for your scanner is inappropriate for this thread? Or can we just let it suffice to say that HN isn't a great place to promote products on random threads?

I'm not comparing, I'm telling the difference. Just like Netsparker will not do port scanning, possibly Metasploit will not do full web app stuff. You can talk with someone from Rapid7 and they'll tell you the same thing. And for the record I love Metasploit, it's a fantastic tool.

We have a good relationship with Rapid7 guys, they even has a module to import Netsparker results into Metasploit and we keep getting synced with them in new updates.

> Or can we just let it suffice to say that HN isn't a great place to promote products on random threads?

Personally I love seeing other HNers to send their relative products, projects, startups, commercial ideas, job ads in HN threads, I don't think there is anything wrong with that. You might think otherwise, that's why there is one upvote and one downvote button.

Re: MySQL.com compromised via (guess what?) SQL injection

#74
post #35
post #31

Earlier quoted context omitted.

> You don't need parameterized queries or stored procedures for protection against injection ... There's no need for the database's native wire protocol to explicitly support parameterization to implement this. This means that every protocol client must implement their own query escaping, rather than relying on the database to provide a single, normative implementation of escaping. > For example Ruby on Rails's Activ…

It is not unreasonable to assert that SQLI defense is a framework concern, not a database issue. The examples you've provided of Rails SQLI issues are bad ones: * The first is a discussion of SQLI in an interface designed to accept raw SQL; it's the ActiveRecord "back door" interface. * The second is a discussion of SQLI in a context where parameterized queries don't work anyways (the MySQL protocol doesn't accept LI…

> you can solve it by blindly calling #to_i on your inputs

"You can solve it by blindly calling #h on your outputs"

Ouch. We know that scheme doesn't work too well: it's why we had #h and we now have #html_safe...

Re: MySQL.com compromised via (guess what?) SQL injection

#75
post #45

Earlier quoted context omitted.

You are comparing a $1000 commercial product to open source Ruby code. Metasploit is sponsored by Rapid7, which does in fact have a product that is competitive with your offering. Do we need to get into a detailed discussion of why I think the plug for your scanner is inappropriate for this thread? Or can we just let it suffice to say that HN isn't a great place to promote products on random threads?

I'm not comparing, I'm telling the difference. Just like Netsparker will not do port scanning, possibly Metasploit will not do full web app stuff. You can talk with someone from Rapid7 and they'll tell you the same thing. And for the record I love Metasploit, it's a fantastic tool. We have a good relationship with Rapid7 guys, they even has a module to import Netsparker results into Metasploit and we keep getting syn…

Metasploit isn't web application penetration tool. W3af, the other open source security tool Rapid7 sponsors, is. Meanwhile, Rapid7's commercial offering, Nexpose, also crawls Ajax applications and, if this flaw is as simple as people seem to think it is, would likely have found it... as would OWASP WebScarab or Burp (a tool that costs a fraction of what your tool does and belongs in the back pocket of every web developer).

I'm responding harshly because I do not agree with your logic (to wit: any thread involving security is a great place to plug your scanner) and because I found your comparison of Netsparker to Metasploit disingenuous: Metasploit simply isn't Rapid7's web app offering.

Re: MySQL.com compromised via (guess what?) SQL injection

#76
post #74
post #35

Earlier quoted context omitted.

It is not unreasonable to assert that SQLI defense is a framework concern, not a database issue. The examples you've provided of Rails SQLI issues are bad ones: * The first is a discussion of SQLI in an interface designed to accept raw SQL; it's the ActiveRecord "back door" interface. * The second is a discussion of SQLI in a context where parameterized queries don't work anyways (the MySQL protocol doesn't accept LI…

> you can solve it by blindly calling #to_i on your inputs "You can solve it by blindly calling #h on your outputs" Ouch. We know that scheme doesn't work too well: it's why we had #h and we now have #html_safe...

Not comparable. h() was a one-sized-fits-all problem to quoting things that could occur anywhere in an HTML DOM. #to_i assures that a bit of syntax that can only ever accept integers is in fact given a real integer.

In case we're misunderstanding each other, I'm also saying that the framework should be doing that, not the caller (as was the case with h()).

Re: MySQL.com compromised via (guess what?) SQL injection

#77
post #40
post #37

Earlier quoted context omitted.

Could you expand a bit on how parameterized queries are not sufficient for defense against SQL injection (assuming, of course, that developers use the escaping and do not concatenate unescaped data into queries)? As for them being required -- you can obviously escape queries yourself, but the normative reference for escaping is the target database itself, and reproducing escaping locally in the client brings with it…

Not every "input" to a "query" (using these terms loosely) can be bound as a variable. Simple example: ASC and DESC. There are trickier examples that are still common. It is a bad idea for applications to implement quoting regimes, and it is a bad idea for frameworks to try to create one-size-fits-all quoting regimes like PHP used to. That doesn't mean it's a bad idea for a framework's e.g. MySQL support to provide t…

The problem with that is that almost nobody uses the official database APIs. The official APIs are usually C libraries (e.g. libmysqlclient) but pretty much everybody uses third party wrappers (e.g. Perl DBI, the mysql/mysql2 gem for Ruby, the PHP default MySQL bindings, etc). Few people program against the database in C or C++. It was and is up to the third party API providers to provide easy sanitization APIs, I don't see how MySQL could have changed that situation by providing such APIs themselves.

Re: MySQL.com compromised via (guess what?) SQL injection

#78
post #67

Oracle's security team bear full responsibility for this breach. MySQL's founder Monty Widenius left Sun in 2005. Sun declined, Oracle bought them as a strategic buy and the portal has been neglected to the point of being compromised. One wonders what internal neglect MySQL is suffering behind the corporate veil.

You're suggesting that this vulnerability was introduced by Oracle?

Re: MySQL.com compromised via (guess what?) SQL injection

#79
post #48

What really pisses me off about this is that you had to register just to be able to download the files. So they unnecessarily had a lot of people's username/passwords for absolutely no good reason.

Who downloads MySQL from their site?

Who downloads MySQL?

Re: MySQL.com compromised via (guess what?) SQL injection

#80
post #79
post #48

Earlier quoted context omitted.

Who downloads MySQL from their site?

Who downloads MySQL?

I do, every time I do an "aptitude install" or a "yum install", but not from their site. And the original source was probably downloaded from version control, not the public site. Also, when I do that with Drizzle, I am downloading a lot of MySQL with that.

But I agree. Most of the time, I prefer PostgreSQL.

Post reply on HN