0

I have recently found out that a very common setup of Kubernetes for some use cases of access over TLS returns an invalid certificate with name Kubernetes Ingress Controller Fake Certificate. I.e. making it obvious to anyone that one is using Kubernetes.

So the question is not really so much about Kubernetes itself, but if disclosing such information about underlying infrastructure is considered undesirable or it does not matter?

P.S. Kuberentes information in more details:

Default installation of nginx ingress controller provides a "fallback" (called a default backend) that will respond to anything it does not know about. Sounds good, but the thing is that it does not have TLS configured, but does answer on port 443 as well and returns an (obviously) invalid certificate with name Kubernetes Ingress Controller Fake Certificate.

1 Answer 1

1

it's better to hide whats underlying as attackers get more info what they are attacking.

Solution here would be to configure TLS for default backend and make default backend return some thing more meaningful.

Why is that so:

One of my examples:

I had Grafana on private network inside k8s but DNS entry was public. Attacker could make DNS enum to see grafana.example.com, see it's a private ip it resolves then http request k8s endpoint with spoofed Host header and gain access. My fix was to mitigate it with ip whitelisting to allow only VPN access CIDR.

If above is not applicable make sure to harden Kubernetes so you are sure if the app gets exploited it won't impact whole Kubernetes cluster.

1
  • Hi, thanks for the answer, I can configure TLS certificate, but e.g. nginx-ingress-controller seems to have a hardcoded /healthz that returns 200. That will give it away anyway and I don't quite see how can I turn that off. My point being it's probably very hard to hide in practice as ingress controller is setup in a way that has some slight differences from default behviour that would give away that it's not just an nginx. Commented Dec 23, 2019 at 14:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .