<?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>Branch_protection — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/branch_protection/</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, 02 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/branch_protection/feed.xml" rel="self" type="application/rss+xml"/><item><title>GitHub Enterprise Classic Branch Protection Rule Disabled</title><link>https://feed.craftedsignal.io/briefs/2024-01-github-branch-protection-disabled/</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-github-branch-protection-disabled/</guid><description>Detection of disabled classic branch protection rules in GitHub Enterprise, indicating potential bypass of code review and security controls, leading to unauthorized code changes and supply chain compromise.</description><content:encoded><![CDATA[<p>This brief focuses on the detection of disabled classic branch protection rules within a GitHub Enterprise environment. The detection is based on monitoring GitHub Enterprise audit logs for events related to the removal of branch protections. Attackers may disable these rules to bypass code review processes and introduce malicious code or vulnerabilities directly into protected branches. This action can be part of a larger attack, where adversaries first weaken security controls before injecting malicious content. Identifying and responding to these events is crucial for maintaining the integrity and security of the software supply chain. This analytic is sourced from Splunk&rsquo;s security content and is designed to run on GitHub Enterprise audit logs ingested into Splunk.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains unauthorized access to a GitHub Enterprise account with sufficient privileges.</li>
<li>The attacker navigates to the repository settings within the GitHub Enterprise instance.</li>
<li>The attacker identifies the classic branch protection rules configured for a target branch.</li>
<li>The attacker disables one or more of these branch protection rules, such as code review enforcement or restrictions on force pushes. This generates a <code>protected_branch.destroy</code> event in the audit logs.</li>
<li>The attacker commits and pushes unauthorized or malicious code directly to the protected branch, bypassing established security controls.</li>
<li>The malicious code is merged into the main branch, potentially affecting production systems or downstream consumers of the code.</li>
<li>The attacker may attempt to cover their tracks by deleting audit logs or manipulating other security controls.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The impact of disabled branch protection rules can be significant. Successful exploitation can lead to the introduction of vulnerabilities, malicious code, or backdoors into the software supply chain. This can result in data breaches, system compromise, and reputational damage. The number of affected systems and the extent of the damage depend on the scope and nature of the malicious code injected. The targets are GitHub Enterprise organizations that rely on branch protection rules to maintain code quality and security.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Enable GitHub Enterprise Audit log streaming to a SIEM or log management solution to capture <code>protected_branch.destroy</code> events as described in the GitHub Enterprise documentation.</li>
<li>Deploy the Sigma rule <code>GitHub Enterprise Disable Classic Branch Protection Rule</code> to detect instances where branch protection rules are disabled and tune it for your environment.</li>
<li>Investigate any alerts generated by the Sigma rule, focusing on the <code>actor</code>, <code>repo</code>, and <code>user_agent</code> fields to understand the context of the event.</li>
<li>Implement multi-factor authentication (MFA) for all GitHub Enterprise accounts, especially those with administrative privileges.</li>
<li>Regularly review and audit GitHub Enterprise configurations to ensure that branch protection rules are properly configured and enforced.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>github</category><category>branch_protection</category><category>supply_chain</category></item></channel></rss>