12 ms·
I was at an Elasticsearch meetup yesterday where we had a good laugh about several similar scandals in Germany recently involving completely unprotected Elastic
by jillesvangurp 7y ago
I was at an Elasticsearch meetup yesterday where we had a good laugh about several similar scandals in Germany recently involving completely unprotected Elasticsearch running on a public IP address without a firewall (e.g. https://www.golem.de/news/elasticsearch-datenleak-bei-conrad-1911-145091.html https://www.golem.de/news/elasticsearch-datenleak-bei-conrad..., in German). This beats any of that.
Out of the box it does not even bind to a public internet address. Somebody configured this to 'fix' that and then went on to make sure the thing was reachable from the public internet on a non standard port that on most OSes would require you to disable the firewall or open a port. The ES manual section for network settings is pretty clear about this with a nice warning at the top: "Never expose an unprotected node to the public internet."
Giving read access is one thing. I bet this thing also happily processes curl -X DELETE "http:<ip>:9200/*" (deletes all indices). Does it count as a data breach when somebody of the general public cleans up your mess like that?
In any case, Elasticsearch is a bit of a victim of its own success here and may need to act to protect users against their own stupidity since clearly masses of people who arguably should not be taking technical decisions now find it easy enough to fire up an Elasticsearch server and put some data in it (given the amount of companies that seem to be getting caught with their pants down).
It's indeed really easy to setup. But setting it up properly still requires RTFMing, dismissing the warning above, and having some clue about what ip addresses and ports are and why having a database with full read write access on a public ip & port is a spectacularly bad idea.
- jerrac 7y agoI've been using ES off and on since before 1.0 came out. It has always baffled me that ES doesn't require a username and password by default. ES is a database that has to exist on a network to be usable. Heck, it expects that you have multiple nodes, and will complain if you don't. So one of the first things you do is expose it to the network so you can use it. Yes, it takes some serious incompetence to not realize you need to secure your network, but why in the world would you not add basic authentication into ES from the start? I'd never design a tool like a database without including authentication. I am serious about my question. Could anyone clue me in?
- ibirman 7y agoThey offer security as a paid feature.
- jillesvangurp 7y agoActually it comes for free now with the standard ES distribution. https://www.elastic.co/blog/security-for-elasticsearch-is-now-free https://www.elastic.co/blog/security-for-elasticsearch-is-no...
- ThePowerOfFuet 7y ago>Security for Elasticsearch is now free What a horrific title. Even simply typing that should have been a blinking neon sign to them that they had their priorities in the wrong order.
- lmilcin 7y agoThat's incorrect. The usual way of using this service is to have backend network configured that connects your services that is not available from outside (ie you have to traverse through services to reach it). The so called "security" is just a paid feature for companies that want to use ElasticSearch but want to use it in "legacy" way because, presumably, they don't have people to design it correctly.
- dtech 7y agoThat's still really insecure, because it means that as soon as someone manages to gain any access to that network or any of the services on that network has a security issue your database is wide open. That means that if someone manages to get access to the. I'd say public internet with proper (encrypted) password auth is more secure than that.
- m00x 7y agoIf an attacker gets a hold of your app server, they will be able to get the connection details for that DB, including the username/password. Having a password adds a small layer of protection to databases that the affected app wasn't meant to connect to. It adds some protection in that case, but the user should use best judgement if it's worth doing.
- Xylakant 7y ago> Out of the box it does not even bind to a public internet address. Bind to all interfaces used to be the default in 1.x - it changed pretty much because people were footgunning themselves. Coupled with lack of security in the base/free distribution, that made for a dangerous pitfall. At least now security is finally part of the free offering, but the OSS version still comes with no access control at all.
- lmilcin 7y agoYou typically use these in pods which share networking but are not available from outside. It doesn't matter then if you bind it to 0.0.0.0.
- dharmab 7y agoAt the time it was common to deploy on bare hosts. Deploying ES into a network namespace isn't even the most common use case today.
- Xylakant 7y agoThat still puts you a single firewall mistake away from disaster. It also places a lot of trust into the applications and hosts that can access ES on a network level: They get full access with no control at all. To add on that: No security also means no TLS, neither in the cluster communication, no TLS speaking to the client etc.
- cookiecaper 7y agoI've come across several such ES instances that are 100% exposed to the world without even trying, and ES is by no means the first tool to have this problem. People are never going to stop doing this. Making it annoyingly difficult within ES just weakens them such that some other "wow it's so easy" search product will be better positioned to eat their lunch.
- czbond 7y agoES, Mongo, Redis used to be some of the easiest targets for production data (security vuln wise). Deployed by SWE's usually, with products that were early versions, and didn't have access control by default.
- ryan_lane 7y agoES's practice of making its security a proprietary paid for product is the cause for these kinds of things. It's a shitty practice, and this is one of the reasons I'm glad AWS forked it.
- Quekid5 7y agoIncompetence and indifference will be the ruin of us all. This is just another symptom of the Principal-agent problem writ large.
- throwaway5752 7y agoWasn't this exact same thing a huge scandal just a few years ago for Mongo on Shodan? I can't believe anyone shipping a datastore could let it happen after that. Doesn't postgresql still limit the default listen_address to local connections only? Seems like the best approach. On a distribute store consistency operations between nodes should go on a different channel than queries and should be allowed on a node by node basis at worst. At least at that point, it requires someone who should know better to make it open to the world. Even just listening for local connections passwordless auth should never be a default.
- achillean 7y agoYes, and similar issues still exist with public MongoDB instances even though the defaults are secure.
- jschwartzi 7y agoThis addresses entirely the wrong question. By looking at it as a technical problem you're completely missing the broader ethical problem. Why was anyone allowed by law to amass this amount of data? And why did PDS not take the security and privacy concerns of 1.2 billion people seriously enough to ensure the data was handled correctly? They obviously thought it was valuable enough to amass a huge database. Do they sell this to just anyone? If not, who can buy access to this data? How much does it cost, and what steps are involved in doing so? This makes me want to talk to a lawyer.
- staticassertion 7y agoOther databases learned that not requiring a user/password upon install is completely irresponsible. ES and other dbs need to catch up ASAP, it's ridiculous. Documentation is not security. If you need to "RTFM" to not be in an ownable state it's ES's fault.
- jwandborg 7y agoTrusting software you install to be secure is ridiculous and completely irresponsible, especially if you did not pay for someone else to take the blame. The only thing you can do to secure your software is to restrict its communication channels. Once you've secured the communication channels, the software auth is decorative at best.
- staticassertion 7y agoThat doesn't absolve ES of providing basic security defaults.
- codetrotter 7y ago> It's indeed really easy to setup. But setting it up properly still requires RTFMing, dismissing the warning above I would bet that in a lot of cases, people that configure their servers like in the OP just don’t read the official docs at all. Stack Overflow, Quora, etc. are great places to get answers, because of the huge amount of questions that have already been asked and answered there. But when people rely solely on SO, Quora, blog posts and other secondary, tertiary, ..., nth-ary sources of information, Bad Stuff will result, because of all the information that is left unsaid on Q&A sites and in blog posts. (Which is fine on its own – the problem is when the reader is ignorant about the unsaid knowledge.) > and having some clue about what ip addresses and ports are and why having a database with full read write access on a public ip & port is a spectacularly bad idea. Again, not necessarily, for the same reason as above. But even if they did, it is a sad fact that a lot of people dismiss concerns over security with the kinds of “counter-arguments” that I am sure we are all too familiar with. :( Thankfully though, we are beginning to see a shift in legislation being oriented towards protecting the privacy of people whose data is stored by companies. Ideally, the fines should cause businesses to go bankrupt if they severely mishandle data about people. Realistically that is not what happens. For the most part they will get but a slap on the wrist. But it’s a start. Companies that can’t handle data securely, have no business handling data at all.
- Scoundreller 7y agoMy favourite was Bitomat.pl's loss of 17k bitcoins in 2011 because they restarted their EC2 instance. I understand that the "ephemeral" nature of EC2 was in the documentation, but ESL speakers may have glossed over the significance of a word they didn't fully comprehend. https://siliconangle.com/2011/08/01/third-largest-bitcoin-exchange-bitomat-lost-their-wallet-over-17000-bitcoins-missing/ https://siliconangle.com/2011/08/01/third-largest-bitcoin-ex...
- danmur 7y agoNot to say this is what people are doing, but I don't think it requires much knowledge to run under Docker, and it's pretty easy to expose it to the public internet that way.
- healsjnr1 7y agoThis assumes it was incompetence and not done intentionally. My understanding is neither company is owning this data set and there is an assumption that it is a third company that has either legally or illegally obtained the data and is using it for their own services. Another option is that the data was exfiltrated by a loose group of people who wanted this to be freely available on a random ip. Know the ip, get sick access to a trove of PII. No logins, no accounts, no trace. Welcome to the early 90s internet.