github_sso_configuration_modified


Description

Detects when changes are made to a GitHub enterprise or organization's Single Sign-On (SSO) configuration.

Query · yara_l

events:
    $github.metadata.vendor_name = "GITHUB" nocase
    $github.metadata.product_name = "GITHUB"
    (
        // Configuration changes for a GitHub enterprise
        $github.metadata.product_event_type = "business.disable_saml" or
        $github.metadata.product_event_type = "business.update_saml_provider_settings" or
        $github.metadata.product_event_type = "business.disable_oidc" or

        // Configuration changes for a GitHub organization
        $github.metadata.product_event_type = "org_credential_authorization.deauthorize" or
        $github.metadata.product_event_type = "org_credential_authorization.grant" or
        $github.metadata.product_event_type = "org_credential_authorization.revoke" or
        $github.metadata.product_event_type = "org.disable_saml" or
        $github.metadata.product_event_type = "org.update_saml_provider_settings" or
        $github.metadata.product_event_type = "sso_redirect.disable"
    )

  outcome:
    $risk_score = max(85)
    $mitre_attack_tactic = "Defense Evasion"
    $mitre_attack_technique = "Impair Defenses: Disable or Modify Tools"
    $mitre_attack_technique_id = "T1562.001"
    $principal_ip = array_distinct($github.principal.ip)
    $principal_user_userid = array_distinct($github.principal.user.userid)
    $principal_ip_country = array_distinct($github.principal.ip_geo_artifact.location.country_or_region)
    $principal_ip_state = array_distinct($github.principal.ip_geo_artifact.location.state)
    $principal_ip_city = array_distinct($github.principal.location.city)
    $security_result_summary = array_distinct($github.security_result.summary)

  condition:
    $github
Raw source github_sso_configuration_modified · YARA-L
Esc
Published by chronicle/detection-rules ↗, licensed under Apache 2.0 ↗. Reproduced here unmodified.
rule github_sso_configuration_modified {

  meta:
    author = "Google Cloud Security"
    description = "Detects when changes are made to a GitHub enterprise or organization's Single Sign-On (SSO) configuration."
    rule_id = "mr_65a0f413-7f77-4039-a241-383c13e96dc2"
    rule_name = "GitHub SSO Configuration Modified"
    assumption = "Your GitHub enterprise audit log settings are configured to log the source IP address for events. Reference: https://docs.github.com/en/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/displaying-ip-addresses-in-the-audit-log-for-your-organization"
    type = "alert"
    severity = "High"
    priority = "High"
    platform = "GitHub"
    data_source = "github"
    mitre_attack_tactic = "Defense Evasion"
    mitre_attack_technique = "Impair Defenses: Disable or Modify Tools"
    mitre_attack_url = "https://attack.mitre.org/versions/v14/techniques/T1562/001/"
    mitre_attack_version = "v14"
    reference = "https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise"

  events:
    $github.metadata.vendor_name = "GITHUB" nocase
    $github.metadata.product_name = "GITHUB"
    (
        // Configuration changes for a GitHub enterprise
        $github.metadata.product_event_type = "business.disable_saml" or
        $github.metadata.product_event_type = "business.update_saml_provider_settings" or
        $github.metadata.product_event_type = "business.disable_oidc" or

        // Configuration changes for a GitHub organization
        $github.metadata.product_event_type = "org_credential_authorization.deauthorize" or
        $github.metadata.product_event_type = "org_credential_authorization.grant" or
        $github.metadata.product_event_type = "org_credential_authorization.revoke" or
        $github.metadata.product_event_type = "org.disable_saml" or
        $github.metadata.product_event_type = "org.update_saml_provider_settings" or
        $github.metadata.product_event_type = "sso_redirect.disable"
    )

  outcome:
    $risk_score = max(85)
    $mitre_attack_tactic = "Defense Evasion"
    $mitre_attack_technique = "Impair Defenses: Disable or Modify Tools"
    $mitre_attack_technique_id = "T1562.001"
    $principal_ip = array_distinct($github.principal.ip)
    $principal_user_userid = array_distinct($github.principal.user.userid)
    $principal_ip_country = array_distinct($github.principal.ip_geo_artifact.location.country_or_region)
    $principal_ip_state = array_distinct($github.principal.ip_geo_artifact.location.state)
    $principal_ip_city = array_distinct($github.principal.location.city)
    $security_result_summary = array_distinct($github.security_result.summary)

  condition:
    $github
}

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.