Compare commits

...

4 Commits

Author SHA1 Message Date
danielsagi
716d531f73 Merge branch 'master' into added_docs_for_exposed_pods 2020-11-17 14:04:25 +02:00
Daniel Sagi
1e4366efe6 fixed linting 2020-11-15 17:28:28 +02:00
Daniel Sagi
48cde94e05 correlated the new khv to the Exposed pods vulnerability 2020-11-15 15:43:33 +02:00
Daniel Sagi
f430a435d8 added doc _kb for exposed pods 2020-11-15 15:43:11 +02:00
2 changed files with 24 additions and 4 deletions

23
docs/_kb/KHV052.md Normal file
View File

@@ -0,0 +1,23 @@
---
vid: KHV052
title: Exposed Pods
categories: [Information Disclosure]
---
# {{ page.vid }} - {{ page.title }}
## Issue description
An attacker could view sensitive information about pods that are bound to a Node using the exposed /pods endpoint
This can be done either by accessing the readonly port (default 10255), or from the secure kubelet port (10250)
## Remediation
Ensure kubelet is protected using `--anonymous-auth=false` kubelet flag. Allow only legitimate users using `--client-ca-file` or `--authentication-token-webhook` kubelet flags. This is usually done by the installer or cloud provider.
Disable the readonly port by using `--read-only-port=0` kubelet flag.
## References
- [Kubelet configuration](https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/)
- [Kubelet authentication/authorization](https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet-authentication-authorization/)

View File

@@ -35,10 +35,7 @@ class ExposedPodsHandler(Vulnerability, Event):
def __init__(self, pods):
Vulnerability.__init__(
self,
component=Kubelet,
name="Exposed Pods",
category=InformationDisclosure,
self, component=Kubelet, name="Exposed Pods", category=InformationDisclosure, vid="KHV052"
)
self.pods = pods
self.evidence = f"count: {len(self.pods)}"