Kubernetes Labs
Explore 1 lab in Kubernetes.
Containers in a pod do not have egress or ingress network restrictions. A compromised container could be exploited for activities such as unauthorised data exfiltration, establishing a reverse shell to maintain access to the cluster, or launching attacks against containers in different namespaces. Kubernetes namespaces, in particular, do not inherently restrict network access. This can allow lateral movement within a cluster.
Apply network policy. The following examples restricts all egress traffic from "appspace" namespace.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny
namespace: appspace
spec:
podSelector: {}
policyTypes:
- Egress
---
apiVersion: v1
kind: Namespace
metadata:
name: appspace
Select a language to explore available labs for this vulnerability.
Try adjusting your language filter.
Want to skill-up in secure coding and AppSec? Try SecDim Wargames to learn how to find, hack and fix security vulnerabilities inspired by real-world incidents.
Join our secure coding and AppSec community. A discussion board to share and discuss all aspects of secure programming, AppSec, DevSecOps, fuzzing, cloudsec, AIsec code review, and more.
Read more