Back to all scenarios
Scenario #223
Security
K8s v1.20, On-Premise
Insecure Network Policies Exposing Internal Services
Network policies were too permissive, exposing internal services to unnecessary access, increasing the risk of lateral movement within the cluster.
Find this helpful?
What Happened
Network policies were overly permissive, allowing services within the cluster to communicate with each other without restriction. This made it easier for attackers to move laterally if they compromised one service.
Diagnosis Steps
- 1Reviewed the network policy configurations and found that most services were allowed to communicate with any other service within the cluster.
- 2Inspected the logs for unauthorized connections between services.
Root Cause
Permissive network policies allowed unnecessary communication between services, increasing the potential attack surface.
Fix/Workaround
• Restricted network policies to only allow communication between services that needed to interact.
• Used namespace-based segmentation and ingress/egress rules to enforce tighter security.
Lessons Learned
Proper network segmentation and restrictive network policies are crucial for securing the internal traffic between services.
How to Avoid
- 1Apply the principle of least privilege when defining network policies, ensuring only necessary communication is allowed.
- 2Regularly audit network policies to ensure they are as restrictive as needed.