Fixing Typos And Breaching Microsoft’s Perimeter
Microsoft used a domain-joined self-hosted GitHub Actions runner on a public repository, allowing a contributor to execute code on it and gain a foothold in a Microsoft Active Directory domain.
Published on johnstawinski.com
Progressing through certifications, developing as a red teamer, breaking into Bug Bounty — many steps along my security journey have been difficult.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the organisation attached a non-ephemeral, domain-joined workstation as a self-hosted runner to a public repository without restricting which workflows or contributors could use it.
Impact
An attacker could execute code on a domain-joined Microsoft server, though the text does not confirm further compromise or lateral movement.
What the attacker needed
Public repository with self-hosted runner; ability to trigger a workflow on the runner
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A self-hosted runner is a computer a company connects to its GitHub repository to run automated tasks. If that computer is on the internal network and outside contributors can make it run their code, they can run commands inside the company. Here, Microsoft used a domain-joined runner on a public repository, and a contributor could execute code on it.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.