Gheist Campaign Uses Stolen GitHub Tokens to Harvest Cloud Secrets

· Original article ↗

Summary

Wiz says the active Gheist campaign used stolen GitHub tokens to add Actions workflows that exposed repository secrets in logs, affecting more than 850 accounts and 13,500 branches, including private repositories and enterprise environments.

Key points

  • Wiz reported more than 13,500 malicious branches across more than 850 compromised GitHub accounts; it tracked the activity from Sept. 15 and said it remained active and evolving as of Oct. 24.
  • Attackers used stolen tokens to create branches named “ci-sync-” followed by six characters and add a “sync-check” GitHub Actions workflow.
  • The workflow attempts to print environment variables and repository secrets into its log; the attackers encode the output with Base32, retrieve the log through the GitHub API, then delete the workflow run seconds later.
  • Wiz said the tokens appeared to come mainly from infostealer malware and credentials exposed in earlier software supply-chain compromises.
  • Wiz observed successful attacks in private repositories and enterprise environments. It also reported private-repository cloning and subsequent use of cloud credentials to enumerate AWS Secrets Manager.
  • Wiz estimated the campaign affected about a dozen companies, while noting it had not seen consistent or automated abuse beyond mass repository cloning and core credential theft.
  • Wiz advised hunting for the named branch and workflow patterns, reviewing audit logs for quickly deleted runs and the “gheist” user agent, rotating exposed secrets, and using short-lived, fine-grained credentials.

Article Details

Attack Vectors
  • Attackers used compromised GitHub tokens to access repositories, clone private repositories, and create branches containing a malicious GitHub Actions workflow.
  • The workflow attempted to print repository secrets and environment variables into its run log; attackers retrieved the log through the GitHub API and deleted the workflow run.
  • The report says cloud credentials obtained from the same organization were used to enumerate AWS Secrets Manager.
Defensive Notes
  • Hunt for branches named "ci-sync-" followed by six characters, especially when the only change is .github/workflows/sync-check.yml with commit message "ci: sync config."
  • Review GitHub audit logs for workflow runs on "ci-sync-*" branches that were deleted within a minute of completion, and for activity using the user agent "gheist."
  • Rotate exposed secrets and treat compromised self-hosted runners as potential infrastructure breaches.
  • Replace long-lived personal access tokens with GitHub Apps or short-lived fine-grained tokens, and require reviewers for environments holding production secrets.

MITRE ATT&CK

People

Vendors

Products

Related Articles