News for hackers. Stuff that matters.
Re:Why NoSQL Equals NoSecurity by ZephyrP on Saturday April 07, 2012 @10:35PM (#3812828)
I'm the author of a (very) new NoSQL datastore called Artifact (http://zv.github.com/artifact/), that, admittedly, is very prototypical and is not representative of MongoDB, Couch, Riak or any of the other major players. I'm also a vulnerability researcher who makes his way in the world finding and dissecting security bugs and holes in network infrastructure.

I feel this article misrepresents a lot of facts about security in the same way that articles discussing the relative security of passwords misrepresent security.

Here's what I mean

Question: Whats the most obvious way to attack a system? Answer: Guess Passwords.

Because this is the most obvious way to attack computer systems, an undue amount of attention is paid to the topic because it's the only way we're aware of. In reality the vast majority of systems compromised happen because of memory corruption vulnerabilities, or in recent years, (predominantly) web bugs like SQLi and LFI. Explaining the dynamics of taking control of a program through smashing the stack and getting EIP is tough, at least in contrast to explaining how guessing passwords works. So people worry that "their passwords aren't secure" despite that any real black hat deleted D8.dic off their harddrive years ago. Thus, theres a million articles and sites on how secure your password is, but not that many to check if you've got address randomization enabled.

Are Blackhats trying to read your NoSQL stores after staging an internal attack? Possibly, but not nearly as likely as the fact that you've got xp_cmdshell enabled. Attacking MongoDB is tractable, and provides numerous opportunities for a wide nop sled w/ memory mapped files and more than enough opportunity for use-after-free attacks in objects, but the same (and then some!) can be said of any modern SQL database.

The fact that query strings are safe in every major NoSQL datastore is such a massive advantage over SQL DBs that, even if you're using prepared statements, NoSQL is almost assuredly more secure in a day to day context, except against zero-days (Which we can reasonably say are less frequent in established datastores, irrespective of their design decisions).

The fact that he quasi-attacks stateful firewall security in the article is pretty much baseless, clever TCP bugs are long since worn out, and all the things that mainstream developers have thought is clever like firewalk(8) haven't been effective since I was 11. It's not unreasonable to trust major commercial firewalls for anything you'd trust SSH for. It's not reasonable to trust C/C++ applications in general, as even the most valorous efforts at secure software have turned up short (The beautiful irony here may be that SSH, as trusted as it is, has had numerous pre-auth exploits in it, as it is written in C++)

Finally, let's be real, as an article aside -- SSL does absolutely nothing. Every single year there are multiple complete breaks in what SSL is supposed to do, both practical and theoretical. These complete breaks are regularly released with executables, so don't give me that "We're only raising the ba-" Nope, ASLR and W^X raise the bar, you could argue SSL widens your attack surface on anything but HTTP transactions. Furthermore, if MITM is the biggest thing you're worried about then I'd encourage you to download any of the latest XML parsing libraries or PDF readers to rectify that -- it's tragically only minor exaggeration to say attacking these complex, loosely interacting components such as parsers to stage a more complex internal attack is organizational computer hacking in 2012.

Re:Why NoSQL Equals NoSecurity by tptacek on Sunday April 08, 2012 @01:04AM (#3813132)
All firewalk did was port scan through firewalls. It wasn't some magic trick that got you root on them.

I don't know what you're trying to say with regards to SSL, or how it can be reasonably compared to runtime hardening.

Re:Why NoSQL Equals NoSecurity by ZephyrP on Sunday April 08, 2012 @01:43AM (#3813197)
Most firewalls can be configured to block packets with a TTL greater than the route hop count back or simply never allow traffic through even if the TTL is the hop count + X (where X is distance to internal host, presumably 1)

I didn't mean to imply TTL incrementation was magic remote root.

As far as SSL, you're right in that it is a bit tangential. I'm just trying to illustrate the huge security flaws that, in my eyes, stand in front of "can someone sniff my traffic".

Re:Why NoSQL Equals NoSecurity by tptacek on Sunday April 08, 2012 @01:53AM (#3813209)
What huge security flaws in TLS are you referring to?

(One of my business partners is the author of firewalk).

Re:Why NoSQL Equals NoSecurity by ZephyrP on Sunday April 08, 2012 @02:02AM (#3813227)
I'm a mere pup in San Francisco, you're Thomas Ptacek. You probably have a wikipedia page and personal islands. I could suffer an untimely fate if you so much as looked at me wrong.

What I mean to say is that your authority is better than mine on this - so if you think SSL is secure, then I'll start telling people SSL is secure. I just think the numerous vulnerabilities unearthed so far, ranging from the eminently practical (Compromise a CA!) to the blindingly obvious (SSLStrip) constitute a poor record.

Re:Why NoSQL Equals NoSecurity by tptacek on Sunday April 08, 2012 @02:12AM (#3813246)
Not the response I was going for; just wondering if you meant policy stuff like CA's or protocol stuff.
Re:Why NoSQL Equals NoSecurity by jmillikin on Sunday April 08, 2012 @01:19AM (#3813161)
Serious question -- was your post generated by a Markov chain? While the sentences and paragraphs are basically grammatical, they make no sense at all.
Re:Why NoSQL Equals NoSecurity by ZephyrP on Sunday April 08, 2012 @01:46AM (#3813201)
I'm sorry my green ideas are not to your furious sleep specifications. Forgive me Strunk and White.
Re:Why NoSQL Equals NoSecurity by viraptor on Sunday April 08, 2012 @05:15AM (#3813470)
I found the post very clear and interesting. Maybe it was written like a rant that you'd normally say out loud rather than write down, but it was good nevertheless. What did you find confusing?
Re:Why NoSQL Equals NoSecurity by tptacek on Sunday April 08, 2012 @12:34PM (#3814195)
What's your takeaway from it?
Re:Why NoSQL Equals NoSecurity by viraptor on Sunday April 08, 2012 @05:55PM (#3815028)
Multi-layer security is an interesting issue where each service can be exploited in a couple of ways. There are app-logic layer problems like not escaping input as well as app-internals layer where app's language matters to some extent. Java does have reasonable protection from buffer overflows... unless it's a bug in jre where all apps suffer. On the other hand we only have some unfortunate exceptions like unusable but safe qmail.

So while it's not the end of your worries of course, from the developer's point of view if you can make sure you're running on a system handling ASLR properly, using a language with managed-memory, designing a system to not require escaping in the first place, so there's nothing to forget about... you can eliminate several classes of attacks without even starting to think about specific scenarios and business logic itself. (not all follows from the post itself, but this was on my mind after reading - so matches your question hopefully)

Re:Why NoSQL Equals NoSecurity by hartror on Sunday April 08, 2012 @06:02AM (#3813511)
Made sense to me.
Re:Why NoSQL Equals NoSecurity by madavis on Sunday April 08, 2012 @03:13PM (#3814604)
Being the author of the report, a vulnerability researcher, and having been in the industry for years I too think your post misses the point. The article wasn't written for someone who knows the ins and outs of properly securing an environment, it was written for the corporate IT professional or corporate IT security professional who gets thrown into a meeting and someone mentioned the new app they are deploying uses "NoSQL" and they don't know what that means or how they can even start securing it.

While the editors may have sensationalized the title, the key here is that the majority of the users of NoSQL databases are not security researchers or even developers that understand proper defense in depth. Most are using these "database technologies" to solve a specific problem or because they are "cool" so when they go from dev to production, very few controls are implemented anywhere in the stack (network, OS, or app).

Furthermore, if the solution to securing a NoSQL DB is to "secure everything around it" (e.g, the references in the posts to hardening the OS, Network, segmenation, etc) then I can tell you it isn't happening and the deployers of NoSQL don't know that.

The financial institutions that are using NoSQL, that I have assessed, aren't using commercial versions mostly because a developer throws something together, proves it works, and moves it into production rather quickly. I think they will move to commercial versions though as more support is needed.

I don't have an axe to grind, and if you look at my previous database security reports I don't think the big SQL DBs are great either BUT they do provide more options for controls to be put in place at the database level. Of course the rest of the stack should be secured too(duh) but when it comes to defense in depth you want to have as granular controls as possible as close to the data as possible.

I did not make the claim you shouldn't use these technologies, rather I make the claim you can't assume these technologies support the same controls as other relational databases have and call it a day. You have to be much more creative to properly control and audit access.

Lastly, it is difficult to provide actionable technical advice in a article format such as that used by InformationWeek because of the wide variety of readers. Rather, we make recommendations that readers can use to do additional research and find the proper answers which is what we did provide in the actual research report (which is longer and more detailed than the articles).

Oh, and I think Tom had the right idea. Can you explain your firewall and SSL comments? Also, xp_cmdshell as been disabled by default since SQL 2005, so that isn't valid example of "in-secure by default" for a new deployment (even though an attacker can re-enable it if they are 'sa'). If you are deploying SQL 2000 into an environment in 2012 you have other issues)

Re:Why NoSQL Equals NoSecurity by perlgeek on Sunday April 08, 2012 @01:53AM (#3813208)
> The fact that query strings are safe in every major NoSQL datastore is such a massive advantage over SQL DBs that, even if you're using prepared statements, NoSQL is almost assuredly more secure in a day to day context, except against zero-days

In what way is my SQL DB (which I use with prepared statements and placeholders) more vulnerable than any NoSQL thing?

> It's not unreasonable to trust major commercial firewalls for anything you'd trust SSH for. It's not reasonable to trust C/C++ applications in general

So the major commercial firewalls aren't written in C or C++? I find that mildly surprising, since I know only of netfilter and pf, and both are written in C

Re:Why NoSQL Equals NoSecurity by eternalban on Saturday April 07, 2012 @11:44PM (#3812950)
(off topic: curious if you evaluated riak-core, and if yes, why did you pass on it?)