Maniesh-Neupane/BugBounty-Recon-Methodology

GitHub: Maniesh-Neupane/BugBounty-Recon-Methodology

一份结构化的Bug Bounty侦察方法论文档,按阶段编排了完整的资产发现与漏洞扫描工具链及命令示例。

Stars: 321 | Forks: 77

# Bug Bounty 侦察方法论 Bug Bounty 侦察方法论 ## 🏗 阶段 1:被动情报收集与范围映射 识别组织的全局足迹、网络边界和历史数据。 ### 1.1 ASN 与网络映射 ``` # 获取 ASN 并转换为 IP ranges asnmap -d target.com | dnsx -silent > asn.txt # 对 IP ranges 进行 Whois 查询 whois -h whois.radb.net -- '-i origin AS714' | grep -Eo "([0-9.]+){4}/[0-9]+" | uniq | mapcidr -silent | httpx > cidr_ips.txt # 从 3rd party providers 提取 IP curl -s "https://urlscan.io/api/v1/search/?q=domain:target.com&size=10000" | jq -r '.results[]?.page?.ip//empty' | grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}' | tee urlscan_ips.txt curl -s "https://www.virustotal.com/vtapi/v2/domain/report?domain=target.com&apikey=[key]" | jq -r '..|.ip_address?//empty' | grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}' | tee vt_ips.txt curl -s 'https://subdomainfinder.c99.nl/scans/2025-12-29/target.com' | grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}' | sort -u > c99_ips.txt ``` ### 1.2 被动子域名抓取 ``` subfinder -d target.com -all -recursive -o sub1.txt findomain -t target.com | tee sub2.txt amass enum -passive -d target.com -norecursive -noalts -o sub3.txt knockpy -d target.com --recon --bruteforce subrake -d target.com python sublist3r.py -v -d target.com Subenum -d target.com | tee sub4.txt Chaos -d target.com | tee sub5.txt github-subdomain -d target.com | tee sub6.txt assetfinder --subs-only target.com > sub7.txt echo "target.com" | subdog | tee sub8.txt tldfinder -d target.com | tee sub9.txt bbot -t target.com -f subdomain-enum | tee sub10.txt oneforall --target target.com --brute False run | tee sub11.txt # Certificate & API Scraping curl -s "https://crt.sh/?q=%25.target.com&output=json" | jq -r '.[].name_value' | sed 's/\*\.//g' | sort -u > crtsh_subs.txt curl -s -H "APIKEY: " "https://api.securitytrails.com/v1/domain/target.com/subdomains" | jq -r '.subdomains[] | "\(.).target.com"' > securitytrails.txt ``` ## 🧬 阶段 2:DNS 解析与暴力破解 通过排列组合验证收集到的数据并发现隐藏资产。 ### 2.1 过滤与解析 ``` # 合并并去重所有 subdomain cat sub*.txt crtsh_subs.txt securitytrails.txt | anew allsubs.txt # 使用 Puredns 进行解析 cat allsubs.txt | puredns resolve -r resolvers.txt -w resolved.txt # 二次定向 Subfinder 扫描 subfinder -dL resolved.txt -all -recursive -o subfinder_recursive.txt ``` ### 2.2 暴力破解与排列组合 ``` # Subdomain 暴力破解 puredns bruteforce wordlist.txt target.com -r resolvers.txt -w brute_results.txt # 排列扫描 (AlterX) cat resolved.txt | alterx | dnsx -silent | anew resolved.txt ``` ## 📡 阶段 3:基础设施与端口分析 映射服务并识别配置错误的 Virtual Host。 ### 3.1 端口扫描(Naabu & Nmap) ``` # 全端口扫描(为提高速度排除标准 web 端口) naabu -list resolved.txt -p - -exclude-ports 80,443 -o allports.txt smap -iL targets.txt # 对已发现的端口进行服务探测 nmap -sV -sC -iL allports.txt -oN nmap_details.txt # 定向 Naabu/Nmap 自动化组合 naabu -list resolved.txt -c 50 -nmap-cli 'nmap -sV -sC' -o naabu_full.txt naabu -list subs.txt -top-ports 1000 -exclude-ports 80,443,21,22,25 -o top1000ports.txt naabu -list subs.txt -p - -exclude-ports 80,443,21,22,25 -o allports.txt rustscan -b 500 -a target.com --top -- -sC -sV -Pn rustscan -b 500 -a 10.1.49.196 -- -sC -sV -Pn ``` ### 3.2 VHost 与子域名 Fuzzing ``` # 使用 FFUF 进行 VHost 发现 ffuf -H 'Host: FUZZ.target.com' -u 'http://target.com' -w subdomains.txt -fs [size] # API Fuzzing ffuf -u https://FUZZ.api.target.com -w wordlist.txt ffuf -u https://api.FUZZ.target.com -w wordlist.txt ``` ## 🔍 阶段 4:Web 探测与漏洞扫描 对 Web 应用程序进行详细分析。 ### 4.1 Web 发现(HTTPX) ``` cat subs.txt | httpx --random-agent --status-code --title --server -td -cl | tee liv.txt httpx -list allsubs.txt -status-code -content-length -content-type -line-count -title -body-preview -server -tech-detect -probe-all-ips -include-response -follow-host-redirects -random-agent -o httpx_full.txt ``` ### 4.2 Nuclei 与 Takeover 检测 ``` # CVE、Misconfig 和信息泄露 cat live_web.txt | nuclei -t cves/ -t exposures/ -t misconfiguration/ -severity critical,high,medium -o nuclei_results.txt nuclei -l live_subs.txt -ft -headless -tags xss,ssrf,rce # Subdomain Takeover 检查 subzy run --targets resolved.txt subzy run --targets subs.txt --concurrency 100 --hide_fails --verify_ssl ``` ## 📜 阶段 5:深度内容与 JavaScript 分析 从 JavaScript 和归档文件中挖掘隐藏的秘密和敏感文件。 ### 5.1 URL 与文件提取 ``` waymore -i target.com -mode U -oU urls.txt katana -u target.com -kf robotstxt,sitemapxml -o katana_urls.txt katana -u https://target.com/ -jc -js-crawl -kf all # 提取敏感文件(文档、DB、备份) cat urls.txt | grep -E "\.xls|\.xml|\.xlsx|\.json|\.pdf|\.sql|\.doc|\.zip|\.bak|\.config|\.yaml" | tee sensitive_files.txt ``` ### 5.2 JavaScript 深入分析 ``` # 发现 JS 文件 cat urls.txt | grep "\.js$" | httpx -mc 200 > js_files.txt cat resolved.txt | getJS --complete | anew js_files.txt # 从 JS 文件中提取 Endpoint cat js_files.txt | while read url; do curl -s $url | grep -aoP "(?<=(\"|\'|\`))\/[a-zA-Z0-9_?&=\/\-\#\.]*(?=(\"|\'|\`))"; done | sort -u > endpoints.txt ``` ## ⚡ 阶段 6:输入与参数 Fuzzing 针对注入和路径遍历的自动化漏洞测试。 ### 6.1 参数发现 ``` arjun -i live_web.txt -m GET -oT params.txt ``` ### 6.2 漏洞自动化(XSS/LFI) ``` # LFI 测试 cat live_web.txt | gf lfi | qsreplace "FUZZ" | while read url; do ffuf -u $url -w lfi_payloads.txt -mr "root:"; done # XSS 测试 cat urls.txt | gf xss | uro | Gxss -p Rxss | dalfox pipe ``` ### 6.3 内容发现(目录) ``` ffuf -u https://target.com/FUZZ -w fuzz_wordlist.txt -mc 200,302 ffuf -u https://target.com/FUZZ.php -w words.txt -mc 200,302 ffuf -u https://target.com/FUZZ.zip -w words.txt -mc 200,302 ``` ## 📊 可视化资源与清单 ### 1. 方法论概述 ![侦察工作流](https://static.pigsec.cn/wp-content/uploads/repos/cas/35/35e5e21ea839afc7a312144ebbef4089155f4e7e7fa2e516e82cb2ad79e8259d.jpg) ### 2. 高级攻击面映射 ![高级侦察地图](https://static.pigsec.cn/wp-content/uploads/repos/cas/a1/a1c69a47436971d1832336e9a53b9a4d604ab7f8164aa414d336757c6388df23.jpg) ### 3. 逐步检查清单

## 了解更多请访问 "https://www.pentest-book.com/others/web-checklist"

祝 Hunting 愉快!🚀

标签:Cutter, GitHub, 子域名枚举, 实时处理, 密码管理, 应用安全, 系统安全, 网络安全, 资产测绘, 运行时操纵, 隐私保护