MySql.com Hacked With Sql Injection 288
iceco2 writes "MySql.com and associated sites were hacked today. Among other items some simple passwords were recovered and private emails were revealed. Ironically the attack was performed using a blind sql injection attack."
Another report (Score:2)
Incoming botswarm (Score:5, Funny)
Re: (Score:2, Insightful)
No offense. Bad code can be written in any language.
Re: (Score:2)
* The domain's SSL expired a month ago
* Some of the passwords for the account 'sysadm' was “qa”
* Their website was obviously not properly secured
Re: (Score:2)
This article is a tad harsh on MySQL.com - and rightfully so:
That should have been This article [securingsqlserver.com]. D'oh!
Re: (Score:2)
Of course. That is hardly relevant. The question is, how hard is it to write bad code?
Re: (Score:2)
Of course. That is hardly relevant. The question is, how hard is it to write bad code?
Far easier than to write a good code, no matter the language (on some languages, it's even impossible to write good code)
Re: (Score:3)
Of course. That is hardly relevant. The question is, how hard is it to write bad code?
I think SQL databases / drivers could do a lot more to protect themselves from bad programmers. For example we all know that a prepared statement is safer from SQL injection than an ad hoc one because params are properly escaped. So why allow ad hoc statements at all by default? Seems to me that drivers should require the app to explicitly override safeguards if they want to dangerous things. Likewise SQL comments are often used to disable the rest of an injection attack but why are they needed in client si
Re: (Score:3, Interesting)
Re:Another report (Score:4, Informative)
Comment removed (Score:5, Interesting)
Re: (Score:3)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Using PDO isn't sufficient. You also have to bind all your values/parameters. Just sticking variables into the SQL statement wont' save you.
Then there's the extra round trip performance overhead of using a prepared statement if created in PHP and not saved in MySQL.
Re: (Score:2)
Re: (Score:2)
I have been a C# developer since .NET 1.0, and worked with MS SQL Server just as long. I love them, and recommend them wholeheartedly to everyone I know. But if you think C# + MSSQL = Safe, you've probably already been hacked.
Sure, C# via ADO.NET has parameterized queries to help prevent SQL injection, and we have the Entity Framework and such goodies, but all I need to do is "SELECT * FROM MyDB WHERE ID = " + queryStringID + ";". String concatenation... it's a feature of C#, and because of it you sudden
Re: (Score:2)
>As a hobbiest web based game developer it's performance I wouldn't have money to get elsewhere.
sooo... you really haven't been far as decided to use even go want to do look more like, I guess.
Re:Another report (Score:4)
Re: (Score:2)
Well, I think it's one of the major problems with C# and MS SQL Server. By default the combination allows extremely unsafe code. or I should even say encourages. I'm all for allowing for the coder to take those routes if he wants to, but for the love of god, teach the noobs to program safely. While you can use safe methods with C# and MS SQL Server, other languages encourage it. For example befunge98 combined with Paradox makes sure the programmer is coding safe code. On top of that Paradox is speedy, stable product that is used by millions individuals and enterprises. For me that sure does tell about quality, and by looking at the companies using the PDP-11 I'm even happier to pick it as my platform. btw, I personally found their Paradox Baby Shit Orange cloud-based databases services absolutely stunning. They are highly scalable, ultra fast and automatically taken care of for you. As a hobbies useless pre loaded crapware developer it's performance I wouldn't have money to get elsewhere. And the sheer quality of the service is absolutely great.
or to put it another way, shit programmers write shit code, regardless of the tools they use. Begone to the special Hell they keep for corporate schills you obvious schill.
oh and by the way, more people and companies using a product is more likely to mean there is a reality distortion field or illegal anti-competitive behaviour surrounding a product if the past 30 years is anything to go by. Shit for brains.
Re: (Score:2)
Re:Another report (Score:5, Insightful)
Note the parent's comment.
Does anyone still want to challenge my assertion that Slashdot is under an ongoing escalated attack from organized astroturfers of the New Media Strategies and Reputation Defender variety? I'm betting the MS is using in-house talent for this purpose, but it's quite possible that they are using New Media Strategies or another such company to keep the activity at arm's length to provide deniability. I wouldn't be surprised if 100,000 or more of the accounts with UIDs over 1500000 belong to employees of these companies or departments. Slashdot is a good target for them because so many of us are in influential or decision-making positions at our companies or are opinion-drivers due to our reputation as "computer nerds". A Slashdot story with an energetic discussion which is negative on say, AT&T can have an out-sized influence on opinion regarding that company, due to both word of mouth and search engine results.
One only has to watch any story that is critical of a major US company to see this behavior, which usually shows up as ignorant "frosty piss" trolling followed by >2000000 UID comments (often densely written) followed by a string of sockpuppet "bumping". The tactic is to disrupt the discussion to the point where serious opinion is abandoned. It can work because many don't have java-script enabled so you can't even collapse the offending thread.
Re: (Score:2, Insightful)
I agree with you, but sometimes a nigger joke is just a nigger joke. I wrote a nigger joke in one story and it made first post. Then you went all ape-shit (pun intended) about how it's THEM!!!! conspiring to take over teh solar system or something ... that made my day dude. I think the neighbors could hear me laughing.
B
Re: (Score:3)
To be fair, I think we're seeing an attack of mil-spec astroturfers and their sockpuppets. I don't expect Slashdot to have been able to have been omniscient enough to have anticipated this.
But now that it's here, I think it's an issue that anyone who uses the Internet to get information or opinion has to be aware of and address.
FUCK. OFF. (Score:3, Insightful)
Go die in a hole. What complete, utter and total fucking twat.
Re: (Score:3)
You do understand that every time you post such crap in a Slashdot story (and it seems to be in Every. Single. Fucking. One.), you do nothing but drive more bad feeling towards Microsoft? If you want to do advocacy, fine - but then study what you're promoting enough to be able to meaningfully argue in favor of it, rather than spewing pure concentrated marketing drivel ("makes sure the programmer is coding safe code" - WTF?).
This isn't a room full of clueless PHBs where the higher your concentration of buzzw
Bad link in summary (Score:2)
Should be: http://techie-buzz.com/tech-news/mysql-com-database-compromised-sql-injection.html [techie-buzz.com]
(There is an extra l in the summary's link.)
USE BIND VARIABLES (Score:5, Interesting)
Jesus fuck, people. It's not rocket surgery.
If you use bind variables, you CANNOT be SQL-injected.
If you don't, you can be.
It's that fucking simple. Do The Right Thing.
Re: (Score:3)
Note that this doesn't mean you should assume you're safe just because you're using bind variables -- be aware of stuff like LIKE, for instance.
But yes, that is exactly the frustration I have when I hear about things like this. There's pretty much never a reason to build your own SQL string outside of a library.
Re: (Score:2)
Note that this doesn't mean you should assume you're safe just because you're using bind variables
For example, bind variables are a great way to store the wrong value in the wrong column. Admittedly I'd rather discover that bug in the unit tests on the dev server, than discover the injection on the production server, but I can none the less hear the siren call of doing it the wrong way...
Now what would be nice would be libraries for ALL languages that look like convenient, yet vulnerable, inline SQL but translate behind the scenes into bind variables.
Also fun, if the (numerous) lint-y / perltidy-y what
Re: (Score:2)
Not to negate your argument (with which I agree), I want to demonstrate a case where building your own SQL string makes sense. Suppose you want to perform a SELECT that matches a set rather than a given value:
The prepared statement is a function of the number of VINs in the set. Something like this python code:
Re:USE BIND VARIABLES (Score:5, Insightful)
My eyes, they bleed! Write that like:
Or even better:
Voila. Those work, they're not hideous, and they prevent injection. To repeat the earlier idea: there's no need to write unsafe code. If you are, you're in the wrong line of work.
Re: (Score:2)
I prefer:
$db->select('make, model');
$db->where_in('vin', $vins);
$db->get('vehicle');
Ahh CodeIgniter. I dont write SQL anymore.
Re: (Score:2)
Are you saying MySQL does not escape the delimiter characters within values passed to the LIKE operator?
Re: (Score:2, Funny)
I like slashes
Re: (Score:2, Funny)
addslashes() is unsafe. In PHP you want to be using the standard function "mysqlreallyescapethingsanddoitproperlythistime()". Don't go using "mysqlescapethingscorrectly()" by mistake, that one is completely insecure.
(Seriously, why do people use PHP?)
Re:USE BIND VARIABLES (Score:4, Informative)
Re: (Score:2)
Re: (Score:2)
Re:USE BIND VARIABLES (Score:5, Funny)
Jesus fuck, people. It's not rocket surgery.
Apparently it's brain science.
Re: (Score:2)
I'm of the new school and prefer rocket brain....
Re: (Score:3)
Yo Dawg (Score:5, Funny)
I herd you like Sql, so we injected Sql in your Sql so you can have Sql while you code MySql
Re: (Score:2)
Re:Yo Dawg (Score:5, Funny)
Honestly, "YourSQL" seems more accurate than "MySQL" given that apparently even the developers can't keep control of their own database. ;P
Re:Yo Dawg (Score:4, Funny)
Re:Yo Dawg (Score:5, Funny)
An SQL statement walks into a bar and sees two tables and says, "Hello, may I join you?"
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Oh René! I saw him. He was a bit out of his head, walking around all uncoordinated. I think he had already been drinking a while.
Re: (Score:2)
InnoDBody knows the injections I've seen,
InnoDBody knows my sort order
InnoDBody knows the injection I've seen
Shoulda used MyISAM!
Too funny (Score:2)
The work of a lonely developer (Score:4, Insightful)
Re: (Score:2)
Quite possibly on the lone programmer, almost certainly on the code review. The NSA has some nice whitepapers on how to prevent SQL injection attacks, though they could really be summarized as "follow parent post's advice".
Re: (Score:3)
That is so fucking sad. Imagine your first day at work at the puzzle palace, expecting to work on some shit hot, high tech, super secret stuff and they say "write a paper on how to avoid SQL injection attacks."
Well ... (Score:2)
Could've been worse. Imagine something like this had happened to Zend!
Too bad (Score:2)
Too bad it's not "unbreakable" like Oracle's other database...
Re:Too bad (Score:5, Insightful)
Let's think if Oracle has something to gain from intentionally tarnishing the reputation of a product they want to kill.
I'm not saying it's foul play for sure, just pointing out they do have an incentive to do so.
Re: (Score:2)
Yeah, they might convince more people to switch to PostGres!
Re: (Score:2)
Yeah but so does everyone who's ever worked with databases and doesn't have their head stuck completely up their ass. Let's pray this piece of shit is dead and buried soon.
Re: (Score:2)
Yeah, that's why I had it in quotes. I could've added a giant smilie or something, I guess...
Does xkcd explain it? (Score:3, Funny)
Like this [xkcd.com]?
Re:Does xkcd explain it? (Score:4, Insightful)
I have that comic taped to my door. Any programmer who walks by, reads it, and doesn't laugh is someone I watch VERY carefully when they write any code that touches a database.
Re: (Score:3)
On the other hand if the same guy walks by often and laughs at that every single time, I would just watch VERY carefully to make sure they don't bring in a firearm.
Take it a step further. We can learn from this. (Score:3)
bobby-tables.com: A guide to preventing SQL injection [bobby-tables.com]
What year is it? (Score:2)
Are there really still people out there mashing user input together into a string that they then feed to the database?
Why would you even do this - it's not easier, the performance is worse, and it certainly doesn't make for more readable code.
This level of ineptitude is just shocking.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Simple solution - fire the 80 incompetent ones, the other 20 will be able to get a lot more done. Heck, also give them 1/4 of the money you were wasting on the dead weight.
Re:What year is it? (Score:4, Funny)
When interviewing people for QA positions, I routinely ask "Do you know what an SQL injection attack is?"
I have never yet interviewed a candidate who answered yes.
So, then I explain what an SQL injection attack is, and ask how they would test for vulnerability to one.
Almost without exception, the answer is "I guess I would try entering some special characters and keywords into the GUI, and see what happens."
Re:What year is it? (Score:4, Insightful)
When interviewing people for QA positions, I routinely ask "Do you know what an SQL injection attack is?"
Hahaha, reminds me of what I used to do to interns. We used to get a bunch of interns every year, and every year we'd have them develop small web applications for internal use. They'd work on their project and after a few weeks we'd come in and evaluate their work, steer them in the right direction (if that wasn't necessary earlier) and do a few tests.
The first thing I always asked was "Do you have a backup?" and after the inevitable googling of the mysqldump command I'd be an utter bastard and sneak in a DROP TABLE, or DELETE FROM statement in the URL bar, right after id=x, and surely enough most of the times it would work.
"It looks really great, but I think there's a problem with it. Maybe you want to check the logfiles to see what happened." to see if they'd see what was the problem, and if they didn't I would explain an SQL injection attack to them. Few of them managed to find the solution on google, but most immediately suggested such things as "I'll check for ; in the string" which inevitably led to me trashing their tables about 10 minutes later. I have to say, once they had their tables dropped twice they became real careful of permissions and handling SQL statements.
In a way I hope they learned something from having a complete bastard as a mentor, although I'm sure that a few of them have already forgotten about that one time a single statement ruined their database. Oh well...
Password hashing + salt? (Score:2)
The hackers acquired the database with the hashed passwords. Then the hackers ran the password hashes against a rainbow table [wikipedia.org] which returned the matches for the simple passwords. Now the reason this is incompetence or ignorance is the simple inclusio
Re:Password hashing + salt? (Score:4, Informative)
The salt isn't a second secret, it's there to prevent the use of a pre-constructed rainbow table for the standard hash functions. Without a rainbow table, you can still do dictionary attacks of weak passwords--and there is no way to prevent this short of not using passwords for authentication. This only harms people who use guessable passwords and re-use passwords between sites.
Re: (Score:2)
That would only work if you had the hashing function with the salt string. If you're talking about plain old brute force attack against the hashes, well that won't work without the hash function
Re: (Score:2)
There is one incorrect assumption in your reasoning. You don't have to use one salt for all passwords, you can easily use a different salt per entry, and store it along side the password. This way, even if your database is compromised, and the salts are know, you still have to create a different rainbow table for each entry to be able to try and guess the password. This effectively kills the ability of the breacher to fish around for insecure passwords.
You can never sanitize inputs enough. (Score:2)
You can never sanitize inputs enough.
Repeat that to yourself 1,000 times. It's impossible(*).
Parameterized queries / bind variables are the only valid solution.
If you keep convincing yourself you don't need to use bind variables, and that you can sanitize your inputs enough you've already failed.
* - Of course it's mathematically possible to sanitize inputs enough; because theory, and reality don't have a damn thing to do with each other. Reality says you will fuck it up and the hackers will find it in less
Re:That's Not Ironic (Score:5, Insightful)
Ironic is when one's words say one thing and one's actions another that contradict it.
No, that's hypocrisy, not irony. Try again.
Re:That's Not Ironic (Score:5, Funny)
Ironically, the OP correcting someone else for not using ironic correctly is both hypocritical and ironic.
Re:That's Not Ironic (Score:5, Funny)
Screwing up irony is the only thing that unleashes the linguists with such ferrousity.
Re: (Score:2)
...unleashes the linguists with such ferrousity.
And of course spellings... try ferocity.
Re:That's Not Ironic (Score:5, Funny)
Re: (Score:3)
Hint: He's punning on "ferocity" and...ya know..."ferrous" [reference.com].
Re: (Score:2)
hehe... wish I hadn't replied... that is a good one. :) mind if I... um... "borrow" it next chance I get?
Re: (Score:2)
The above is what makes me really enjoy reading /. :)
I think my funny bone broke under the strain..
Re: (Score:3)
If we're going to get on a grammar nazi binge, then it's worth pointing out that one of the definitions of Irony is actually exactly what the GP described... (merriam webster's exact words are "the use of words to express something other than and especially the opposite of their literal meaning".) He may not have expressed it properly, but I do think that was the meaning he was trying to get at.
Though interestingly enough, yet another definition of Irony is an incongruency between an expected result and an
Re: (Score:3)
Re: (Score:2)
Meh, security is a bit of a cross-cutting concern. People who are thinking about how read/write rows of data quickly might not have given it much thought that their product can be abused in this way.
I will give you that injection attack is a rather basic hack they should have thought about.
Re: (Score:2)
Re: (Score:3, Funny)
You would expect a person correcting the summary's definition of irony to be aware that there are multiple definitions of irony. The grandparent was clearly ignorant of this fact, thus making the comment meta-ironic.
Yes it is (Score:5, Informative)
Ironic is when one's words say one thing and one's actions another that contradict it.
No, that is hypocritical. Situational Irony is where the outcome is has a humorous incongruity or discrepancy from what one would expect, or from what would normally be implied by the situation. The fact that the company which produces and sells MySQL wasn't using SQL correctly is indeed ironic.
Re: (Score:3)
Having used MySQL, I don't see anything unexpected here.
Re: (Score:2)
Situational Irony is where the outcome is has a humorous incongruity or discrepancy from what one would expect, or from what would normally be implied by the situation.
I hate the whole "situational irony" thing... It's bullshit. Situational irony didn't exist until a crop of kids were poorly educated in what irony actually is, and then Alanis wrote her song, and everybody was running around calling everything ironic. It wasn't actually ironic in any way... But trying to correct everyone under the age of 20 in America is a losing battle... So they gave up and said "yeah... it's a different kind of irony..."
Yes, I know, language is a consensus. It grows and changes o
Re: (Score:3)
The situational meaning of "irony" is very old and well-established, and in fact probably predates the linguistic meaning. [wikipedia.org] Look it up, and don't try to impose your own ignorance on everyone else.
Re: (Score:2)
Ironic is when one's words say one thing and one's actions another that contradict it.
No, that is hypocritical. Situational Irony is where the outcome is has a humorous incongruity or discrepancy from what one would expect, or from what would normally be implied by the situation. The fact that the company which produces and sells MySQL wasn't using SQL correctly is indeed ironic.
Excuse me, is this the right room for an argument? [youtube.com]
Re: (Score:2)
The fact that the company which produces and sells MySQL wasn't using SQL correctly is indeed ironic.
Actually, it's exactly what I would expect.
Sincerely,
Smug PostgreSQL bigot
Re: (Score:2)
Unlike the reserved words of a computer program, words in a natural language have a wide latitude of uses, from the strict to the colloquial. Here, I see the "irony" in how a site designed to promote some type of "SQL" turns out to suffer from an SQL flaw, in effect negating the product's virtues in the eyes of those who like to skim through IT news headlines. It's similar to the way you expect a dentist to have good teeth.
Ironic is when one's words say one thing and one's actions another that contradict it.
I think you're thinking of another word: hypocrisy, e.g., a politician who claims to
Re: (Score:2)
Merely related ideas are not "ironic". Ironic is when one's words say one thing and one's actions another that contradict it.
Like rain on your wedding day?
Re:That's Not Ironic (Score:5, Funny)
Like Oracle not seeing it coming?
Re: (Score:2)
Re: (Score:2, Interesting)
Perhaps you need a little refresher on irony.
Few but the most naive would expect the MySQL.com site to be written by nubies and rubes so unsophisticated as to depend on remedial examples of anything found "floating around the 'net". To the contrary, most people would expect MySQL.com to be maintained to somewhat high levels of security in particular at the level of the database. This is the construction of the irony in this case.
"How ironic, now he's blind after a life of enjoying being able to see." --