Phantom of the Pipeline Abusing Self Hosted CI
Where
Talks
ShmooCon 2023
Duration
50 min
Shows how attackers turn stolen GitHub tokens and self-hosted runners into footholds on internal networks.
Summary
The talk covers abusing self-hosted runners in GitHub Actions. Organizations use them to cut costs, run custom hardware and reach internal networks, but they are not ephemeral by default, so jobs run directly on the host. The attack starts with a leaked personal access token found in artifacts, logs or secret scanning, then uses API queries to reveal the token's scopes and reachable organizations.
Much of this activity leaves little trace. Most read API calls and git clones produce no audit log entry unless an organization pays for the top enterprise tier, and IP logging must be enabled manually. Repo and workflow scopes let an attacker push a malicious workflow, while repo scope alone allows editing scripts that existing workflows call. Persistence can come from a detached Docker container or background process that survives job cleanup. Public repositories add a hurdle because pull request runs need maintainer approval, which often gets skipped for first-time contributors after a small documentation change. The team released Gato, an open-source toolkit for search, enumeration and attack.
A live demo ran the toolkit against a demo organization, listing the token's permissions and vulnerable repositories, then executing a command on a runner and optionally deleting the run log. The takeaway is that one stolen token with the right scopes can give an attacker a foothold on internal infrastructure with no obvious audit trail. Defenders should audit token scopes, isolate runners, treat self-hosted runners on public repositories as risky, and log activity on the runner itself.
Related talks
Ground Floor·54 min
George Polivka · arv
Walks through building a Terraform-deployed Azure C2 platform with overlay VPN, redirectors, and reporting services.
Adversary Village·23 min
Nikos Vourdas
Shows how disabled and deleted Active Directory objects keep dangerous permissions and recoverable data, with open-source tools to find and abuse them.
Main Stage·44 min
Jon Gorenflo
Shows how a Markov password generator that models GPT-2 subword tokens instead of characters outguesses OMEN and Hashcat masks on leaked and enterprise-style passwords.


