如何通过自动化工具发现10+SQL注入和30+XSS漏洞
如何通过自动化工具发现10+SQL注入和30+XSS漏洞
大家好,我是Mahmoud Attia(又名0xelkot),本文将分享如何自动化渗透测试流程并发现更多漏洞。
传统漏洞挖掘的困境
大多数安全研究人员都在重复相同的流程:
- 收集子域名
- 筛选存活主机
- 使用Nuclei扫描
- 处理重复结果
突破性解决方案
通过组合多款工具实现自动化漏洞挖掘流水线:
1. 子域名收集
使用以下工具组合进行子域名枚举:
subfinder -d $1 -silent | anew /root/$1/subs.txt
assetfinder -subs-only $1 | anew /root/$1/subs.txt
amass enum -passive -d $1 | anew /root/$1/subs.txt
python sublist3r.py -d $1| anew /root/$1/subs.txt
github-subdomains -t <github token> -d $1 | anew /root/$1/subs.txt
2. 存活检测
cat /root/$1/subs.txt | naabu -p — -silent | anew open-ports.txt
cat open-ports.txt | httpx -silent | anew alive.txt
3. 漏洞扫描
3.1 CVE和配置错误检测
使用Cent工具整合GitHub上所有Nuclei模板:
cat alive.txt | nuclei -t /path/to/cent/ -es info | anew nuclei-results.txt
3.2 通用漏洞检测
使用Xray进行深度爬取和漏洞检测:
for i in $(cat /root/$1/alive.txt); do xray_linux_amd64 ws — basic-crawler $i — plugins xss,sqldet,xxe,ssrf,cmd-injection,path-traversal — ho $(date +”%T”).html ; done
成果展示
通过该自动化流程成功发现:
- 10+ SQL注入漏洞
- 30+ XSS漏洞
完整脚本已开源在GitHub,欢迎通过Twitter @0xElkot交流探讨。祝各位黑客愉快!:red_heart:
更多精彩内容 请关注我的个人公众号 公众号(办公AI智能小助手)
公众号二维码