Bitbucket Global SSH Settings Changed
An attacker modifies Bitbucket global SSH settings to potentially enable unauthorized access and lateral movement.
This brief focuses on the detection of unauthorized changes to Bitbucket’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 ‘Global administration’ with the action ‘SSH settings changed’.
Attack Chain
- The attacker gains initial access to a Bitbucket account with administrative privileges, possibly through credential compromise or exploiting a vulnerability.
- The attacker authenticates to the Bitbucket web interface.
- The attacker navigates to the global SSH settings configuration page within the Bitbucket administration panel.
- The attacker modifies global SSH settings, such as adding a new public key or changing authentication requirements.
- Bitbucket logs the ‘SSH settings changed’ event in the audit logs under the ‘Global administration’ category.
- The attacker leverages the modified SSH settings to clone repositories or push malicious code.
- The attacker uses compromised code or data to move laterally within the organization’s network, targeting other systems and resources.
Impact
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.
Recommendation
- Deploy the provided Sigma rule to your SIEM to detect unauthorized changes to Bitbucket global SSH settings in the audit logs.
- Investigate any detected instances of “SSH settings changed” in the Bitbucket audit logs to determine the legitimacy of the changes.
- Enforce multi-factor authentication (MFA) for all Bitbucket accounts, especially those with administrative privileges, to mitigate credential compromise as an initial access vector.
- Review Bitbucket’s audit log configuration to ensure the “Advance” log level is enabled to capture the necessary audit events.
Detection coverage 2
Bitbucket Global SSH Settings Changed
mediumDetects Bitbucket global SSH access configuration changes.
Bitbucket SSH Key Added to Global Settings
mediumDetects when an SSH key is added to Bitbucket global settings.
Detection queries are kept inside the platform. Get full rules →