135 points · by there · 16y ago · 39 comments
Personally, I expected that a project such as Savannah wouldn't be vulnerable to an attack as simple as SQL injection.
Seconded. But then again, the GNU source code is mostly C, isn't it? They're used to doing things that most developers would consider intractable and therefore impossible to do safely: such as comprehensively sanitizing inputs so you can safely construct a query string out of them.
"Hey, those web guys say sanitizing inputs is effectively impossible. Should we really be doing this?"
"Snort. That's what they say about manually deallocating memory, too."
"Oh yeah! What a bunch of wimps! I'll get right to work on the query builder."
Date: Tue Nov 30 01:34:15 2010 Pseudo: mjflick - Savannah Hacker Comment: re: HappyCrow,
Only one project was targeted in this attack.
Second, a postmortem will be forthcoming, as well as more information shortly from the FSF staff, who are planning on making an official announcement about this.
It illustrates how much of a pain SQL injections are, if they can affect the GNU project which has some of the most incredibly talented hackers worlwide...
Props to them for having a working backup strategy though.
Parameterized queries are a good thing, and you should use them, but I feel like I've had to be a broken record about this over the last week: they are not magic anti- SQL injection fairy dust. Our whole team spends most of its time looking at smart people's code, and we routinely find SQL injection.
Plenty of people who aren't ignorant of SQL injection manage to let SQL injection slip through. Knowing how SQL injection works and being able to devise and implement engineering procedures to reliably prevent them are two very different things.
People don't do those in JavaScript?
That's what I did a decade ago. Well, then I moved it back to the server after we got tired of the performance problems that JavaScript had back then. But today it wouldn't be an issue. And when we moved it back, we were careful not to have an SQL injection attack. If memory serves we actually did the resort in Perl. (In our defense, much of the data we were serving lived in flat files, or were generated on the fly from a compute server, instead of coming from a database.) However at another company I had the same problem, and I did the obvious "process CGI parameter, insert appropriate ORDER BY statement". Where the definition of appropriate was by column position, from which I worked out the field to sort by, so I didn't have to trust the client for the name of that column.
I should back up. We didn't have any SQL injection attacks that I knew of and were reasonably careful. But that code base did not get audited, so I can't really know that. However after the next company that I worked for got bought by eBay, they did a penetration test on us. The worst thing that they found was an open redirect that could be used to let a spammer construct a link to any web page with us as the referer.
I'm happy to use this as a testament that programmers really can avoid SQL injections. However their surprise that they didn't find any SQL injections in our code supports your claim that most teams fail to do so successfully.
Most, if not all, software after a certain point of complexity has vulnerabilities (yes, even mine). This has absolutely nothing to do with how talented their hackers may be and more with the inevitability of someone, somewhere, working hard to find, and abuse, exploits.
edit: I typed more than I intended to here, but my gist is that you're really taking light of the situation here, trivializing all of the work that has gone into gnu projects when you quote "incredibly talented hackers" and follow it up with a useless throwaway phrase like "lololololo". I thought HN was better than this.
http://news.ycombinator.com/user?id=konad
Two previously banned accounts. It looks like HN is better than this, as a whole.
[X] Reset passwords
[/] Fix SQL injection and look for potential others
[ ] Implement crypt-md5 support (like /etc/shadow, strong and LDAP-compatible) hashes
[ ] Implement password strength enforcement
So they're basically forcing password resets, even though people can use "password123" in plaintext on a site that's not completely audited for vulnerabilities?[X] Put services online using backup, except for password-based ones (e.g. the web interface)
The other step you omitted is the one where they allow people to log in after fixing the vulnerability.
As for the audit, there's no such thing as a complete security audit, and there's no reason to keep the site down in fear of hypothetical holes.
Re. audit - of course you cannot be sure, but once you get taken over and your system is offline anyways, it might be a good idea to at least grep the sources for queries and quickly check for obvious stuff. Which is what I assume they're doing.
Or is it that, with a little effort, DVCS' can be hacked/corrupted fundamentally ?
Repeat the same question for git, mercurial and CVS.
In either case, an attacker could add arbitrary commits, and the system administrator would roll back to the last known-good backup as soon as the compromise was detected. I don't think DVCSes help much here.
Original issue date: August 13, 2003
http://www.cert.org/advisories/CA-2003-21.html
ftp://ftp.gnu.org/MISSING-FILES.README
Moving Forward
All releases after the 2003-08-01 date will have checksums GPG-signed by
the GNU maintainer who prepared the release. This assures automatic
certification of the integrity of all GNU source from that date onward.