tbhm:02_discovery
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| tbhm:02_discovery [2026/05/14 09:59] – integrate zseano methodology drew | tbhm:02_discovery [2026/05/14 10:11] (current) – merge bbc ch5 recon techniques drew | ||
|---|---|---|---|
| Line 65: | Line 65: | ||
| * [[zseano: | * [[zseano: | ||
| + | |||
| + | |||
| + | ====== BBC Ch 5: Recon -- Expanded Techniques ====== | ||
| + | |||
| + | //Merged from Bug Bounty Bootcamp Ch 5 by Vickie Li// | ||
| + | |||
| + | ===== Manually Walking the Application ===== | ||
| + | |||
| + | Before any tools, manually browse every feature: | ||
| + | * Click every link, use every function (payments, uploads, events, admin) | ||
| + | * Create accounts at every privilege level | ||
| + | * Note all data entry points -- these are your attack surface | ||
| + | |||
| + | ===== Google Dorking ===== | ||
| + | |||
| + | | Operator | Example | Use | | ||
| + | |---|---|---| | ||
| + | | `site:` | `site: | ||
| + | | `inurl:` | `inurl: | ||
| + | | `intitle:` | `intitle:" | ||
| + | | `filetype:` | `filetype: | ||
| + | | `-` | `"how to hack" -php` | Exclude term | | ||
| + | |||
| + | < | ||
| + | site: | ||
| + | site: | ||
| + | site: | ||
| + | site: | ||
| + | </ | ||
| + | |||
| + | Check the **Google Hacking Database (GHDB)** at exploit-db.com/ | ||
| + | |||
| + | ===== WHOIS, IPs, and ASNs ===== | ||
| + | |||
| + | < | ||
| + | whois facebook.com | ||
| + | nslookup facebook.com | ||
| + | whois 157.240.2.35 | ||
| + | whois -h whois.cymru.com 157.240.2.35 | ||
| + | </ | ||
| + | |||
| + | If the org has a dedicated ASN (own IP block), all IPs in the range belong to them. | ||
| + | |||
| + | **Reverse WHOIS:** search ViewDNS.info by org name/email to find all domains owned by the same entity. | ||
| + | |||
| + | ===== Certificate Parsing ===== | ||
| + | |||
| + | < | ||
| + | curl " | ||
| + | </ | ||
| + | |||
| + | Returns all hostnames in the cert's Subject Alternative Name field -- reveals subdomains across all services. | ||
| + | |||
| + | ===== Subdomain Enumeration ===== | ||
| + | |||
| + | < | ||
| + | sublist3r -d example.com | ||
| + | gobuster dns -d example.com -w / | ||
| + | amass enum -d example.com | ||
| + | sort -u wordlist1.txt wordlist2.txt > combined.txt | ||
| + | </ | ||
| + | |||
| + | Pattern-based: | ||
| + | |||
| + | ===== Service and Port Enumeration ===== | ||
| + | |||
| + | < | ||
| + | nmap example.com -sV # open ports + version detection | ||
| + | </ | ||
| + | |||
| + | Passive alternatives: | ||
| + | |||
| + | Non-standard ports (8080, 8443, 3000, 8888) often host admin panels, dev services, or debug interfaces. | ||
| + | |||
| + | ===== Directory Brute-Forcing ===== | ||
| + | |||
| + | < | ||
| + | ./ | ||
| + | gobuster dir -u https:// | ||
| + | </ | ||
| + | |||
| + | * 200: accessible -- check the content | ||
| + | * 403: exists but protected -- attempt bypass (HTTP method, path normalization, | ||
| + | * 404: doesn' | ||
| + | |||
| + | Screenshot all found pages with **EyeWitness** for fast visual triage. | ||
| + | |||
| + | ===== Spidering ===== | ||
| + | |||
| + | OWASP ZAP: Tools > Spider. Feed a starting URL; ZAP recursively visits all linked pages and builds a site map. Good for finding hidden endpoints not linked from the main nav. | ||
| + | |||
| + | ===== S3 Buckets ===== | ||
| + | |||
| + | < | ||
| + | aws s3 ls s3:// | ||
| + | aws s3 cp s3:// | ||
| + | |||
| + | # Write test (clean up after): | ||
| + | aws s3 cp testfile s3:// | ||
| + | aws s3 rm s3:// | ||
| + | </ | ||
| + | |||
| + | Tools: **lazys3**, **GrayhatWarfare** (buckets.grayhatwarfare.com), | ||
| + | |||
| + | Exposed buckets can contain credentials, | ||
| + | |||
| + | ===== GitHub Recon ===== | ||
| + | |||
| + | < | ||
| + | # Search code for secrets | ||
| + | # GitHub code search: org: | ||
| + | # or | ||
| + | trufflehog git https:// | ||
| + | gitrob analyze COMPANY_NAME | ||
| + | </ | ||
| + | |||
| + | Look at: | ||
| + | * Issues and Commits sections for unresolved bugs and security patches | ||
| + | * Config files for credentials, | ||
| + | * Outdated dependencies -- cross-reference with CVE database | ||
| + | * Blame and History for recently removed secrets | ||
| + | |||
| + | Validate credentials: | ||
| + | |||
| + | ===== OSINT ===== | ||
| + | |||
| + | * **Job listings** -- reveal tech stack; " | ||
| + | * **LinkedIn** -- employee skills = company tech; engineers' | ||
| + | * **Pastebin** -- search the org name; engineers sometimes paste source code or server logs | ||
| + | * **SlideShare** -- conference slides often reveal internal architecture | ||
| + | * **Wayback Machine** + **waybackurls** -- extract all archived URLs; find old endpoints and forgotten subdomains | ||
| + | |||
| + | ===== Tech Stack Fingerprinting ===== | ||
| + | |||
| + | < | ||
| + | curl -I https:// | ||
| + | # Server: Apache/ | ||
| + | # X-Powered-By: | ||
| + | # X-Generator: | ||
| + | # Set-Cookie: PHPSESSID=... | ||
| + | # Set-Cookie: JSESSIONID=... | ||
| + | </ | ||
| + | |||
| + | * View source: search for " | ||
| + | * File extensions in URLs: `.php`, `.asp`, `.cfm`, `.jsp` | ||
| + | * Directories: | ||
| + | * Browser extension: **Wappalyzer** | Website: **BuiltWith.com** | **StackShare.io** | ||
| + | * **Retire.js** for outdated JavaScript libraries | ||
| + | |||
| + | Once you have the version, check CVE database (cve.mitre.org) for public exploits. | ||
| + | |||
| + | ===== Recon Bash Script ===== | ||
| + | |||
| + | <code bash> | ||
| + | #!/bin/bash | ||
| + | # ./recon.sh -m [nmap-only|dirsearch-only|crt-only] domain1 domain2 | ||
| + | |||
| + | PATH_TO_DIRSEARCH="/ | ||
| + | |||
| + | nmap_scan() | ||
| + | dirsearch_scan() { $PATH_TO_DIRSEARCH/ | ||
| + | crt_scan() | ||
| + | |||
| + | while getopts " | ||
| + | case $OPTION in | ||
| + | m) MODE=$OPTARG ;; | ||
| + | esac | ||
| + | done | ||
| + | |||
| + | for i in " | ||
| + | DOMAIN=$i | ||
| + | DIRECTORY=${DOMAIN}_recon | ||
| + | mkdir -p $DIRECTORY | ||
| + | |||
| + | case $MODE in | ||
| + | nmap-only) | ||
| + | dirsearch-only) dirsearch_scan ;; | ||
| + | crt-only) | ||
| + | *) nmap_scan; dirsearch_scan; | ||
| + | esac | ||
| + | |||
| + | TODAY=$(date) | ||
| + | echo "Scan: $DOMAIN -- $TODAY" | ||
| + | [ -f $DIRECTORY/ | ||
| + | [ -f $DIRECTORY/ | ||
| + | [ -f $DIRECTORY/ | ||
| + | done | ||
| + | </ | ||
tbhm/02_discovery.txt · Last modified: by drew
