Gheist Campaign Exploits GitHub Actions for Secret Exfiltration
Score: 9/10

Gheist Campaign Exploits GitHub Actions for Secret Exfiltration

The Gheist campaign utilizes stolen GitHub tokens to plant malicious workflows that exfiltrate repository secrets via Actions logs, primarily targeting private and enterprise repositories.

Executive Summary

Since September 15, a large-scale automated campaign dubbed "Gheist" has been observed compromising GitHub repositories to steal environment secrets and cloud credentials. The threat actor uses stolen GitHub tokens, likely sourced from infostealer logs and previous supply-chain compromises, to create new branches and push malicious GitHub Action workflows. While GitHub's automated safeguards have largely mitigated the threat in public repositories, private repositories and GitHub Enterprise Server instances remain vulnerable as they often bypass these default approval requirements.

The attack chain involves the creation of a specifically named branch (`ci-sync-[random]`) followed by the commitment of a workflow file designed to print all repository secrets into the build logs. By encoding these secrets in base32, the attackers successfully bypass GitHub's native log masking. After the secrets are printed, the attacker downloads the logs via the GitHub API and deletes the run within seconds to minimize their footprint. There is also evidence of overlap with other malicious activity, including North Korean-linked PolinRider malware and the GhostAction campaign.

This campaign represents a significant risk to organizations using GitHub for CI/CD, particularly those relying on OIDC for cloud authentication or utilizing self-hosted runners. Successful exploitation allows for the theft of production credentials, AWS roles, and Kubernetes service account tokens, potentially leading to widespread downstream cloud environment compromises.

Key Details

Threat Name

Gheist

Affects

—

Adversary

—

MITRE Techniques

—

Malware/Tools

PolinRider

Report Score

9out of 10
Quality Score
Excellent
IOC Quality9
TTP Details9
Detection Guidance7
Enterprise Relevance10
Clarity & Structure10
Technical Depth7

Sources