<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Kubelet — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/kubelet/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 03 Jan 2024 14:30:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/kubelet/feed.xml" rel="self" type="application/rss+xml"/><item><title>Kubelet API Connection Attempt to Internal IP</title><link>https://feed.craftedsignal.io/briefs/2024-01-kubelet-api-connection/</link><pubDate>Wed, 03 Jan 2024 14:30:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-kubelet-api-connection/</guid><description>The rule detects network connection attempts to the Kubernetes Kubelet API ports 10250 and 10255 on internal IP ranges from Linux hosts, indicating potential lateral movement within container and cluster environments.</description><content:encoded><![CDATA[<p>This detection rule identifies suspicious network connections to the Kubernetes Kubelet API, specifically targeting ports 10250 and 10255, from Linux hosts within internal network ranges. Attackers frequently exploit weak authentication or network controls to access the Kubelet API, potentially enabling them to enumerate pods, retrieve logs, and execute commands on nodes. This activity often originates from common scripting utilities like <code>curl</code>, <code>wget</code>, or interpreters like <code>python</code> and <code>node</code>, particularly when executed from world-writable directories such as <code>/tmp</code>, <code>/var/tmp</code>, or <code>/dev/shm</code>. This technique is often a component of container and cluster lateral movement, where the attacker seeks to expand their access within the Kubernetes environment. The rule is designed to detect these unauthorized attempts and alert security teams to investigate potential breaches.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains initial access to a compromised container or host within the Kubernetes cluster, potentially through exploiting a vulnerability in a running application.</li>
<li>The attacker executes a reconnaissance command, such as <code>curl</code> or <code>wget</code>, from within the compromised container, targeting the Kubelet API on port 10250 or 10255.</li>
<li>The <code>curl</code> or <code>wget</code> command is executed from a temporary directory like <code>/tmp</code> or <code>/dev/shm</code> to avoid detection.</li>
<li>The attacker attempts to enumerate running pods and services by querying the <code>/pods</code> or <code>/runningpods</code> endpoints of the Kubelet API.</li>
<li>If successful, the attacker identifies a target pod within the cluster based on the enumerated information.</li>
<li>The attacker leverages the Kubelet API to execute commands within the target pod, potentially escalating privileges or accessing sensitive data.</li>
<li>The attacker attempts to move laterally to other nodes or containers within the Kubernetes cluster, repeating the reconnaissance and exploitation steps.</li>
<li>The ultimate goal is to gain control over the entire Kubernetes cluster, enabling data exfiltration, resource hijacking, or disruption of services.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of the Kubelet API can lead to a complete compromise of the Kubernetes cluster. Attackers can gain unauthorized access to sensitive data, escalate privileges, and disrupt critical services. While the number of victims may vary depending on the organization&rsquo;s security posture, a successful attack could impact all applications and data managed by the cluster. Organizations in any sector utilizing Kubernetes are potentially at risk.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Enable syscall auditing and ensure that <code>event.category:network</code> events are generated for network connections, as outlined in the rule&rsquo;s setup guide.</li>
<li>Deploy the provided Sigma rule to your SIEM and tune it based on your environment to reduce false positives.</li>
<li>Restrict pod-to-node access to port 10250 using network policies or security groups to limit the attack surface, as noted in the rule&rsquo;s documentation.</li>
<li>Implement Kubernetes API audit logging to detect unauthorized access attempts and credential access, correlating with process argument telemetry as mentioned in the triage steps.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>kubernetes</category><category>lateral-movement</category><category>kubelet</category><category>linux</category><category>container</category></item><item><title>Unusual Process Connecting to Docker or Containerd Socket</title><link>https://feed.craftedsignal.io/briefs/2024-01-unusual-container-socket-connection/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-unusual-container-socket-connection/</guid><description>An unusual process connecting to a container runtime Unix socket like Docker or Containerd can indicate an attacker attempting to bypass Kubernetes security measures for container manipulation.</description><content:encoded><![CDATA[<p>This threat involves unauthorized processes connecting directly to container runtime sockets (Docker or Containerd) on Linux systems. This bypasses Kubernetes API server restrictions, potentially allowing attackers to create, execute, or manipulate containers without proper authorization or logging. The risk lies in attackers circumventing RBAC, admission webhooks, and pod security standards. The attack can start when a compromised process attempts to connect to the Docker or Containerd socket, potentially leading to privilege escalation and lateral movement within the containerized environment. This attack is significant because it undermines core security controls within container orchestration platforms.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>A malicious or compromised process gains initial access to the host system.</li>
<li>The process attempts to connect to the container runtime socket (e.g., <code>/var/run/docker.sock</code> or <code>/run/containerd/containerd.sock</code>).</li>
<li>The process bypasses the Kubernetes API server and associated security controls.</li>
<li>The attacker exploits the direct socket connection to create a new container.</li>
<li>The attacker gains access to sensitive data or resources within the container.</li>
<li>The attacker escalates privileges within the compromised container.</li>
<li>The attacker uses the compromised container to move laterally to other containers or hosts within the environment.</li>
<li>The attacker achieves their objective, such as data exfiltration or system compromise.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows attackers to bypass Kubernetes security measures, create unauthorized containers, and potentially gain control over the entire cluster. The observed impact includes privilege escalation, lateral movement, and data exfiltration. The severity of this attack depends on the level of access granted to the compromised container and the sensitivity of the data and resources within the cluster.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Enable Auditd Manager to capture network and socket events, specifically monitoring for <code>connect</code> calls to Unix sockets as described in the <a href="https://docs.elastic.co/integrations/auditd_manager">Auditd Manager documentation</a>.</li>
<li>Deploy the Sigma rule &ldquo;Unusual Process Connecting to Docker or Containerd Socket&rdquo; to detect suspicious processes connecting to container runtime sockets, tuning <code>process.executable</code> and <code>user.name</code> for known legitimate processes.</li>
<li>Monitor file permissions on the socket paths (<code>/var/run/docker.sock</code>, <code>/run/docker.sock</code>, <code>/var/run/containerd/containerd.sock</code>, <code>/run/containerd/containerd.sock</code>) and restrict access to trusted groups only.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>container</category><category>privilege-escalation</category><category>lateral-movement</category><category>linux</category></item></channel></rss>