Extensive Recon Guide For Bug Hunting
Last updated
Last updated
Reconnaissance is one of the most important aspects of penetration testing. It’s also known as Recon. Recon will help you to increase attack surface area and may allow you to get more vulnerabilities but the ultimate goal is to dig deep in the target.
Subdomain enumeration is the process of finding subdomains for one or more domains.
Tools used ⇒
Oneliners for Subdomain Enumeration ⇒
PORT SCANNING ⇒
SUBDOMAIN OF SUBDOMAIN ENUMERATION ⇒ “This is one of the rare things people search for.” Tools used:
Subbrute: https://github.com/TheRook/subbrute
Altdns: https://github.com/infosec-au/altdns
Usage: ./altdns.py -i subdomains.txt -o data_output -w words.txt -r -s output.txt
These tools are capable of taking screenshots of websites to view offline anytime.
Tools used ⇒
Eyewitness: https://github.com/FortyNorthSecurity/EyeWitness
httpscreenshot: https://github.com/breenmachine/httpscreenshot
More targets lead to more option which ultimately lead to more opportunities.
Crunchbase
bgp.he.net
tools.whoisxmlapi.com
Waybackurls: https://github.com/tomnomnom/waybackurls
web archieve: https://web.archive.org/cdx/search/cdx?url=*.target.com&fl=original&collapse= urlkey
1. After collecting URLs, curl out the responses of the URLs and grep for the following URLs:
drive.google
docs.google
/spreadsheets/d/
/document/d/
2. Using paramspider, gxss to detect Cross-site Scripting (XSS)
Commands:-
3. Using SQLidetector to search for sqli
Tool Link: https://github.com/eslam3kl/SQLiDetector
Shodan: https://www.shodan.io/
Shodan Dorks ⇒
ssl: “target[.]com” 200 http.title: “dashboard” –unauthenticated dashboard org:“target.com” x-jenkins 200 — unauthenticated jenkins server ssl:“target.com” 200 proftpd port:21 — proftpd port:21 org:“target.com” http.html:zabbix — CVE-2022-24255 Main & Admin Portals: Authentication Bypass org:“target.com” http.title:“phpmyadmin” —-php my admin ssl:“target.com” http.title:"BIG-IP —F5 BIG-IP using CVE-2020-5902
Example Writeup:- How I found XSS by searching in Shodan - Writeup
Censys: https://www.censys.io/ Example Writeup:- Let’s fuck waf using Origin IP: My approach on censys By Deepak Dhiman
Ffuf: https://github.com/ffuf/ffuf
Example Writeup:-Ffuf-ing Recon Writeup on FFuf
Tip: Fuzz for “/wp-content/debug.log” || Sometimes they contain SQL error, which can be chained.
Subdomain Name: y0gi.hacklido.com
y0gi.hacklido.com /y0gi.zip - hacklido.zip – admin.zip – backup.zip y0gi.hacklido.com/y0gi/y0gi.zip - hacklido.zip – admin.zip – backup.zip y0gi. hacklido.com/hacklido/y0gi.zip - hacklido.zip – admin.zip – backup.zip y0gi. hacklido.com/admin/y0gi.zip - hacklido.zip – admin.zip – backup.zip
Tool Link: https://github.com/musana/fuzzuli
Trivial Tricks:
Find Sensitive Data in Cloud storage through Google Dork:
site:http://s3.amazonaws.com “target[.]com” site:http://blob.core.windows.net “target[.]com” site:http://googleapis.com “target[.]com” site:http://drive.google.com “target[.]com”
Github Leaks for AWS, Jira, Okta, etc:
Org:“target” pwd/pass/passwd/password “target.atlassian” pwd/pass/passwd/password “target.okta” pwd/pass/passwd/password “Jira.target” pwd/pass/passwd/password
Also search in Google groups, Gitlabs.
Collect all js file “.js”
Filter js file:
Perform Nuclei scan
Collect all endpoints from Js files & Create a wordlist from those.
Craft a POST request with any parameter.
Use that request to fuzz for sensitive directory.
Tools:- JSFScan.sh , Jsminer {Burp Extension} , Trufflehog
Some data are intended, No bug here.
Don’t get angry, You may lose bonds with good program
Your crafting and exploits are gold. Make it high as you can
Money going no where. Don’t message constant to team
Recon = Increase in Attack surface = More vulnerabilities Recon = Finding untouched endpoints = Fewer duplicates Recon = Sharpening your axe before attack
Visual Recon⇒
Command Line⇒
Grep all urls from wayback or gau.
Js Recon Tip:
Sudomy: https://github.com/Screetsec/Sudomy Reconftw: https://github.com/six2dez/reconftw
Verify Data
Reported > Invalid
Yes, They do accept Third Party
Be humble with Program