k8s-sidecar-attack

Detect Kubernetes Pods with sidecar containers and capture traffic in shared network namespaces.

1.6k|234|Updated Dec 7, 2019
One-click install
npx skills add https://github.com/wgpsec/AboutSecurity --skill k8s-sidecar-attack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: k8s-sidecar-attack
Source: https://github.com/wgpsec/AboutSecurity/tree/main/skills/cloud/k8s-sidecar-attack
Command: npx skills add https://github.com/wgpsec/AboutSecurity --skill k8s-sidecar-attack

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

In Kubernetes environments, containers within a Pod share a network namespace, enabling an attacker to sniff traffic from sidecar proxies such as Istio Envoy. This Skill guides detection, packet capture, and analysis of leaked data from sidecar-enabled Pods.

Core Features & Use Cases

  • Detect presence of sidecars in a Pod (Istio/Linkerd) and confirm shared network namespaces.
  • Perform traffic capture and analysis to reveal sensitive data in plain HTTP between services.
  • Provide actionable steps to identify traffic patterns and potential data exfiltration risks in a cluster.

Quick Start

Identify sidecar-enabled Pods and responsibly capture observable traffic for assessment.

Frequently Asked Questions about k8s-sidecar-attack

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How can I capture Kubernetes pod traffic when an Istio Envoy sidecar is present?

You can capture Kubernetes pod traffic by leveraging the shared network namespace within a pod to passively sniff traffic from sidecar proxies like Istio Envoy. This approach enables traffic capture and inspection without modifying the cluster state.

Why are containers in a Kubernetes Pod vulnerable to traffic sniffing?

Kubernetes containers in a Pod are vulnerable to traffic sniffing because they share a single network namespace. This architecture allows an attacker or researcher to observe unencrypted plain HTTP traffic passing between services via sidecar proxies.

What is the best way to detect sidecars like Linkerd or Istio in a Kubernetes cluster?

The best way to detect sidecars in a Kubernetes cluster is to scan for Istio, Envoy, or Linkerd proxy containers and confirm shared network namespaces. This reveals whether pod traffic is exposed and susceptible to passive traffic observation.

How do I analyze sensitive data exposure from Kubernetes sidecar traffic?

To analyze sensitive data exposure from Kubernetes sidecar traffic, perform packet capture within the pod network namespace to reveal plain HTTP data. This helps identify traffic patterns and potential data exfiltration risks in the cluster.

Does sidecar traffic capture modify the existing Kubernetes cluster state?

Sidecar traffic capture does not modify the Kubernetes cluster state. The process enforces safe, auditable steps focused entirely on passive traffic observation and packet capture within the existing pod network namespace.