News for hackers. Stuff that matters.
Re:UFO VPN claims zero-logs policy, leaks 20M user logs by outworlder on Friday July 17, 2020 @08:13PM (#23877617)
Unsecured Elasticsearch, once again.

(https://www.theregister.com/2020/07/17/ufo_vpn_database/)

So ES has insecure defaults, I get that and it's been discussed to death.

But who the heck, in this day and age, exposes clusters directly to internet traffic? I don't care what the defaults or security measures you have. DONT EXPOSE SERVERS.

Place them inside a VPC, preferably a private one(in AWS parlance, behind a NAT GW). Use _something else_ to send traffic to them. If you are on AWS or similar (but not Azure I guess), add a load balancer to it. So now access would require creating a new load balancer, pointing to the servers in question, adding listeners on the desired ports, and configuring the appropriate security groups. Only then you can send external traffic. On the specific ports you configured on both listeners and security groups only.

Do this everywhere and you are in a much better shape. You still need to configure servers correctly, but if you mess up, nothing happens, unless you mess up many other things in an error cascade.

Re:UFO VPN claims zero-logs policy, leaks 20M user logs by mienski on Saturday July 18, 2020 @01:24AM (#23879220)
Even doing the official Elastic training - Elasticsearch Engineer 1 gives you everything you need to hurt yourself to set up, use and admin a cluster, but no security is covered unless you sign up for the next course and pay another couple of thousand dollars. Security really should be covered as a default in EE1.

I'm a huge fan of beginner tutorials that include security as a default, rather than having it as the thing you do last - and then commonly in actual project work all the development gets done against an insecure cluster in dev, then someone turns security on at the end, it all breaks and you now have a group of stressed-out people only incentivized to remove the thing that is now delaying the project at the very last moment. Makes for some easy mental gymnastics.

Re:UFO VPN claims zero-logs policy, leaks 20M user logs by ayende on Saturday July 18, 2020 @04:02AM (#23879864)
With RavenDB, you cannot setup a unsecured server unless you are _really_ trying. And we worked on getting secured setup to be a click through process with under 10 minutes to setup a whole cluster.

You can see it here: https://www.youtube.com/watch?v=K-2iZ_lJVag

That was done explicitly because of issues like that. Security isn't a feature, and the fact that your product keep leaking details is not the fault of the user the 100th time this happens.

Re:UFO VPN claims zero-logs policy, leaks 20M user logs by mattmein on Saturday July 18, 2020 @04:10AM (#23879892)
This is completely unrelated, but I remember your blog about dotnet development. I followed it about 10 years ago and remember when you started with RavenDb. I haven't done any dotnet development in about 7 years, but you taught me a lot about programming properly. Thanks.

I'm glad RavenDb is still going well.

Re:UFO VPN claims zero-logs policy, leaks 20M user logs by zaszrespawned on Saturday July 18, 2020 @10:07AM (#23881468)
plug
Re:UFO VPN claims zero-logs policy, leaks 20M user logs by forgingahead on Saturday July 18, 2020 @02:23AM (#23879473)
I think a big part of it is there are so many "here's how easy it is to set up!!!" guides out there, none of which actually tackle security first, or in a way that reflects the training (or lack thereof) many of these folks who are actually doing the work have.

It's nice to assume that everyone setting up backend services for the multitude of companies out there have gone through accredited training and have years of strong production experience with security chops.

The reality is that because the gap between technically inclined and technically clueless is so large, anyone who can stumble through an online tutorial can be seen as "experienced" to someone who isn't.

I'm not sure what the answer is, but this is going to keep happening - maybe a 3rd party service that evaluates "Getting Started" guides for backend services? If basic security protocols are not covered, they get a red mark, and business owners could use that as an indicator of whether their tech folks could potentially screw it up.

Re:UFO VPN claims zero-logs policy, leaks 20M user logs by dharmab on Friday July 17, 2020 @08:36PM (#23877794)
Also, don't use 0.0.0.0/0 in a security group rule!

P.S. Azure has load balancers and security groups too- in fact their security groups are better than AWS's in some ways such as supporting thousands of rules instead of only 50.

Re:UFO VPN claims zero-logs policy, leaks 20M user logs by ashtonkem on Friday July 17, 2020 @09:48PM (#23878236)
Azure can even configure mutual authentication between the LB & the underlying servers, which would cause any direct server access to result in a 401[0].

0 - For API servers. I'm not sure if you could configure this with services like Elasticsearch.

Re:UFO VPN claims zero-logs policy, leaks 20M user logs by kevinkeller on Saturday July 18, 2020 @01:30AM (#23879244)
>Azure can even configure mutual authentication between the LB & the underlying servers

You can achieve a similar effect in AWS, by declaring only the LB's security group as the source in servers' security group ingress rule.

Any requests sent directly to the servers simply wouldn't connect.

Re:UFO VPN claims zero-logs policy, leaks 20M user logs by ashtonkem on Saturday July 18, 2020 @02:49AM (#23879577)
That’s also a thing on Azure, but you can actually deploy certificates for mutual authentication as well. That way if somehow the network layer is pierced, you have another layer of protection.
Re:UFO VPN claims zero-logs policy, leaks 20M user logs by outworlder on Monday July 20, 2020 @01:16PM (#23899894)
They do, but once you setup a load balancer, it wants to send all traffic through the load balancer.

AWS and GCP load balancers are more like an endpoint. Your network is otherwise unaffected.

Re:UFO VPN claims zero-logs policy, leaks 20M user logs by alberts00 on Saturday July 18, 2020 @05:08AM (#23880119)
AWS Elasticsearch was one of the last services which didn't support VPC until late 2017 [1], moreover if you had created a cluster without VPC support the migration is very cumbersome and application changes (to enable double writes) are required to execute it without any downtime [2].

[1] https://aws.amazon.com/blogs/aws/amazon-elasticsearch-servic...

[2] https://medium.com/@vishnunarang/how-to-migrate-elasticsearc...

Re:UFO VPN claims zero-logs policy, leaks 20M user logs by ldoughty on Saturday July 18, 2020 @06:11AM (#23880349)
Not to mention it's a massive pain to use elastic search with serverless... Especially if you want it in a private VPC. Adding ES raised our monthly bill significantly since it required also adding a NAT gateway (which then double-dips data transfer charges, actual bandwidth out and NAT processed data), the cost was replicated across multiple "States" (Dev/test/prod), and increased cold start times (below they did work to optimize that) since the lambdas accessing ES needed to be in the VPC too.

I can see developers crunched for time (or businesses, money) not taking the additional steps to get there... And this is the same deal for Redis/memcache, which is another reason I think we see those exposed sometimes too.

(To be clear, the additional costs are minor compared to a big business budget, they would be more detrimental to a low (~<400/month) budget project .. or a team that can't dedicate 300-600 man hours to implement this)

Re:UFO VPN claims zero-logs policy, leaks 20M user logs by tilolebo on Sunday July 19, 2020 @01:05PM (#23890682)
And if you want to use it with Cognito (to get user auth for Kibana), you NEED to have a public elasticsearch instance...
Re:UFO VPN claims zero-logs policy, leaks 20M user logs by bouncycastle on Friday July 17, 2020 @08:56PM (#23877918)
I'm not sure if that's better. You're just introducing more complexity in to your network..

If you don't have the budget for a nat/load balancer or want to just keep it simple, a simple iptables rule would do! Then test with nmap regularly to see if it's correct.

Re:UFO VPN claims zero-logs policy, leaks 20M user logs by outworlder on Monday July 20, 2020 @01:18PM (#23899909)
> If you don't have the budget for a nat/load balancer

It's not such a big budget in any of the big cloud providers.

And my point is: if you don't need access, you won't even have such load balancer. Unless someone goes out of their way to provide access to your server, no external access will exist.

Re:UFO VPN claims zero-logs policy, leaks 20M user logs by badrabbit on Friday July 17, 2020 @10:04PM (#23878313)
It's usually not intentional. It's common to either assume by default it will listen on 127.0.0.1 and connect to it. With cloud VMs, people spin up a VM for non-public use but check the box that adds a public IP and forget it's there.

It's a design problem in my opinion. By default, listening on 0.0.0.0/0 should exclude loopback interfaces by the OS. That way, anything makig incorrect assumptions would fail and would require correction. Second, cloud firewall rules should imply deny all when "none" is selected. That way, having no protection is the same effort as adding at least one manual rule.

Re:UFO VPN claims zero-logs policy, leaks 20M user logs by huy-nguyen on Saturday July 18, 2020 @01:07AM (#23879127)
Along this line, every Google Compute Engine VM instance comes with 2 “implied” rules: allow all egress and deny all ingress.
Re:UFO VPN claims zero-logs policy, leaks 20M user logs by harikb on Saturday July 18, 2020 @02:44AM (#23879559)
I have seen people taking the easy way out setting up dev environments where these security holes are ignored. Hopefully in some near future, everyone would use something like tailscale[1] or nebula[2] instead of taking the easy way out and leaving it all open.

[1] https://tailscale.com/

[2] https://github.com/slackhq/nebula

Re:UFO VPN claims zero-logs policy, leaks 20M user logs by dcow on Saturday July 18, 2020 @01:19AM (#23879189)
What's the difference between a VPC and iptables? I agree that you shouldn't expose insecure services. But why do I need to introduce an entire private address space and cloud-managed SDN services to achieve that goal? If it weren't industry status quo, I'd almost call you a shill for the union of ops teams working to secure jobs for years to come. Almost.. (;
Re:UFO VPN claims zero-logs policy, leaks 20M user logs by llarsson on Saturday July 18, 2020 @01:38AM (#23879288)
I would think that the post you respond to either supposes a hosted service (you do not control the server and its iptables) or that it multiple layers of protection is good for something critical.

But yes, if it's your own server, everyone should remember that regular Linux features are darn powerful, too.

Re:UFO VPN claims zero-logs policy, leaks 20M user logs by mrweasel on Saturday July 18, 2020 @02:41AM (#23879548)
A VPC, with security groups, can be much easier, depending on how your instances are managed. You’re sure that all the indtances have the same rules and that the rules are always updated, even in if you use auto-scaling.

If you use some provisioning tool you can have the same thing with IPtables. But why are you on AWS if you don’t want to used the features Amazon provides?

Re:UFO VPN claims zero-logs policy, leaks 20M user logs by rantanplan on Saturday July 18, 2020 @10:53AM (#23881776)
Not directly comparable. You can use iptables on a EC2 instance inside a VPC.

VPC is more akin to a glorified virtual switch/bridge.

Re:UFO VPN claims zero-logs policy, leaks 20M user logs by smsm42 on Sunday July 19, 2020 @12:51AM (#23887094)
I am astonished that ES still does not recognize that there should be at least minimal protection against exposure by default. I mean, it's not super hard to generate good password on install, and if it's not necessary, it can always be manually disabled, but it is astonishing that "let's somebody else worry about security" is still a thing...
Re:UFO VPN claims zero-logs policy, leaks 20M user logs by fancythat on Saturday July 18, 2020 @05:13AM (#23880132)
Putting unsecured ES on side, but logging passwords in plain text? That's a whole another level of stupidity.
Re:UFO VPN claims zero-logs policy, leaks 20M user logs by mnd999 on Saturday July 18, 2020 @06:19AM (#23880372)
You could have stopped at logging passwords.
Re:UFO VPN claims zero-logs policy, leaks 20M user logs by bilekas on Friday July 17, 2020 @09:04PM (#23877970)
People pay good money for your advice. Others ignore the free advice.