<?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>Admission-Controller — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/admission-controller/</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>Fri, 01 Nov 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/admission-controller/feed.xml" rel="self" type="application/rss+xml"/><item><title>Kubernetes Admission Controller Modification</title><link>https://feed.craftedsignal.io/briefs/2024-11-kubernetes-admission-controller-modification/</link><pubDate>Fri, 01 Nov 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-11-kubernetes-admission-controller-modification/</guid><description>An adversary modifies Kubernetes admission controller configurations to achieve persistence, escalate privileges, or gain unauthorized access to credentials within the cluster.</description><content:encoded><![CDATA[<p>The Kubernetes admission controller is a crucial component that governs API requests to a Kubernetes cluster. Attackers can modify mutating or validating webhook configurations to intercept and manipulate these requests. By creating, updating, or replacing these configurations, adversaries can inject malicious code, alter resource definitions, or even exfiltrate sensitive information like access credentials. This activity can lead to privilege escalation, persistence within the cluster, and ultimately, a compromise of the entire Kubernetes environment. The attacks are typically stealthy as they operate within the legitimate Kubernetes API framework, making detection challenging. This behavior is particularly concerning for organizations relying on Kubernetes for critical applications and sensitive data.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li><strong>Initial Access:</strong> The attacker gains initial access to the Kubernetes cluster, potentially through compromised credentials or a vulnerability in a deployed application.</li>
<li><strong>Discovery:</strong> The attacker enumerates existing admission controller configurations (mutatingwebhookconfigurations and validatingwebhookconfigurations) to identify potential targets.</li>
<li><strong>Configuration Modification:</strong> The attacker uses <code>kubectl</code> or the Kubernetes API to create, update, or replace a webhook configuration. This involves crafting a malicious webhook that will intercept API requests.</li>
<li><strong>Webhook Deployment:</strong> The malicious webhook is deployed as a service within the Kubernetes cluster.</li>
<li><strong>API Interception:</strong> When a user or application makes an API request that matches the webhook&rsquo;s defined rules, the webhook intercepts the request.</li>
<li><strong>Malicious Code Injection:</strong> The webhook injects malicious code or alters the API request to achieve the attacker&rsquo;s objectives (e.g., granting unauthorized permissions, modifying resource configurations).</li>
<li><strong>Persistence/Privilege Escalation/Credential Access:</strong> Depending on the injected code, the attacker achieves persistence by ensuring malicious code is always present, escalates privileges by modifying role bindings, or accesses credentials by intercepting secret creation requests.</li>
<li><strong>Lateral Movement/Data Exfiltration:</strong> The attacker leverages their gained access to move laterally within the cluster or exfiltrate sensitive data.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful modification of Kubernetes admission controllers can have severe consequences. This can result in unauthorized access to sensitive data, complete cluster compromise, and denial of service. The impact ranges from data breaches and service disruptions to long-term persistence within the environment, allowing attackers to maintain control over the cluster. The stealthy nature of this attack makes it difficult to detect, potentially allowing attackers to operate undetected for extended periods.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule &ldquo;Kubernetes Admission Controller Modification&rdquo; to your SIEM and tune it for your environment to detect suspicious modifications to webhook configurations (logsource: kubernetes, service: audit).</li>
<li>Monitor Kubernetes audit logs for <code>create</code>, <code>delete</code>, <code>patch</code>, <code>replace</code>, and <code>update</code> verbs on <code>mutatingwebhookconfigurations</code> and <code>validatingwebhookconfigurations</code> resources (logsource: kubernetes, service: audit).</li>
<li>Implement strong RBAC policies to limit access to Kubernetes API resources and prevent unauthorized modification of admission controller configurations.</li>
<li>Regularly review and audit existing admission controller configurations to identify any unexpected or malicious webhooks.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>kubernetes</category><category>admission-controller</category><category>privilege-escalation</category><category>persistence</category><category>credential-access</category></item><item><title>Malicious Azure Kubernetes Admission Controller Configuration</title><link>https://feed.craftedsignal.io/briefs/2024-01-azure-kubernetes-admission-controller/</link><pubDate>Wed, 03 Jan 2024 15:30:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-azure-kubernetes-admission-controller/</guid><description>An adversary can exploit Kubernetes Admission Controllers in Azure to achieve persistence, privilege escalation, or credential access by manipulating webhook configurations.</description><content:encoded><![CDATA[<p>Kubernetes Admission Controllers are critical components that intercept and potentially modify requests to the Kubernetes API server. These controllers rely on admission webhooks (MutatingAdmissionWebhook or ValidatingAdmissionWebhook) deployed within the cluster. A malicious actor can abuse these webhooks to establish persistence by modifying pod creation operations and injecting malicious containers into new pods via MutatingAdmissionWebhook. Alternatively, ValidatingAdmissionWebhook can be used to intercept API server requests, potentially exposing secrets and sensitive information. This activity allows for credential access and privilege escalation, impacting the overall security posture of the Kubernetes cluster.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker gains initial access to the Azure Kubernetes cluster, possibly through compromised credentials or a vulnerability in a deployed application.</li>
<li>The attacker identifies the existing Admission Controller configuration within the Kubernetes cluster.</li>
<li>The attacker crafts a malicious MutatingAdmissionWebhook configuration to intercept pod creation requests.</li>
<li>The malicious webhook is deployed to the cluster, configured to modify pod specifications.</li>
<li>When new pods are created, the webhook injects a malicious container into the pod specification before deployment.</li>
<li>The malicious container executes within the newly created pod, providing the attacker with persistent access to the cluster.</li>
<li>Alternatively, the attacker crafts a malicious ValidatingAdmissionWebhook to intercept API requests.</li>
<li>The webhook captures sensitive data, such as secrets, and sends it to an attacker-controlled server, resulting in credential access.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Compromising the Kubernetes Admission Controller can lead to persistent access within the cluster. The attacker can inject malicious containers into numerous pods, potentially affecting all applications deployed in the cluster. Sensitive information, like secrets, can be stolen, enabling lateral movement and privilege escalation within the Azure environment. The impact ranges from data breaches to complete cluster compromise.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule &ldquo;Azure Kubernetes Admission Controller Configuration Change&rdquo; to detect unauthorized modifications to Admission Controller configurations in Azure Activity Logs.</li>
<li>Regularly review and audit existing Admission Controller configurations for any unexpected or malicious webhooks.</li>
<li>Implement strong RBAC policies to restrict access to Admission Controller configuration and prevent unauthorized modifications.</li>
<li>Monitor Azure Activity Logs for <code>MICROSOFT.KUBERNETES/CONNECTEDCLUSTERS/ADMISSIONREGISTRATION.K8S.IO</code> and <code>MICROSOFT.CONTAINERSERVICE/MANAGEDCLUSTERS/ADMISSIONREGISTRATION.K8S.IO</code> operations to identify potential abuse.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>azure</category><category>kubernetes</category><category>admission-controller</category><category>persistence</category><category>privilege-escalation</category><category>credential-access</category></item></channel></rss>