
nodes/proxy(create 작업 허용) 및 nodes/status(update/patch 작업 허용)를 이용한 권한 상승
https://github.com/kubernetes/kubernetes/issues/113757 https://github.com/kubernetes/kubernetes/issues/119640 https://github.com/kubernetes/sig-security/blob/main/sig-security-external-audit/security-audit-2021-2022/findings/Kubernetes%20v1.24%20Final%20Report.pdf
kube-apiserver를 호스팅합니다:kubectl get nodes
kubectl config view # Kubectl stores a config file so that it can use it to authenticate and make api calls to the kube-apiserver
2. 이미 파드 안에 있다면, 쿠버네티스 API 서버 변수에 대한 환경 변수를 확인할 수 있습니다.
printenv
cat /proc/self/environ
$tkn 변수는 서비스 계정 토큰이어야 합니다.
nodes/proxy를 생성할 수 있어야 합니다.nodes/status를 업데이트/생성/패치할 수 있어야 합니다.$tkn에 적절한 권한이 있는지 확인하십시오:
kubectl --token=$tkn auth can-i --list
