Author: Divyanshu Shukla | AWS Community Builder
Follow at kubernetesvillage
This repository contains code and configurations for deploying vulnerable EKS components. It is designed for educational and testing purposes only, allowing users to explore and understand potential security issues in an EKS environment.
- k8s-dashboard/: Contains configurations for a Kubernetes Dashboard with potential misconfigurations for testing privilege escalation and unauthorized access scenarios.
- ssrf-demo/: A demo application vulnerable to Server-Side Request Forgery (SSRF), designed to demonstrate potential exploitation techniques.
- vulnerable_sample_app/: An example of a deliberately insecure application for testing various Kubernetes misconfigurations and security flaws.
This setup simulates a real-world environment with intentionally vulnerable components to test:
- Unauthorized access via the Kubernetes Dashboard.
- Exploitation of SSRF vulnerabilities in deployed applications.
- Privilege escalation and configuration weaknesses in Kubernetes deployments.
- Access to an EKS cluster.
kubectl
configured with the correct context.- Basic knowledge of Kubernetes and EKS security concepts.
To deploy the vulnerable components, navigate to the desired directory and apply the Kubernetes manifests:
kubectl apply -f k8s-dashboard/
kubectl apply -f ssrf-demo/
kubectl apply -f vulnerable_sample_app/
Check if the Kubernetes Dashboard is exposed and accessible without proper authentication:
kubectl proxy
Navigate to http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
and see if you can access the dashboard without credentials.
The ssrf-demo
app is vulnerable to SSRF attacks. Test this by sending requests that can access internal resources:
curl http://<ssrf-demo-url>/?url=http://169.254.169.254/latest/meta-data/
Inspect the configurations in vulnerable_sample_app/
for possible privilege escalation paths (e.g., misconfigured service accounts):
kubectl describe pod <pod-name>
Look for elevated permissions or access to sensitive resources.
🧹 Cleanup Instructions (Optional)
To remove all deployed resources, run the following commands:
kubectl delete -f k8s-dashboard/
kubectl delete -f ssrf-demo/
kubectl delete -f vulnerable_sample_app/
This project is for educational purposes only. Do not deploy these configurations in a production environment. Use responsibly and ensure you have permission to perform testing in your environment.
This project is licensed under the MIT License - see the LICENSE file for details.
Created by Divyanshu Shukla for kubernetesvillage community.