<?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>Bitbucket — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/bitbucket/</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>Fri, 01 Nov 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/bitbucket/feed.xml" rel="self" type="application/rss+xml"/><item><title>Bitbucket Global SSH Settings Changed</title><link>https://feed.craftedsignal.io/briefs/2024-11-bitbucket-ssh-change/</link><pubDate>Fri, 01 Nov 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-11-bitbucket-ssh-change/</guid><description>An attacker modifies Bitbucket global SSH settings to potentially enable unauthorized access and lateral movement.</description><content:encoded><![CDATA[<p>This brief focuses on the detection of unauthorized changes to Bitbucket&rsquo;s global SSH settings. While the specific actor remains unknown, the modification of these settings is a significant security concern. The activity is detected via Bitbucket audit logs. Modification of global SSH settings can allow attackers to gain unauthorized access to repositories, potentially leading to code compromise, data breaches, or further lateral movement within the network. This activity is particularly important for organizations relying on Bitbucket for source code management and secure development workflows. The audit logs are the primary source of information, specifically focusing on events categorized as &lsquo;Global administration&rsquo; with the action &lsquo;SSH settings changed&rsquo;.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker gains initial access to a Bitbucket account with administrative privileges, possibly through credential compromise or exploiting a vulnerability.</li>
<li>The attacker authenticates to the Bitbucket web interface.</li>
<li>The attacker navigates to the global SSH settings configuration page within the Bitbucket administration panel.</li>
<li>The attacker modifies global SSH settings, such as adding a new public key or changing authentication requirements.</li>
<li>Bitbucket logs the &lsquo;SSH settings changed&rsquo; event in the audit logs under the &lsquo;Global administration&rsquo; category.</li>
<li>The attacker leverages the modified SSH settings to clone repositories or push malicious code.</li>
<li>The attacker uses compromised code or data to move laterally within the organization&rsquo;s network, targeting other systems and resources.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful modification of Bitbucket global SSH settings can allow unauthorized access to all repositories within the Bitbucket instance. This can lead to code theft, injection of malicious code, and data breaches. The impact may extend beyond the Bitbucket environment if the compromised code is deployed to production systems or used in other development processes. Organizations using Bitbucket for critical projects are at higher risk.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the provided Sigma rule to your SIEM to detect unauthorized changes to Bitbucket global SSH settings in the audit logs.</li>
<li>Investigate any detected instances of &ldquo;SSH settings changed&rdquo; in the Bitbucket audit logs to determine the legitimacy of the changes.</li>
<li>Enforce multi-factor authentication (MFA) for all Bitbucket accounts, especially those with administrative privileges, to mitigate credential compromise as an initial access vector.</li>
<li>Review Bitbucket&rsquo;s audit log configuration to ensure the &ldquo;Advance&rdquo; log level is enabled to capture the necessary audit events.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>lateral-movement</category><category>defense-impairment</category><category>bitbucket</category></item><item><title>Bitbucket Audit Log Configuration Modified</title><link>https://feed.craftedsignal.io/briefs/2024-10-bitbucket-audit-config-mod/</link><pubDate>Sat, 26 Oct 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-10-bitbucket-audit-config-mod/</guid><description>An attacker may modify the Bitbucket audit log configuration to impair security monitoring and evade detection.</description><content:encoded><![CDATA[<p>Attackers may target Bitbucket audit log configurations to reduce or eliminate logging, thereby hindering incident response and forensic investigations. Modifying audit settings is a defense evasion technique that allows malicious actors to operate with less visibility. This activity typically occurs post-compromise. This brief focuses on detecting such modifications. Visibility of audit events requires at least &ldquo;Basic&rdquo; log level configuration.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains unauthorized access to a Bitbucket instance, potentially through compromised credentials or exploiting a vulnerability.</li>
<li>The attacker authenticates to the Bitbucket web interface or uses the Bitbucket API.</li>
<li>The attacker navigates to the audit log configuration settings within the Bitbucket administration panel.</li>
<li>The attacker modifies the audit log settings, such as disabling logging for specific event categories or reducing the log retention period.</li>
<li>The Bitbucket server processes the configuration change request.</li>
<li>Audit events related to the configuration change are logged (if auditing is still enabled for such events).</li>
<li>The attacker performs malicious activities, such as creating unauthorized repositories or exfiltrating source code, with reduced risk of detection.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful modification of the Bitbucket audit log configuration allows attackers to operate with significantly reduced visibility. This can lead to delayed detection of breaches, prolonged dwell time, and increased data exfiltration. Without proper audit logging, organizations will struggle to identify the scope and impact of a compromise.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the &ldquo;Bitbucket Audit Log Configuration Updated&rdquo; Sigma rule to your SIEM to detect changes to audit log configurations (logsource: bitbucket, service: audit).</li>
<li>Ensure Bitbucket audit logging is enabled at the &ldquo;Basic&rdquo; level or higher, as lower levels may not capture configuration changes (logsource: bitbucket, service: audit).</li>
<li>Investigate any detected instances of audit log configuration changes to determine if they are authorized (Sigma rule: &ldquo;Bitbucket Audit Log Configuration Updated&rdquo;).</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>attack.defense-impairment</category><category>attack.t1562.004</category><category>bitbucket</category></item><item><title>Bitbucket Repository Exempted from Secret Scanning</title><link>https://feed.craftedsignal.io/briefs/2024-04-bitbucket-secret-scanning-exempt/</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-bitbucket-secret-scanning-exempt/</guid><description>An attacker may attempt to disable or bypass secret scanning on a Bitbucket repository to avoid detection of committed secrets, potentially leading to credential compromise and subsequent unauthorized access.</description><content:encoded><![CDATA[<p>Attackers can weaken an organization&rsquo;s security posture by disabling or bypassing security controls within Bitbucket. This allows sensitive information, such as API keys, passwords, and other credentials, to be committed to the repository without detection. By adding a repository to the secret scanning exemption list, attackers can effectively disable a key preventative measure, making it easier to introduce and maintain compromised credentials within the codebase. This can lead to unauthorized access, data breaches, and other serious security incidents. This technique allows attackers to impair defenses, avoiding detection of secrets being committed to the repository.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains unauthorized access to a Bitbucket account with repository administration privileges.</li>
<li>The attacker navigates to the repository settings within Bitbucket.</li>
<li>The attacker accesses the secret scanning configuration for the repository.</li>
<li>The attacker identifies the option to add the repository to the exemption list for secret scanning.</li>
<li>The attacker adds the repository to the exemption list, effectively disabling secret scanning for that repository.</li>
<li>The attacker commits sensitive information (secrets, credentials) to the now-exempt repository.</li>
<li>The secrets are committed without triggering secret scanning alerts.</li>
<li>The attacker uses the committed secrets to gain unauthorized access to other systems or data.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Compromising secrets within a Bitbucket repository can lead to a variety of negative consequences, including unauthorized access to sensitive data, compromised infrastructure, and data breaches. While the exact number of affected organizations is unknown, the potential impact is significant for any organization using Bitbucket to store code and manage secrets. Successful exploitation allows attackers to move laterally within the network and escalate privileges.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule &ldquo;Bitbucket Secret Scanning Exempt Repository Added&rdquo; to your SIEM to detect when a repository is added to the secret scanning exemption list (logsource: bitbucket).</li>
<li>Investigate any detected instances of repositories being added to the secret scanning exemption list to determine if the change was authorized.</li>
<li>Ensure that appropriate access controls are in place to prevent unauthorized users from modifying repository settings.</li>
<li>Review Bitbucket audit logs regularly to identify suspicious activity related to secret scanning configuration changes (logsource: bitbucket).</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>attack.defense-impairment</category><category>attack.t1685</category><category>bitbucket</category></item><item><title>Bitbucket User Login Failure Detection</title><link>https://feed.craftedsignal.io/briefs/2024-03-bitbucket-login-fail/</link><pubDate>Fri, 08 Mar 2024 15:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-03-bitbucket-login-fail/</guid><description>Detection of Bitbucket user login failures, potentially indicating credential access attempts, initial access attempts, or other malicious activity.</description><content:encoded><![CDATA[<p>This threat brief focuses on detecting user login failures within Bitbucket environments. Monitoring failed login attempts is crucial as it can indicate various malicious activities, including credential stuffing, brute-force attacks, or attempts to gain unauthorized initial access. The audit logs in Bitbucket record details of these authentication failures, providing valuable data for security monitoring. The rule provided detects these events and can be used for correlation with other security events based on the &ldquo;author.name&rdquo; field for enhanced accuracy and context. Requires &ldquo;Advance&rdquo; log level to receive audit events.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li><strong>Initial Access Attempt:</strong> An attacker attempts to gain initial access to a Bitbucket account using a compromised or guessed username.</li>
<li><strong>Credential Guessing:</strong> The attacker attempts to guess the user&rsquo;s password through manual attempts or automated tools.</li>
<li><strong>Authentication Failure:</strong> Bitbucket records a &ldquo;User login failed&rdquo; event due to incorrect credentials. The <code>auditType.category</code> is Authentication, and <code>auditType.action</code> is User login failed.</li>
<li><strong>Multiple Failed Attempts:</strong> The attacker repeats the login attempts with different password variations or using a list of compromised credentials.</li>
<li><strong>Account Lockout (Optional):</strong> Depending on Bitbucket&rsquo;s configuration, repeated failed login attempts may trigger an account lockout.</li>
<li><strong>Successful Login (Potential):</strong> After multiple attempts, the attacker may eventually guess the correct password or use a valid compromised credential.</li>
<li><strong>Privilege Escalation/Persistence (If Successful):</strong> If successful, the attacker could escalate privileges, establish persistence, or perform other malicious actions within the Bitbucket environment.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation can lead to unauthorized access to sensitive code repositories, intellectual property theft, and potential supply chain compromise. Attackers could inject malicious code, modify existing code, or exfiltrate sensitive data. Detecting these failed login attempts early can prevent significant damage. Although the number of victims cannot be determined with this specific detection, a successful attack can have far-reaching impacts.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule &ldquo;Bitbucket User Login Failure&rdquo; to your SIEM to detect suspicious authentication failures (logsource: bitbucket, service: audit). Tune for your environment by correlating on the author.name field.</li>
<li>Investigate the source IP addresses associated with the failed login attempts to identify potential malicious actors.</li>
<li>Implement multi-factor authentication (MFA) to significantly reduce the risk of successful credential-based attacks.</li>
<li>Monitor for unusual activity following any successful login after a series of failures.</li>
<li>Enforce strong password policies to reduce the effectiveness of brute-force attacks.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>bitbucket</category><category>authentication</category><category>brute-force</category><category>credential-access</category><category>initial-access</category></item></channel></rss>