Detect Two-Factor Authentication Being Disabled in GitHub Audit Logs
Published · Updated
MITRE ATT&CK: T1556.006
Sigma Rule
title: GitHub Two-Factor Authentication Disabled
id: 9e2f7b58-4c31-42a6-b7d9-05e8a1c36f4d
status: experimental
description: >
Detects two-factor authentication being removed in GitHub: the organization's
two-factor requirement disabled (org.disable_two_factor_requirement, in the
organization audit log) or two-factor authentication disabled for a user
account (two_factor_authentication.disabled, in enterprise audit logs and the
user's security log). Either makes a stolen password enough to sign in.
references:
- https://docs.github.com/en/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/audit-log-events-for-your-organization
- https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/security-log-events
- https://attack.mitre.org/techniques/T1556/006/
author: LogTriage
date: 2026/08/04
modified: 2026/10/20
logsource:
product: github
service: audit
detection:
two_factor_removed:
action:
- 'org.disable_two_factor_requirement'
- 'two_factor_authentication.disabled'
condition: two_factor_removed
falsepositives:
- Planned organization two-factor policy change (correlate with a ticket)
- A user moving two-factor authentication to a new device
level: high
tags:
- attack.credential_access
- attack.defense_evasion
- attack.persistence
- attack.t1556.006
1 · Each event is compared with one selection. Every field in a selection must match; listed values are alternatives.
- action is any of
org.disable_two_factor_requirementtwo_factor_authentication.disabled
2 · An event counts when
two_factor_removed
github_audit_attack.json, silent on github_audit_normal.json — both in the public sample dataset ↗︎ What this rule detects
A GitHub organization takeover follows a consistent pattern: keep access, get the source out and make recovery hard. This rule targets the step that makes access stick, removing two-factor authentication:
org.disable_two_factor_requirement: the organization no longer requires two-factor authentication from its members.two_factor_authentication.disabled: two-factor authentication was disabled for a user account.
After either, a password alone opens the account.
Detection logic
A single selection on the action field with both values; one occurrence fires the rule. The
other takeover steps are deliberately not part of this rule. Adding a member (org.add_member)
and creating a webhook (hook.create) are routine one by one and only suspicious in combination,
which needs a correlation rule. Destroying a repository (repo.destroy) is a separate,
destructive behavior with its own response.
Validated against a real sample
Validated against github_audit_attack.json (shipped with LogTriage), four actions by the actor
attacker-bot within three minutes:
repo.destroyofcorp-org/critical-infrafrom185.220.101.42two_factor_authentication.disabledfrom the same addressorg.add_memberaddingnew-backdoor-account, now from45.142.212.100hook.createoncorp-org/main-appfrom the same second address
The rule fires on the two-factor event. The other three are the context that turns it into an
incident: correlate by actor and you see one account removing its own two-factor
authentication, adding a backdoor member and planting a webhook. It stays silent on the
matching benign log (repo.create, team.add_repository and protected_branch.create).
False positives
Two-factor policy changes during a migration should be planned, ticketed and performed by a known owner. A user who disables two-factor authentication to move it to a new device turns it back on within minutes; correlate with the matching enable event before escalating.
Frequently Asked Questions
- Which two actions does the rule use, and where do they appear?
- `org.disable_two_factor_requirement` is in the organization audit log; GitHub describes it as "A two-factor authentication requirement was disabled for the organization." `two_factor_authentication.disabled` is logged when two-factor authentication is disabled for a user account; it appears in enterprise audit logs and in the user's own security log. The first weakens every account in the organization at once; the second removes the protection from one account, often the one the attacker already controls.
- Why is disabling two-factor authentication worth an alert on its own?
- Because it has almost no routine use and a clear attacker motive. With two-factor authentication gone, a stolen or reset password is all anyone needs, and access survives the next credential reset. Legitimate changes to the organization policy are planned and announced, and a user moving to a new device re-enables it within minutes.
- The sample also adds a member, plants a webhook and destroys a repository. Why doesn't this rule fire on those?
- Because each needs a different design. Adding members and creating webhooks are routine on their own and only become suspicious together, from the same actor, in a short window, which a single-event Sigma rule cannot express; it needs a Sigma correlation rule. Repository deletion (`repo.destroy`) is destructive rather than a takeover step, with its own response, so it deserves its own rule.
- How do I get these events into a SIEM?
- Organization owners can stream the audit log from GitHub Enterprise Cloud to a SIEM, or poll the audit log REST API. Make sure the stream includes the organization's own events and, for enterprise accounts, the enterprise audit log, since that is where user-level two-factor changes appear.
Related Resources
Reference
- GitHub Audit Log Fields: field reference → every field explained, with real sample records
- Paste one record and see what each field means → free, runs in your browser
See this detection run on a real report
Try the live demo with a pre-loaded malicious log set — no signup required — or upload your own log file and get a full AI-reviewed threat report in minutes.