heroui logo

Kubernetes Data Copy via kubectl cp

Panther Rules

View Source
Summary
The Kubernetes Data Copy via kubectl cp detection rule focuses on monitoring the use of the 'kubectl cp' command, which is capable of copying files from Kubernetes pods to local machines. This operation can become a vector for data exfiltration as attackers combining unauthorized access to a Kubernetes cluster with the 'kubectl cp' command can transfer sensitive data outside the cluster without leaving obvious traces. When executed, 'kubectl cp' runs a tar command within the target pod/container and streams the unpackaged content back to the user’s local environment through the Kubernetes API. The detection rule aims to flag these operations, especially when they are unexpected or occur in a suspicious context, thus potentially indicating unauthorized data theft. Investigative remediation steps are provided in the accompanying runbook to assess any flagged instances, discuss the files copied, and search for further signs of malicious activity in the relevant timeframe.
Categories
  • Kubernetes
  • Cloud
  • Infrastructure
Data Sources
  • Pod
  • User Account
  • Network Traffic
  • Application Log
  • Cloud Service
ATT&CK Techniques
  • T1530
  • T1552
Created: 2026-02-18