<?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>Kaspersky Security for Windows Server — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/kaspersky-security-for-windows-server/</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, 09 Jan 2024 10:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/kaspersky-security-for-windows-server/feed.xml" rel="self" type="application/rss+xml"/><item><title>Detection of Custom Shim Database Installation for Persistence</title><link>https://feed.craftedsignal.io/briefs/2024-01-09-app-compat-shim-persistence/</link><pubDate>Tue, 09 Jan 2024 10:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-09-app-compat-shim-persistence/</guid><description>Attackers abuse the Application Compatibility Shim functionality in Windows to establish persistence and achieve arbitrary code execution by installing malicious shim databases, which this detection identifies through monitoring registry changes.</description><content:encoded><![CDATA[<p>Attackers can exploit the Windows Application Compatibility Shim functionality to maintain persistence and execute arbitrary code within legitimate Windows processes. This is achieved by installing custom shim databases, which are designed to ensure older applications run smoothly on newer operating systems. By manipulating these databases, attackers can stealthily inject malicious code into trusted processes. The rule detects changes in specific registry paths associated with the installation of these databases, excluding known legitimate processes to minimize false positives. This technique allows for the execution of malicious code without directly modifying the target application&rsquo;s executable, making it difficult to detect with traditional methods.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker gains initial access to the system (e.g., via phishing or exploiting a vulnerability).</li>
<li>The attacker modifies the registry to create a new entry for a custom shim database. The registry path targeted is typically under <code>HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Custom\</code>.</li>
<li>The attacker writes a malicious <code>.sdb</code> file containing the custom shim database to a location on disk.</li>
<li>The registry entry created points to the malicious <code>.sdb</code> file.</li>
<li>When a targeted application is launched, Windows checks the AppCompatFlags registry keys.</li>
<li>The system loads the malicious shim database specified in the registry.</li>
<li>The malicious code within the shim database is executed in the context of the targeted application.</li>
<li>The attacker achieves persistence, as the malicious shim database is loaded every time the targeted application is run.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows attackers to maintain persistent access to the system, even after reboots or software updates. The injected code runs within the context of a legitimate process, which can evade detection by traditional security tools. This can lead to data theft, system compromise, or further malicious activities, such as lateral movement within the network. The use of application shimming for persistence affects systems running Windows and can impact organizations of any size or sector.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule <code>Detect Custom Shim Database Installation</code> to your SIEM to identify suspicious registry modifications related to application shimming.</li>
<li>Enable Sysmon registry event logging to ensure the necessary data is available for the Sigma rule to function.</li>
<li>Investigate any alerts generated by the Sigma rule, focusing on processes that are not in the exclusion list.</li>
<li>Block or quarantine any identified malicious <code>.sdb</code> files to prevent further execution.</li>
<li>Review and update the exclusion list in the Sigma rule with any newly identified legitimate applications that use shim databases, reducing false positives.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>persistence</category><category>app-compat</category><category>shim</category><category>windows</category></item></channel></rss>