Missing Kubernetes Network Segmentation
One web pod, and every internal service is in reach.
What Is Missing Kubernetes Network Segmentation?
Kubernetes networking is flat until a NetworkPolicy says otherwise, so a compromised public pod can call any internal service by name. You'll start inside a web pod, resolve and call an internal patient records API that has no authentication of its own, then find a policy whose empty rule allows everything, apply default deny to the namespace and allow only the clinicians' portal. A request from the web pod then times out. Maps to OWASP Kubernetes Top Ten K05, Missing Network Segmentation.
What You'll Learn in Missing Kubernetes Network Segmentation
- Explain that pod-to-pod traffic is unrestricted by default.
- Recognize an empty ingress rule as one that allows all traffic.
- Apply a default-deny NetworkPolicy and narrow allow rules per service.
- Prove segmentation by repeating the attacker's request from the refused pod.
Missing Kubernetes Network Segmentation — Training Steps
-
Where am I
Bob has a shell in one of Fennimar's public appointment-booking pods, through a template injection bug in its confirmation page. The pod itself holds nothing of value. He looks at what the cluster's DNS tells every pod. Fennimar runs video consultations with doctors. Its clinical records live in the same cluster as its public website.
-
Find the records service
Clinical services tend to have obvious names. Bob asks DNS for one.
-
Call it from the web pod
The records API was built to be called only by the clinicians' portal, inside the cluster. Bob calls it from the public web pod.
-
Check your understanding
-
Patient records requested by the website
Fennimar's security team finds the records API answering requests from a frontend pod address.
-
What the network allows
Alice lists the network policies in the clinical namespace.
-
Open the policies
Alice opens the existing policy and the platform team's standard default-deny policy, which every namespace created from the template receives. The clinical namespace was created by hand and never got it.
-
A policy that allows everything
There is a policy, which looks reassuring in a listing. It selects the records API and then allows ingress from anywhere.
-
Allow only the clinicians' portal
Alice replaces the open rule with one source: pods labelled clinician-portal in the same namespace, on the API's port.
-
Deny by default
An allow rule for one service still leaves every other pod in the namespace open. The default-deny policy selects every pod and allows nothing, so each service needs an explicit rule to receive or send anything.
Security Framework Coverage
OWASP Kubernetes Top 10
- K05:2025 Missing Network Segmentation
CWE
- CWE-668 Exposure of Resource to Wrong Sphere
- CWE-923 Improper Restriction of Communication Channel to Intended Endpoints
MITRE ATT&CK
- T1046 Network Service Discovery
- T1210 Exploitation of Remote Services
CIS Controls
- CIS 12 Network Infrastructure Management
- CIS 4 Secure Configuration of Enterprise Assets and Software
NIST CSF
- PR.AT-02 Individuals in specialized roles are provided with awareness and training so that they possess the knowledge and skills to perform relevant tasks with cybersecurity risks in mind
- PR.IR Technology Infrastructure Resilience
- PR.PS Platform Security
NICE Framework
- IO-WRL-005 Systems Administration
- DD-WRL-001 Cybersecurity Architecture