Skip to content

GitHub Pages proofs #37

Closed
Closed
@PatrikHudak

Description

Service name

GitHub Pages

Proof

GitHub uses virtual hosting identical to other cloud services. The site needs to be specified explicitly in domain settings. Step-by-step process:

  1. Go to new repository page
  2. Set Repository name to canonical domain name (i.e., {something}.github.io from CNAME record)
  3. Click Create repository
  4. Push content using git to a newly created repo. GitHub itself provides the steps to achieve it
  5. Switch to Settings tab
  6. In GitHub Pages section choose master branch as source
  7. Click Save
  8. After saving, set Custom domain to source domain name (i.e., the domain name which you want to take over)
  9. Click Save

For screenshots, please refer to https://0xpatrik.com/takeover-proofs/.

To verify:

http -b GET http://{DOMAIN NAME} | grep -F -q "<strong>There isn't a GitHub Pages site here.</strong>" && echo "Subdomain takeover may be possible" || echo "Subdomain takeover is not possible"

(Note: DOMAIN NAME has to be the affected domain, not the github.io page itself. This is due to Host header forwarding which affects the HTTP response)

Documentation

There is only one format of GitHub Pages domains:

  • *.github.io

please note that having CNAME to github.io itself can also lead to subdomain takeover.

Metadata

Assignees

No one assigned

    Labels

    vulnerableSomeone has provided proof in the issue ticket that one can hijack subdomains on this service.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions