Back to all scenarios
Scenario #255
Security
K8s v1.19, Google Cloud
Overly Permissive Network Policies Allowing Lateral Movement
Network policies were not restrictive enough, allowing compromised pods to move laterally across the cluster and access other services.
Find this helpful?
What Happened
The lack of restrictive network policies allowed any pod to communicate with any other pod in the cluster, even sensitive ones. After a pod was compromised, the attacker moved laterally to other pods and services, leading to further compromise.
Diagnosis Steps
- 1Reviewed the network policy configurations and found that no network isolation was enforced between pods.
- 2Conducted a post-compromise analysis and found that the attacker moved across multiple services without restriction.
Root Cause
Insufficient network policies allowed unrestricted traffic between pods, increasing the potential for lateral movement.
Fix/Workaround
• Implemented restrictive network policies to segment the cluster and restrict traffic between pods based on specific labels and namespaces.
• Ensured that sensitive services were isolated with network policies that only allowed access from trusted sources.
Lessons Learned
Strong network segmentation is essential to contain breaches and limit the potential for lateral movement within the cluster.
How to Avoid
- 1Implement and enforce network policies that restrict pod-to-pod communication, especially for sensitive services.
- 2Regularly audit network policies and adjust them to ensure proper segmentation of workloads.