(safedep.io) Megalodon Campaign: Large-Scale GitHub Repository Backdooring via Malicious CI Workflows
New large-scale supply chain attack, *Megalodon*, backdoored 5,561 GitHub repos via malicious CI workflows. Attackers injected 5,718 commits with base64-encoded bash payloads exfiltrating CI secrets, cloud creds (AWS/GCP/Azure), SSH keys, and OIDC tokens to C2 (216.126.225.129:8443).
In brief - A sophisticated campaign compromised GitHub repos using forged identities and CI workflows, leading to widespread secret exfiltration and npm package poisoning. Two payload variants enabled both mass-scale and targeted attacks, with elevated permissions facilitating cloud identity theft.
Technically - Attackers leveraged GitHub Actions workflows with two variants: *SysDiag* (automatic trigger on push/pull_request_target) and *Optimize-Build* (dormant, workflow_dispatch-triggered). Payloads used base64-encoded bash scripts to harvest env vars, credential files, AWS CLI/gcloud/IMDS outputs, and 30+ secret types via regex. Anti-forensic measures included error suppression, random sleeps, and cleanup traps. Elevated permissions (id-token: write, actions: read) enabled OIDC token theft and cloud impersonation.
Source: https://safedep.io/megalodon-mass-github-repo-backdooring-ci-workflows
#Cybersecurity #ThreatIntel