<?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>Elastic Defend for Containers — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/elastic-defend-for-containers/</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/products/elastic-defend-for-containers/feed.xml" rel="self" type="application/rss+xml"/><item><title>Suspicious Unshare Usage for Container Escape and Privilege Escalation</title><link>https://feed.craftedsignal.io/briefs/2024-01-unshare-container-escape/</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-unshare-container-escape/</guid><description>The rule identifies suspicious usage of unshare to manipulate system namespaces, which can be utilized to escalate privileges or escape container security boundaries.</description><content:encoded><![CDATA[<p>The <code>unshare</code> command in Linux is used to create new namespaces, isolating processes from the rest of the system. This isolation is crucial for containerization and security. However, attackers can exploit <code>unshare</code> to break out of containers or elevate privileges by creating namespaces that bypass security controls. This activity has been observed in containerized environments where threat actors attempt to gain unauthorized access to the host system or escalate their privileges within the container. The detection rule identifies suspicious <code>unshare</code> executions by monitoring process starts, filtering out benign parent processes, and focusing on unusual usage patterns, thus highlighting potential misuse. The rule covers activity starting from Elastic Defend for Containers version 9.3.0.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>A containerized process is compromised, potentially through an initial exploit or misconfiguration.</li>
<li>The attacker executes the <code>unshare</code> command within the container.</li>
<li><code>unshare</code> is used to create new namespaces, isolating the attacker&rsquo;s process from the container&rsquo;s limitations.</li>
<li>The attacker manipulates these namespaces to gain access to resources outside the container.</li>
<li>The attacker attempts to escape the container by leveraging the newly created namespaces.</li>
<li>Upon successful escape, the attacker gains access to the host system.</li>
<li>The attacker escalates privileges on the host, potentially exploiting vulnerabilities or misconfigurations.</li>
<li>The attacker achieves full control over the host system, allowing for data exfiltration, system compromise, or lateral movement.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation can lead to container escape, allowing attackers to gain unauthorized access to the host system. This can result in privilege escalation, data exfiltration, and complete system compromise. The rule aims to detect and prevent such attacks by identifying suspicious usage of the <code>unshare</code> command, helping to maintain the integrity and security of containerized environments.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the provided Sigma rule to your SIEM to detect suspicious <code>unshare</code> executions within containers and tune for your environment.</li>
<li>Review and whitelist legitimate uses of <code>unshare</code> by system management tools like <code>udevadm</code> and <code>systemd-udevd</code> to reduce false positives, as mentioned in the rule&rsquo;s description.</li>
<li>Implement additional monitoring and alerting for unusual <code>unshare</code> usage patterns to enhance detection capabilities and prevent future occurrences.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>privilege-escalation</category><category>container-escape</category><category>linux</category></item></channel></rss>