Skip to content
Threat Feed
medium advisory

Detection of Insecure Curl Execution in Kubernetes Clusters

Threat actors may leverage curl with insecure flags within Kubernetes environments to bypass TLS certificate verification, facilitating man-in-the-middle attacks and unauthorized tool ingress.

Monitoring of Kubernetes environments reveals that curl commands are frequently executed with insecure flags, such as -k or --insecure, to circumvent SSL/TLS verification during file transfers. This activity is often associated with the ingress of unauthorized tools or payloads into containerized environments. Within the Cisco Isovalent platform, defenders can monitor process execution logs to identify these commands. This behavior is notable because bypassing certificate validation exposes the infrastructure to man-in-the-middle attacks, potentially leading to sensitive data interception, service disruption, or unauthorized access to the cluster. SOC teams should investigate such executions to determine if they originate from legitimate administrative scripts or indicate malicious activity.

Attack Chain

  1. Attacker gains initial access to a Kubernetes pod, possibly via compromised container applications.
  2. Attacker attempts to download external malicious tools or configuration files using curl.
  3. The target server uses self-signed or invalid certificates, preventing standard curl requests.
  4. Attacker executes curl with the -k or --insecure flag to force the connection despite certificate validation errors.
  5. The insecure connection is established, potentially allowing an interceptor to perform a man-in-the-middle attack.
  6. The attacker successfully pulls the secondary stage payload or configuration into the container.
  7. The attacker executes the downloaded payload to conduct further malicious actions, such as lateral movement or data exfiltration.

Impact

Successful exploitation allows attackers to bypass infrastructure security controls, leading to the ingress of unauthorized payloads, potential interception of sensitive communications, and unauthorized access to the Kubernetes control plane or pod secrets. This impacts security posture by weakening the transport layer security required for cloud-native workloads.

Recommendation

  • Deploy detection logic to monitor process execution logs within the Cisco Isovalent environment for curl commands containing insecure flags.
  • Audit administrative scripts and container entrypoints that utilize curl to ensure certificate verification is enforced where feasible.
  • Use the provided Sigma rule to detect these command-line arguments in process monitoring telemetry.
  • Investigate triggered alerts by cross-referencing with pod activity and established cron jobs to reduce noise from legitimate administrative tasks.

Immediate actions

Deploy Sigma rule to monitor for insecure curl flags in CI/CD and runtime environments.

Detection Engineering 48h

Threat Hunt

Search historical logs for curl commands with -k or --insecure.

T1105 medium high confidence hunt now

Data: Process execution telemetry

Mitigations

Enforce TLS certificate validation for all outbound connections in cluster network policies.

medium IT Operations

T1105

Detection coverage 1

Detect Curl Execution With Insecure Flags

medium

Detects the use of curl command-line arguments that bypass SSL/TLS verification, which may indicate malicious tool ingress.

sigma tactics: command_and_control techniques: T1105 sources: process_creation, linux

Detection queries are available on the platform. Get full rules →