├── README.md ├── aws-attack.sh ├── bountyRecon.sh ├── config.conf ├── domains.txt ├── jsextractor.sh ├── key_files.list ├── keywords.txt ├── prerequisites.txt ├── providers.json ├── search.sh ├── subdomains.sh ├── takeover.sh └── vulns ├── citrix_vuln.txt └── port_8009.txt /README.md: -------------------------------------------------------------------------------- 1 | ## bountyRecon 2 | 3 | Bounty Recon is a bash script to automate the process of reconnaissance for bug bounties. It is said that, the more you know about your target better are the chances of getting bug. Keeping this in mind, the utility was created for effectively gathering information about the target and covering the maximum scope. 4 | 5 | 6 | This repository is not maintained anymore and is moved to [bountyRecon v2](https://github.com/AdmiralGaust/bountyReconv2). 7 | -------------------------------------------------------------------------------- /aws-attack.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if ! [[ ${1} ]];then 4 | echo -e "\n[!]\tUsage : ./aws-attack.sh S3_Bucket_Name\n" 5 | exit 6 | fi 7 | 8 | echo -e "\n[+] Trying unauthenticated listing\n" 9 | aws s3 ls s3://"${1}" 10 | 11 | #echo -e "\n[+] Trying unauthenticated read\n" 12 | #aws s3 --no-sign-request --recursive cp s3://"${1}"/ ${1} 13 | #aws s3 --no-sign-request --recursive mv s3://"${1}"/ ${1} 14 | 15 | echo -e "\n[+] Trying unauthenticated write\n" 16 | echo "Uploaded by bug_bunny as a PoC for bounty" > test.txt 17 | aws s3 --no-sign-request cp test.txt s3://"${1}"/Just_A_Test.txt 18 | echo "Uploaded by bug_bunny as a PoC for bounty" > test.txt 19 | aws s3 --no-sign-request mv test.txt s3://"${1}"/Just_A_Test.txt 20 | 21 | echo -e "\n[+] Trying authenticated listing\n" 22 | aws s3 --profile myprofile ls s3://"${1}" 23 | 24 | #echo -e "\n[+] Trying authenticated read\n" 25 | #aws s3 --profile myprofile cp s3://"${1}"/ ${1} 26 | #aws s3 --profile myprofile mv s3://"${1}"/ ${1} 27 | 28 | 29 | echo -e "\n[+] Trying authenticated write\n" 30 | echo "Uploaded by bug_bunny as a PoC for bounty" > test.txt 31 | aws s3 --profile myprofile cp test.txt s3://"${1}"/Just_A_Test.txt 32 | echo "Uploaded by bug_bunny as a PoC for bounty" > test.txt 33 | aws s3 --profile myprofile mv test.txt s3://"${1}"/Just_A_Test.txt 34 | -------------------------------------------------------------------------------- /bountyRecon.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ##Script to Automate Bug Bounty Recon 4 | 5 | if ! [[ ${1} && ${2} ]] ;then 6 | echo -e "\n[!] Please pass the required arguments :" 7 | echo -e "\tusage : ./bountyRecon.sh TARGET_NAME [list of domains]\n" 8 | exit 9 | fi 10 | 11 | if ! [[ -f ${2} ]]; then 12 | echo -e "\n[-] File does not exist : ${2}\n" 13 | exit 14 | fi 15 | 16 | 17 | ######Reading Config File 18 | 19 | function getValueFromConfig() { 20 | echo `grep ${1} config.conf | cut -d '=' -f 2` 21 | } 22 | 23 | 24 | 25 | #######Initializing variables 26 | 27 | TARGET_NAME=${1} 28 | domains=${2} 29 | 30 | Recon_Home="$(getValueFromConfig "Recon_Home")/${TARGET_NAME}" 31 | amass_config_path=$(getValueFromConfig "amass_config_path") 32 | 33 | 34 | mkdir -p "${Recon_Home}/logs" 35 | 36 | start_time=`date "+%d%m%y_%H%M%S"` 37 | logfile="${Recon_Home}/logs/${start_time}.log" 38 | 39 | 40 | 41 | ######Subdomain Enumeration######## 42 | 43 | mkdir -p "${Recon_Home}/subdomains" 44 | 45 | echo -e "\n[+] Started Subdomain Enumeration at ${start_time}"| tee -a ${logfile} 46 | 47 | echo $domains | parallel ./subdomains.sh {} "${Recon_Home}/subdomains" 48 | 49 | echo -e "[+] Subdomain Enumeration Finished at `date '+%d%m%y_%H%M%S'`"| tee -a ${logfile} 50 | 51 | cat "${Recon_Home}/subdomains/subfinder.txt" "${Recon_Home}/subdomains/amass.txt" |sed "/^[\.*]/d" |sort -u > "${Recon_Home}/subdomains/subdomains.txt" 52 | 53 | 54 | ##########Screenshot the target with aquatone###### 55 | 56 | mkdir -p "${Recon_Home}/aquatone" 57 | 58 | echo -e "[+] Attempting Screenshot for the target subdomains..." | tee -a ${logfile} 59 | 60 | aquatone_home=$(getValueFromConfig "aquatone_home") 61 | cat "${Recon_Home}/subdomains/subdomains.txt"| ${aquatone_home}/aquatone -out "${Recon_Home}/aquatone" -http-timeout 30000 -scan-timeout 30000 -screenshot-timeout 60000 62 | 63 | echo -e "[+] Screenshot Finished for subdomains" | tee -a ${logfile} 64 | 65 | 66 | #######Extract javascript files and urls 67 | 68 | echo -e "[+] Extracting javascript from html source" | tee -a ${logfile} 69 | 70 | ./jsextractor.sh "${Recon_Home}" 71 | 72 | echo -e "[+] javascript extracted successfully" | tee -a ${logfile} 73 | 74 | 75 | ########Subdomain takeover 76 | 77 | mkdir -p "${Recon_Home}/takeover" 78 | 79 | echo $Recon_Home | parallel ./takeover.sh {} 80 | 81 | #Test put method on all subdomains 82 | 83 | 84 | ########Testing for Alive and Resolvable domains#### 85 | 86 | #echo "[+] Checking for alive domains..\n" | tee -a ${logfile} 87 | #cat "${Recon_Home}/subdomains/subdomains.txt" | httprobe -p http:8080 https:8080 https:8443 http:8000 https:8000 -c 50| tee -a "${Recon_Home}/subdomains/alive.txt" 88 | #echo "[+] Finished Checking Alive domains\n" | tee -a ${logfile} 89 | 90 | #massdns_home=$(getValueFromConfig "massdns_home") 91 | #echo -e "[+] Checking for Resolvable domains.." | tee -a ${logfile} 92 | #${massdns_home}/bin/massdns -r ${massdns_home}/lists/resolvers.txt -o S -w "${Recon_Home}/subdomains/massdns.txt" "${Recon_Home}/subdomains/subdomains.txt" 93 | #echo -e "[+] Finished Checking Resolvable domains" | tee -a ${logfile} 94 | #cat "${Recon_Home}/subdomains/massdns.txt" |cut -d " " -f 1|sed "s/\.$//"|sort -u > "${Recon_Home}/subdomains/resolvable.txt" 95 | 96 | 97 | ###TO do list 98 | 99 | 100 | #Check hidden files and other important files like .git, .DS_Store and swagger-ui.html on all subdomains 101 | #Masscan the target 102 | #Check for cve 2019 19781 exploit - grep "citrix login" in title or "citrix" occurences >3 103 | #pdf ssrf - html rendering to pdf 104 | 105 | #ffuf 106 | #cloud_enum - https://github.com/initstring/cloud_enum -------------------------------------------------------------------------------- /config.conf: -------------------------------------------------------------------------------- 1 | #Specify path where output is stored 2 | Recon_Home=/home/hackguru/Documents/BugBounty/reconData 3 | 4 | #Specify the Amass Home Directory and amass config file location 5 | amass_home=/home/hackguru/Documents/BugBounty/tools/amass/ 6 | amass_config_path=/home/hackguru/Documents/BugBounty/tools/amass/config.ini 7 | 8 | 9 | #Specify the location of massdns cloned directory 10 | massdns_home=/home/hackguru/Documents/BugBounty/tools/massdns 11 | 12 | 13 | #Specify the location of eyewitness cloned directory 14 | aquatone_home=/home/hackguru/Documents/BugBounty/tools/aquatone 15 | -------------------------------------------------------------------------------- /domains.txt: -------------------------------------------------------------------------------- 1 | bitpesa.co 2 | paytm.com 3 | -------------------------------------------------------------------------------- /jsextractor.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | mkdir -p "${1}"/scripts 3 | 4 | 5 | function getValueFromConfig() { 6 | echo `grep ${1} config.conf | cut -d '=' -f 2` 7 | } 8 | 9 | 10 | for x in $(ls "${1}/aquatone/html/") 11 | do 12 | 13 | END_POINTS=$(cat "${1}/aquatone/html/$x" | grep -Eoi "src\s*=\s*[\'\"]?[^>]+>" |grep -Eoi "[\'\"\/].*js"|sed "s/\"//g"| sed "s/\'//g") 14 | for end_point in $END_POINTS 15 | do 16 | URL=$end_point 17 | 18 | len=$(echo $end_point | grep "//" | wc -c) 19 | if [ $len == 0 ] 20 | then 21 | URL=`echo "${x}"|sed "s/__/\:\/\//"|sed "s/_/./g"|sed "s/\.\./~/"|cut -d "~" -f 1` 22 | URL=$URL/$end_point 23 | fi 24 | 25 | file=$(basename $end_point) 26 | mkdir -p "${1}/scriptResponse/$x/" 27 | curl -k -X GET $URL -L > "${1}/scriptResponse/$x/$file" 28 | echo $URL >> "${1}/scripts/$x" 29 | done 30 | done -------------------------------------------------------------------------------- /key_files.list: -------------------------------------------------------------------------------- 1 | .DS_STORE 2 | .git 3 | .gitignore 4 | .git/HEAD 5 | .svn 6 | .idea 7 | .idea/workspace.xml 8 | .swp 9 | .htpasswd 10 | .httpasswd 11 | coredump 12 | .winscp.ini 13 | filezilla.xml 14 | server-status 15 | api-docs 16 | swagger-ui.html 17 | swagger/swagger-ui.html 18 | api/swagger-ui.html 19 | swagger/index.html 20 | 21 | 22 | ##Needs modification 23 | v1.0/swagger-ui.html 24 | v1.1/swagger-ui.html 25 | v1.2/swagger-ui.html 26 | v1.3/swagger-ui.html 27 | 28 | assets/server.js 29 | assets/app.js 30 | -------------------------------------------------------------------------------- /keywords.txt: -------------------------------------------------------------------------------- 1 | sentry 2 | token 3 | xoxp- 4 | access_token 5 | auth 6 | aws_key 7 | Authorization 8 | citrix 9 | api_key -------------------------------------------------------------------------------- /prerequisites.txt: -------------------------------------------------------------------------------- 1 | parallel 2 | subfinder (~/.config/subfinder/config.json) 3 | amass (config.ini) 4 | massdns 5 | aquatone 6 | subjack 7 | subover (subover home should be where providers.json is present) -------------------------------------------------------------------------------- /providers.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name":"github", 4 | "cname":["github.io", "github.map.fastly.net"], 5 | "response":["There isn't a GitHub Pages site here.", "For root URLs (like http://example.com/) you must provide an index.html file"] 6 | }, 7 | { 8 | "name":"heroku", 9 | "cname":["herokudns.com", "herokussl.com", "herokuapp.com"], 10 | "response":["There's nothing here, yet.", "herokucdn.com/error-pages/no-such-app.html", "
The page you are looking for doesn't exist or has been moved.
"] 171 | }, 172 | { 173 | "name":"kajabi", 174 | "cname":["endpoint.mykajabi.com"], 175 | "response":["The page you're looking for doesn't exist."] 196 | }, 197 | { 198 | "name":"aha", 199 | "cname":["ideas.aha.io"], 200 | "response":["There is no portal here ... sending you back to Aha!"] 201 | }, 202 | { 203 | "name":"brightcove", 204 | "cname":["brightcovegallery.com", "gallery.video", "bcvp0rtal.com"], 205 | "response":["
Error Code: 404
"] 206 | }, 207 | { 208 | "name":"bigcartel", 209 | "cname":["bigcartel.com"], 210 | "response":["