Stolen Tokens Used to Probe 61,764 GitHub Repositories

Attackers used stolen access to test 61,764 GitHub repositories and ran credential-stealing malware in more than 1,800, security firms reported.

The campaign, which Aikido Security calls wfx-loot, began on Nov. 10. Aikido identified about 4,800 compromised accounts linked to pull requests sent to the repositories. The requests tested whether stolen credentials allowed changes to repository files.

The pull requests did not contain malware by themselves, according to StepSecurity. The attackers deployed code in repositories where account permissions and project settings allowed further changes. SafeDep counted malicious commits in 8,093 public repositories, although that figure does not show how many repositories executed the code.

The attackers used valid tokens belonging to developer and bot accounts rather than exploiting a vulnerability in GitHub Actions, StepSecurity reported. They added code to existing or newly created GitHub Actions workflows, shell scripts used by continuous-integration systems and npm installation hooks.

The malware searched for GitHub tokens, repository secrets, cloud credentials and keys for artificial-intelligence services. It also read the memory of GitHub Actions runners and included functions designed to expand access and maintain persistence in Amazon Web Services and Microsoft Azure environments.

The npm method created a risk for developers who installed packages while the malicious changes were present. The attackers generally removed altered files and deleted workflow runs after the activity, making the changes harder to detect.

StepSecurity traced 173 probe pull requests to tokens issued to the Fly.io GitHub app. The firm could not determine how the tokens were obtained and found no evidence that Fly.io’s infrastructure had been breached. A Packagist package and versions of two Go modules were among the affected software releases.

Aikido found similarities between wfx-loot and the GhostAction campaign reported in October. It assessed that the operations probably involved different attackers. The firm advised organizations to treat all accessible secrets as exposed if the malware ran in their repositories.

Security firms advised organizations to revoke compromised tokens, rotate exposed secrets and check AWS, Azure and other cloud environments for unauthorized changes. They also recommended reviewing repository workflows, scripts, package installation hooks and recent commits for unexpected modifications.

Articles by this author