<?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>Aspnet_regiis — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/aspnet_regiis/</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 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/aspnet_regiis/feed.xml" rel="self" type="application/rss+xml"/><item><title>Microsoft IIS Connection String Decryption via aspnet_regiis</title><link>https://feed.craftedsignal.io/briefs/2024-01-iis-connection-string-decryption/</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-iis-connection-string-decryption/</guid><description>An attacker with Microsoft IIS web server access can decrypt and dump hardcoded connection strings, such as MSSQL service account passwords, using the aspnet_regiis utility, potentially leading to credential compromise.</description><content:encoded><![CDATA[<p>This threat involves the decryption of Microsoft IIS connection strings using the <code>aspnet_regiis</code> utility. An attacker who has gained unauthorized access to an IIS web server, typically through a webshell or similar exploit, can leverage this technique to extract sensitive information. The <code>aspnet_regiis</code> tool, a legitimate .NET utility, is misused to decrypt connection strings, which often contain hardcoded credentials for databases like MSSQL. This allows the attacker to potentially compromise service accounts and gain further access to the compromised network. The described behavior has been observed in relation to espionage campaigns targeting telecommunications in South Asia, as detailed by Symantec. Defenders should be aware that successful exploitation allows for lateral movement and data exfiltration.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker gains initial access to a Microsoft IIS web server, often through exploiting a vulnerability that enables webshell deployment.</li>
<li>The attacker uses the webshell to execute commands on the compromised server.</li>
<li>The attacker uses <code>aspnet_regiis.exe</code> with the <code>-pdf</code> or <code>-pd</code> options to decrypt the <code>connectionStrings</code> section of the web.config file.</li>
<li>The command <code>aspnet_regiis.exe -pdf connectionStrings &lt;application_path&gt;</code> is used to decrypt the connection strings for a specific application.</li>
<li>The attacker retrieves the decrypted connection strings, which may contain usernames, passwords, and connection details for MSSQL or other databases.</li>
<li>The attacker uses the compromised credentials to access the database server and potentially other systems on the network, achieving lateral movement.</li>
<li>The attacker may then exfiltrate sensitive data from the database server.</li>
<li>The attacker uses gathered credentials to perform further actions or maintain persistence.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation can lead to the exposure of sensitive database credentials, allowing attackers to access and exfiltrate confidential information. This can result in significant data breaches, financial losses, and reputational damage. Depending on the compromised accounts&rsquo; privileges, attackers could gain control over critical systems and services. Compromised credentials may allow lateral movement to other systems and applications within the network.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule &ldquo;Detect IIS Connection String Decryption&rdquo; to your SIEM and tune for your environment to detect the usage of <code>aspnet_regiis.exe</code> with connection string decryption parameters.</li>
<li>Monitor process creation events for <code>aspnet_regiis.exe</code> with arguments containing <code>connectionStrings</code>, <code>-pdf</code>, or <code>-pd</code> (per the detection rule) to identify potential exploitation attempts.</li>
<li>Implement strict access controls on IIS web servers to limit the ability of attackers to execute arbitrary commands.</li>
<li>Review IIS web server configurations for weak or hardcoded credentials in connection strings and implement secure credential management practices.</li>
<li>Enable Sysmon process creation logging to capture command line arguments for executed processes and facilitate detection of malicious activity.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>credential-access</category><category>iis</category><category>aspnet_regiis</category><category>windows</category></item></channel></rss>