<?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>Appcmd — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/appcmd/</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/tags/appcmd/feed.xml" rel="self" type="application/rss+xml"/><item><title>IIS AppCmd Tool Used to Dump Service Account Credentials</title><link>https://feed.craftedsignal.io/briefs/2024-01-iis-appcmd-credential-dump/</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-iis-appcmd-credential-dump/</guid><description>Attackers with access to IIS web servers may use the AppCmd command-line tool to dump sensitive configuration data, including application pool credentials, potentially leading to lateral movement and privilege escalation.</description><content:encoded><![CDATA[<p>Attackers who have gained a foothold on a Windows web server running Internet Information Services (IIS) may attempt to extract sensitive information, such as application pool credentials, to facilitate lateral movement and privilege escalation. This is achieved by leveraging the AppCmd.exe utility, a command-line tool used to manage IIS configurations. By issuing specific commands, attackers can dump the entire web server configuration or target specific fields containing credential-related data, exposing usernames, passwords, and connection strings in clear text. Successful exploitation allows attackers to reuse these credentials to access other systems within the environment, potentially leading to significant data breaches or system compromise. This technique is particularly effective against organizations that store sensitive credentials within their IIS configurations.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker gains initial access to the Windows web server, often through a web shell or by exploiting a vulnerability in a web application.</li>
<li>The attacker executes <code>appcmd.exe</code> via the command line.</li>
<li>The attacker uses the <code>list</code> argument to enumerate application pools or other relevant IIS configurations.</li>
<li>The attacker uses <code>/text:*password*</code>, <code>/text:*processModel*</code>, <code>/text:*userName*</code>, <code>/config</code> or <code>*connectionstring*</code> parameters with <code>appcmd.exe</code> to filter the output and specifically target credential-related data. Alternatively the attacker may use <code>/text:*</code> to output the full configuration.</li>
<li><code>appcmd.exe</code> outputs the requested configuration data, which may include usernames, passwords, and connection strings in clear text.</li>
<li>The attacker parses the output to extract valid credentials.</li>
<li>The attacker uses the extracted credentials to authenticate to other systems or services within the network.</li>
<li>The attacker achieves lateral movement, privilege escalation, and access to sensitive data.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows attackers to recover service account passwords and other sensitive credentials stored within the IIS configuration. This can lead to unauthorized access to databases, file shares, and other internal systems, potentially resulting in data breaches, financial loss, and reputational damage. While the rule itself is low severity, the subsequent impact of exposed credentials can be severe.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the &ldquo;Microsoft IIS Service Account Password Dumped&rdquo; Sigma rule to your SIEM to detect the use of <code>appcmd.exe</code> to dump sensitive IIS configuration data.</li>
<li>Review IIS and web server activity for signs of exploitation, such as requests to newly created ASPX or PHP files as suggested in the rule&rsquo;s Triage and Analysis section.</li>
<li>Enable Sysmon process creation logging to activate the rules above and provide detailed process execution data.</li>
<li>Implement the password rotation for affected service accounts as suggested in the rule&rsquo;s Triage and Analysis section.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>credential-access</category><category>iis</category><category>appcmd</category><category>windows</category></item><item><title>IIS HTTP Logging Disabled via AppCmd</title><link>https://feed.craftedsignal.io/briefs/2024-01-iis-http-logging-disabled/</link><pubDate>Wed, 03 Jan 2024 10:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-iis-http-logging-disabled/</guid><description>An attacker with IIS server access can disable HTTP Logging using `appcmd.exe` to evade defenses and prevent forensic analysis, as detected by the execution of `appcmd.exe` with arguments to disable logging.</description><content:encoded><![CDATA[<p>Attackers with access to an Internet Information Services (IIS) server, potentially through a webshell or other compromised entry point, may disable HTTP logging as a defense evasion technique. This is typically achieved by using the <code>appcmd.exe</code> utility with specific arguments to modify the IIS configuration, preventing the server from recording HTTP requests and responses. Disabling logging makes it significantly harder for defenders to detect malicious activity, trace attacker actions, and perform effective incident response. This activity is a common tactic employed by threat actors to obscure their presence and maintain persistence within a compromised environment, particularly when deploying webshells or conducting lateral movement. This behavior is typically observed post-exploitation.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker gains initial access to the IIS server, possibly via a webshell or exploiting a vulnerability.</li>
<li>Attacker executes <code>appcmd.exe</code> to modify the IIS configuration.</li>
<li>The <code>appcmd.exe</code> command includes arguments to disable HTTP logging, such as <code>/dontLog*:*True</code>.</li>
<li>The command targets specific sites, applications, or the entire server depending on the attacker&rsquo;s objectives.</li>
<li>IIS configuration files, such as <code>applicationHost.config</code> or <code>web.config</code>, are modified to reflect the changes.</li>
<li>HTTP logging is disabled, preventing the server from recording HTTP requests and responses.</li>
<li>Attacker performs malicious activities, such as deploying webshells, without generating HTTP logs.</li>
<li>Attacker maintains persistence and evades detection by preventing forensic analysis.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful disabling of IIS HTTP logging can severely impair incident response capabilities. Organizations may be unable to detect malicious activity within their web infrastructure, leading to prolonged compromises and increased damage. This technique can be particularly damaging when attackers deploy webshells or conduct lateral movement within the network. Without HTTP logs, tracing attacker actions and identifying compromised systems becomes significantly more challenging. The impact can range from data breaches to system downtime and reputational damage.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule &ldquo;IIS HTTP Logging Disabled via AppCmd&rdquo; to your SIEM to detect when <code>appcmd.exe</code> is used to disable HTTP logging.</li>
<li>Enable Sysmon process creation logging with Event ID 1 to capture the execution of <code>appcmd.exe</code> with the relevant arguments, enabling detection via the Sigma rules.</li>
<li>Investigate any alerts generated by the Sigma rule, focusing on the parent process of <code>appcmd.exe</code> and the user account under which it was executed.</li>
<li>Monitor for modifications to IIS configuration files (<code>applicationHost.config</code>, <code>web.config</code>) to detect unauthorized changes to logging settings.</li>
<li>Regularly review and validate the configuration of IIS HTTP logging to ensure it remains enabled and properly configured.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>defense-evasion</category><category>iis</category><category>httplogging</category><category>appcmd</category><category>windows</category></item><item><title>Microsoft IIS Service Account Password Dump via AppCmd</title><link>https://feed.craftedsignal.io/briefs/2024-01-02-iis-appcmd-credential-dump/</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-02-iis-appcmd-credential-dump/</guid><description>An attacker with IIS web server access via a web shell can extract service account passwords by requesting full configuration output or targeting credential-related fields using the AppCmd tool.</description><content:encoded><![CDATA[<p>The Microsoft Internet Information Services (IIS) command-line tool, AppCmd, is used to manage IIS configurations. An attacker who gains access to an IIS web server, often through a web shell, can leverage AppCmd to dump sensitive configuration data, including application pool credentials. This involves requesting full configuration output or targeting specific credential-related fields, potentially exposing service account passwords in clear text. This activity is typically post-compromise and indicates an attempt to escalate privileges or move laterally within the network. The risk lies in the exposure of credentials that can be reused to access other systems or data.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains initial access to the IIS web server, commonly through exploiting a vulnerability or uploading a web shell (e.g., ASPX or PHP).</li>
<li>The attacker uses the web shell to execute commands on the server.</li>
<li>The attacker uses <code>appcmd.exe</code> to list the IIS configuration.</li>
<li>The <code>appcmd.exe</code> command includes arguments to display specific configuration sections related to credentials, such as application pool identities, process model settings, or connection strings. Examples of command line arguments used are <code>/text:*password*</code>, <code>/text:*processModel*</code>, <code>/text:*userName*</code>, <code>/config</code>, or <code>*connectionstring*</code>.</li>
<li><code>appcmd.exe</code> outputs the requested configuration data to the console, which includes sensitive information like usernames and passwords in plaintext.</li>
<li>The attacker captures the output containing the credentials.</li>
<li>The attacker uses the acquired credentials to move laterally to other systems on the network or access sensitive data.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation can lead to the exposure of sensitive credentials, enabling attackers to perform lateral movement, privilege escalation, and data exfiltration. The number of potential victims is dependent on the scope of the attacker&rsquo;s access and the configuration of the IIS server. Sectors commonly targeted include organizations that rely heavily on web applications and services, such as e-commerce, finance, and healthcare. If successful, the attacker can gain complete control over critical systems and data.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Enable Sysmon process creation logging to capture <code>appcmd.exe</code> execution with command-line arguments.</li>
<li>Deploy the Sigma rule <code>Detect IIS AppCmd Credential Dumping</code> to your SIEM and tune for your environment.</li>
<li>Monitor IIS and web server activity for signs of exploitation, such as requests to newly created ASPX or PHP files, requests containing command-execution parameters, or uploads to writable web paths.</li>
<li>Implement privileged access management (PAM) solutions to restrict the usage of service accounts.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>credential-access</category><category>iis</category><category>appcmd</category><category>windows</category></item></channel></rss>