Skip to content

KCSA · Domain 4: Kubernetes Threat Model · 16% of the exam

Task 4.5: Attacker on the Network

Sniffing, spoofing and lateral movement inside the cluster network, and the defenses: TLS, mTLS and network policy.

Study it

  • Persistence, malicious code, attackers on the network, sensitive data and privilege escalation

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the CNCF documentation page that proves it.

Question 1 · choose 1

A database and its client run in different namespaces, and NetworkPolicies allow only the client's Pods to reach the database port. An auditor notes that an attacker who controls a node on the traffic's path could still read the queries. What explains the auditor's point?

  1. ANetworkPolicy decides which connections are allowed but does not encrypt the traffic
  2. BNetworkPolicy rules cannot select sources in a namespace other than the policy's own
  3. CThe policies take effect only after the database Pods are restarted
  4. DNetworkPolicy encrypts only the traffic that stays on a single node
Show the answer and why
  • ANetworkPolicy decides which connections are allowed but does not encrypt the traffic

    Correct

    The NetworkPolicy documentation lists anything TLS related among the things the API cannot do; allowed traffic travels as the applications send it.

  • BNetworkPolicy rules cannot select sources in a namespace other than the policy's own

    Incorrect

    Rules can allow sources in other namespaces through namespace selectors, so cross-namespace allow rules work as intended.

  • CThe policies take effect only after the database Pods are restarted

    Incorrect

    Policies apply to the Pods they select without restarts; only their effect on connections already open is implementation-defined.

  • DNetworkPolicy encrypts only the traffic that stays on a single node

    Incorrect

    NetworkPolicy encrypts no traffic at all, whether it stays on one node or crosses nodes.

NetworkPolicy filters which Pods may talk to which, but anything TLS related is outside its scope, so an attacker on the network path can still read allowed traffic. Encryption in transit has to come from TLS in the applications or a network layer that provides it.

Question 2 · choose 1

A security review worries that an attacker on the network path could make clients and kube-apiserver agree on an old TLS version with known weaknesses. Which kube-apiserver flag sets the lowest TLS version the API server accepts?

  1. A--secure-port
  2. B--tls-min-version
  3. C--client-ca-file
  4. D--tls-sni-cert-key
Show the answer and why
  • A--secure-port

    Incorrect

    --secure-port sets the port on which the API server serves HTTPS; it does not limit the TLS versions offered there.

  • B--tls-min-version

    Correct

    The kube-apiserver reference describes --tls-min-version as the minimum TLS version supported, with values from VersionTLS10 to VersionTLS13.

  • C--client-ca-file

    Incorrect

    --client-ca-file names the authorities whose client certificates authenticate users; it does not set a TLS version.

  • D--tls-sni-cert-key

    Incorrect

    --tls-sni-cert-key adds serving certificates for specific domain names; it does not set a TLS version.

Setting --tls-min-version, for example to VersionTLS12 or VersionTLS13, keeps clients from negotiating older protocol versions with the API server, which narrows what an attacker on the network path can attempt against its TLS connections.

Question 3 · choose 1

A security team wants a record of the connections that NetworkPolicies block, to spot an attacker probing the network. What can the NetworkPolicy API do about this?

  1. AWrite blocked connections to the API server audit log
  2. BLog them when policyTypes includes Logging
  3. CNothing; logging network security events is outside the API
  4. DAdd them as events on the NetworkPolicy object
Show the answer and why
  • AWrite blocked connections to the API server audit log

    Incorrect

    NetworkPolicy has no logging feature, and the audit log records API requests, not packets.

  • BLog them when policyTypes includes Logging

    Incorrect

    policyTypes accepts only Ingress and Egress.

  • CNothing; logging network security events is outside the API

    Correct

    The NetworkPolicy documentation lists the ability to log network security events, blocked or accepted connections, among the things the API cannot do.

  • DAdd them as events on the NetworkPolicy object

    Incorrect

    The API has no such reporting; some network plugins offer their own logging.

NetworkPolicy only declares allowed traffic. Logging blocked or accepted connections is listed as outside the API, so visibility into network probing has to come from the network plugin or other tools.

Practice domain 4 →Practice all domains →