<?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>Kubeletctl — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/kubeletctl/</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>Tue, 02 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/kubeletctl/feed.xml" rel="self" type="application/rss+xml"/><item><title>Potential Kubeletctl Execution on Linux Hosts</title><link>https://feed.craftedsignal.io/briefs/2024-01-kubeletctl-execution/</link><pubDate>Tue, 02 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-kubeletctl-execution/</guid><description>This rule detects the execution of kubeletctl, a command-line tool used to interact with the Kubelet API, on Linux hosts, potentially leading to discovery and lateral movement within Kubernetes environments.</description><content:encoded><![CDATA[<p>The kubeletctl tool simplifies access to Kubelet endpoints, potentially allowing attackers to perform discovery and lateral movement within Kubernetes environments. The tool can be used to enumerate pods and nodes, and attempt actions such as exec/attach/portForward. Attackers may run <code>kubeletctl scan</code> to find reachable Kubelet endpoints, then use <code>pods</code> or <code>exec/attach</code> for follow-on access. This activity is typically observed on Linux hosts within containerized environments. Defenders should monitor for the execution of kubeletctl with suspicious arguments or connections to Kubelet ports (commonly 10250/10255).</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker gains initial access to a compromised host within the Kubernetes environment.</li>
<li>Attacker downloads or transfers the <code>kubeletctl</code> binary to the compromised host.</li>
<li>Attacker executes <code>kubeletctl scan</code> to identify accessible Kubelet API endpoints by scanning for open ports 10250 and 10255.</li>
<li>Attacker uses <code>kubeletctl pods</code> to enumerate running pods on a targeted node based on the scan results.</li>
<li>Attacker leverages <code>kubeletctl exec</code> or <code>kubeletctl attach</code> to gain shell access to a pod.</li>
<li>Attacker uses the compromised pod to move laterally within the Kubernetes cluster, potentially accessing sensitive data or resources.</li>
<li>Attacker may attempt to access Kubernetes credentials, such as service account tokens or kubeconfigs, for further privilege escalation.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation can allow attackers to enumerate pods and nodes, execute commands within containers, and potentially move laterally within the Kubernetes cluster. This could lead to unauthorized access to sensitive data, resource hijacking, or complete compromise of the Kubernetes environment. The CyberArk research cited in the references describes how kubeletctl can be leveraged to attack Kubernetes clusters.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule <code>Potential Kubeletctl Execution</code> to detect suspicious execution of the <code>kubeletctl</code> binary on Linux hosts, focusing on command-line arguments such as <code>scan</code>, <code>pods</code>, <code>exec</code>, and <code>attach</code>.</li>
<li>Monitor host and container telemetry for connections to Kubelet ports (10250/10255) using a network connection rule and look for scanning patterns across multiple nodes.</li>
<li>Restrict access to Kubelet ports at the network layer and harden Kubelet authentication/authorization based on the recommendations in the provided references.</li>
<li>Rotate/revoke any exposed Kubernetes credentials (service account tokens, kubeconfigs, client certs) and investigate for follow-on discovery or execution attempts.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>kubernetes</category><category>kubeletctl</category><category>container</category><category>linux</category></item><item><title>Kubeletctl Execution Inside Container Detected</title><link>https://feed.craftedsignal.io/briefs/2024-01-kubeletctl-container-execution/</link><pubDate>Tue, 02 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-kubeletctl-container-execution/</guid><description>This rule detects the execution of kubeletctl inside a container, which can be used to enumerate the Kubelet API or other resources inside the container, potentially indicating lateral movement attempts within the pod.</description><content:encoded><![CDATA[<p>This rule detects the execution of <code>kubeletctl</code> inside a container. Kubeletctl is a command-line tool that interacts with the Kubelet API directly, making the often undocumented API more accessible. Attackers may use it to enumerate the Kubelet API or other resources within the container, potentially indicating lateral movement within the pod. The detection is based on the &ldquo;Defend for Containers&rdquo; integration (version 9.3.0 and later) within the Elastic stack. This activity is significant because <code>kubeletctl</code> can expose pod and node details, enabling actions that facilitate discovery and lateral movement from a compromised container.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains initial access to a container, possibly through a vulnerability in the containerized application or a misconfigured Kubernetes environment.</li>
<li>The attacker executes <code>kubeletctl</code> inside the compromised container. This could be facilitated by the tool being present in the container image or downloaded post-compromise.</li>
<li>The attacker uses <code>kubeletctl scan</code> to discover Kubelet endpoints within the Kubernetes cluster.</li>
<li>The attacker leverages <code>kubeletctl pods</code> or <code>kubeletctl runningpods</code> to enumerate running pods and their details.</li>
<li>The attacker uses the discovered pod information to identify potential targets for lateral movement.</li>
<li>The attacker attempts to use <code>kubeletctl exec</code> or <code>kubeletctl attach</code> to gain access to other pods within the cluster.</li>
<li>The attacker attempts to port forward using <code>kubeletctl portForward</code> to establish connections to services running in other pods.</li>
<li>Upon successful lateral movement, the attacker performs further reconnaissance or deploys malicious payloads to achieve their objectives, such as data exfiltration or denial-of-service.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful execution of <code>kubeletctl</code> within a container can lead to the exposure of sensitive information about the Kubernetes cluster, including pod details and internal network configurations. This can enable attackers to move laterally within the cluster, potentially compromising other applications and data. The impact could range from data breaches and service disruptions to full cluster compromise depending on the attacker&rsquo;s objectives and the scope of the compromised container&rsquo;s access.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the provided Sigma rule to your SIEM to detect the execution of <code>kubeletctl</code> within containers based on process name and arguments.</li>
<li>Monitor container network activity for connections to node addresses on Kubelet ports (commonly 10250/10255) and investigate any suspicious patterns.</li>
<li>Implement network policies to restrict pod-to-node access to the Kubelet API.</li>
<li>Harden container images by removing unnecessary tools like <code>kubeletctl</code> and enforce least privilege principles.</li>
<li>Enable and review Kubernetes audit logs to identify the source of interactive sessions into containers, correlating with timestamps of <code>kubeletctl</code> execution.</li>
<li>Enforce Pod Security Standards to restrict privileged pods and limit node API exposure.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>container</category><category>kubeletctl</category><category>lateral-movement</category><category>execution</category></item></channel></rss>