<?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>TeamCity — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/teamcity/</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, 15 May 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/teamcity/feed.xml" rel="self" type="application/rss+xml"/><item><title>Suspicious Child Processes Spawned by JetBrains TeamCity</title><link>https://feed.craftedsignal.io/briefs/2024-05-jetbrains-teamcity-suspicious-child-process/</link><pubDate>Wed, 15 May 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-05-jetbrains-teamcity-suspicious-child-process/</guid><description>Detection of suspicious processes spawned by JetBrains TeamCity indicates potential exploitation of remote code execution vulnerabilities, with attackers using command interpreters and system binaries for malicious purposes.</description><content:encoded><![CDATA[<p>JetBrains TeamCity is a continuous integration and deployment server, making it a high-value target for attackers. Exploitation of TeamCity vulnerabilities can lead to remote code execution, enabling adversaries to compromise the software development pipeline. This activity is detected by monitoring for suspicious child processes initiated by the TeamCity Java executable, focusing on executables like <code>cmd.exe</code>, <code>powershell.exe</code>, and <code>msiexec.exe</code>. The detection logic excludes legitimate operations to reduce false positives. This activity can lead to complete compromise of the build environment, allowing attackers to inject malicious code into software builds.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li><strong>Initial Access:</strong> An attacker exploits a vulnerability (e.g., CVE-2023-42793) in the TeamCity server to gain initial access.</li>
<li><strong>Code Execution:</strong> The attacker leverages the vulnerability to execute arbitrary code on the TeamCity server.</li>
<li><strong>Process Spawning:</strong> The attacker spawns a command interpreter, such as <code>cmd.exe</code> or <code>powershell.exe</code>, from the TeamCity Java process (<code>java.exe</code>).</li>
<li><strong>Discovery:</strong> The attacker uses discovery commands via the spawned shell to enumerate users, network configuration, and running processes using tools like <code>whoami.exe</code>, <code>ipconfig.exe</code>, and <code>tasklist.exe</code>.</li>
<li><strong>Defense Evasion:</strong> The attacker leverages system binary proxy execution using tools like <code>mshta.exe</code> or <code>regsvr32.exe</code> to evade detection.</li>
<li><strong>Persistence:</strong> While not explicitly mentioned, the attacker could establish persistence by creating scheduled tasks or modifying registry keys via spawned processes.</li>
<li><strong>Lateral Movement:</strong> The attacker uses discovered credentials to move laterally to other systems within the network.</li>
<li><strong>Impact:</strong> The attacker injects malicious code into software builds, compromises sensitive data, or deploys ransomware.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of JetBrains TeamCity can lead to a full compromise of the software development lifecycle, resulting in supply chain attacks. Attackers can inject malicious code into software builds, leading to widespread distribution of compromised software. While specific victim counts are unavailable, this type of attack has the potential to affect numerous organizations relying on the compromised software. The Trend Micro research indicates that TeamCity vulnerability exploits can lead to Jasmin ransomware deployment.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the &ldquo;Suspicious JetBrains TeamCity Child Process&rdquo; rule to your SIEM to detect potential exploitation attempts.</li>
<li>Enable Sysmon process creation logging to capture process execution events, which are essential for triggering the detection rule.</li>
<li>Review and patch any known vulnerabilities in JetBrains TeamCity, focusing on remote code execution flaws as described in the referenced Trend Micro report.</li>
<li>Implement network segmentation to limit the impact of a compromised TeamCity server and prevent lateral movement.</li>
<li>Continuously monitor TeamCity server logs for any unusual activity or unauthorized access attempts.</li>
<li>Tune the &ldquo;Suspicious JetBrains TeamCity Child Process&rdquo; rule by creating exceptions for legitimate build scripts that invoke command-line utilities to reduce false positives, as mentioned in the rule&rsquo;s documentation.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>teamcity</category><category>supply-chain</category><category>initial-access</category></item><item><title>JetBrains TeamCity Relative Path Traversal Vulnerability (CVE-2024-27199)</title><link>https://feed.craftedsignal.io/briefs/2024-04-teamcity-path-traversal/</link><pubDate>Mon, 29 Apr 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-04-teamcity-path-traversal/</guid><description>A relative path traversal vulnerability in JetBrains TeamCity (CVE-2024-27199) could allow limited administrative actions and has been linked to ransomware attacks.</description><content:encoded><![CDATA[<p>CVE-2024-27199 is a relative path traversal vulnerability affecting JetBrains TeamCity, a continuous integration and deployment server. This vulnerability allows attackers to perform limited administrative actions by manipulating file paths. JetBrains released a patch for this vulnerability in version 2023.11.4. CISA has added CVE-2024-27199 to its Known Exploited Vulnerabilities catalog, indicating active exploitation in the wild, including its use in ransomware attacks. The vulnerability poses a significant risk to organizations using TeamCity, potentially leading to unauthorized access, data breaches, and system compromise.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker identifies a vulnerable TeamCity server exposed to the internet.</li>
<li>The attacker crafts a malicious HTTP request containing a relative path traversal sequence (e.g., <code>../../</code>) within a URL parameter related to administrative functions.</li>
<li>The TeamCity server processes the crafted request without proper sanitization of the file path.</li>
<li>The relative path traversal allows the attacker to access or modify restricted files or directories outside the intended scope.</li>
<li>The attacker leverages the ability to perform limited admin actions, potentially modifying user permissions or injecting malicious code.</li>
<li>The attacker escalates privileges, gaining full control over the TeamCity server.</li>
<li>The attacker deploys ransomware to connected systems, encrypting data and demanding a ransom for its release.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of CVE-2024-27199 can lead to complete compromise of the TeamCity server and connected build agents. Due to TeamCity&rsquo;s central role in software development and deployment pipelines, this can lead to significant disruption, data loss, and potential supply chain attacks. The vulnerability has been linked to ransomware attacks, causing financial losses, reputational damage, and operational downtime for affected organizations.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply the vendor-supplied patch by upgrading to TeamCity version 2023.11.4 or later to remediate CVE-2024-27199 (<a href="https://www.jetbrains.com/privacy-security/issues-fixed/">https://www.jetbrains.com/privacy-security/issues-fixed/</a>).</li>
<li>Deploy the Sigma rules provided in this brief to detect exploitation attempts against TeamCity servers.</li>
<li>Follow CISA&rsquo;s BOD 22-01 guidance for cloud services to ensure proper security configurations and monitoring are in place.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">threat</category><category>cve-2024-27199</category><category>path-traversal</category><category>ransomware</category><category>jetbrains</category></item></channel></rss>