继续整理最近新接触的工具,Web扫描器专场,xray和vulmap一直没系统整理过
三种模式
直接扫单个站
./xray webscan --url xxx.com
代理模式
./xray webscan --url xxx.com --listen 127.0.0.1:7777
值得注意的是官方提供的例子中这个awvs的靶场似乎已经被墙,所以需要在config.yml
配置中添加proxy
,配置其上游代理然后就能正常访问
结合bp使用
因为更多的使用场景在于一边浏览浏览器xray一边分析,所以结合bp来进行很有必要
启动命令代理模式一样,需要在bp里面加一个上游代理
bp中上游代理和socks代理不能混用
所以用上了bp之后加上之前xray的上游代理形成了一条代理链
socks5://127.0.0.1:1080(我的v2ray代理)
>http://127.0.0.1:7777(我的xray代理)
>http://127.0.0.1:10086(我的bp代理)
不需要xray本身代理的时候可以把第一条去掉,而配置文件中还有对请求本身的代理配置,不在赘述,需要用时翻文档就行
爬虫模式
并且输出html格式的报告
1
| ./xray_linux_amd64 webscan --basic-crawler http://testphp.vulnweb.com/ --html-output xray-crawler-testphp.html
|
如果需要登录网站需要手动设置cookie,在配置文件http
的Hearders
中
1 2 3
| http: headers: Cookie:key=value
|
服务扫描模式
支持两种方式
快速检测单个目标
./xray servicescan --target 127.0.0.1:8009
批量检查的 1.file 中的目标, 一行一个目标,带端口
./xray servicescan --target-file 1.file
1 2 3
| 输出的文件格式 --html-output [FILE] --json-output [FILE]
|
xray官方文档
这个和下面这个都是之乎者也大佬写的,dismap侧重于资产搜集,比较新的一个工具,但是和vulmap可以联动使用
主页给了一些简单地参数
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| -file string Select a URL file for batch identification # 从文件中读取 Url 进行批量识别 -ip string Network segment [e.g. -ip 192.168.1.0/24 or -ip 192.168.1.1-10] # 指定一个网段,格式示例: 192.168.1.1/24 192.168.1.1-100 192.168.1.1-192.168.1.254 -np Not use ICMP/PING to detect surviving hosts # 不进行主机存活检测,跳过存活检测直接识别 Url -output string Save the scan results to the specified file (default "output.txt") # 自定义识别结果输出文件,默认追加到 output.txt 中,此选项中输出的文件可以直接通过vulmap -f参数来扫描 -port string Custom scan ports [e.g. -port 80,443 or -port 1-65535] # 自定义需要扫描的 Web 端口,默认端口在 /config/config.go 中 -thread int Number of concurrent threads, (adapted to two network segments 2x254) (default 508) # 多线程数量,默认508(两个C段的数量),线程越高存活和识别丢失率可能越高,不建议超过2000 -timeout int Response timeout time, the default is 5 seconds (default 5) # 主机存活探测和 Http 超时时间,默认均为5秒 -url string Specify a target URL [e.g. -url https://example.com] # 识别单个 Url 时用该选项指定
|
然后通过规则库可以自定义识别的指纹,批量验证,规则库很好上手,也在md写全了
这个主要是漏洞扫描和验证
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| 可选参数: -h, --help 显示此帮助消息并退出 -u URL, --url URL 目标 URL (e.g. -u "http://example.com") -f FILE, --file FILE 选择一个目标列表文件,每个url必须用行来区分 (e.g. -f "/home/user/list.txt") --fofa keyword 使用 fofa api 批量扫描 (e.g. --fofa "app=Apache-Shiro") --shodan keyword 使用 shodan api 批量扫描 (e.g. --shodan "Shiro") -m MODE, --mode MODE 模式支持"poc"和"exp",可以省略此选项,默认进入"poc"模式 -a APP [APP ...] 指定 webapps(e.g. "weblogic")不指定则自动指纹识别 -c CMD, --cmd CMD 自定义远程命令执行执行的命令,默认是echo随机md5 -v VULN, --vuln VULN 利用漏洞,需要指定漏洞编号 (e.g. -v "CVE-2019-2729") -t NUM, --thread NUM 扫描线程数量,默认10线程 --dnslog server dnslog 服务器 (hyuga,dnslog,ceye) 默认自动轮询 --output-text file 扫描结果输出到 txt 文件 (e.g. "result.txt") --output-json file 扫描结果输出到 json 文件 (e.g. "result.json") --proxy-socks SOCKS 使用 socks 代理 (e.g. --proxy-socks 127.0.0.1:1080) --proxy-http HTTP 使用 http 代理 (e.g. --proxy-http 127.0.0.1:8080) --user-agent UA 允许自定义 User-Agent --fofa-size SIZE fofa api 调用资产数量,默认100,可用(1-10000) --delay DELAY 延时时间,每隔多久发送一次,默认 0s --timeout TIMEOUT 超时时间,默认 5s --list 显示支持的漏洞列表 --debug exp 模式显示 request 和 responses, poc 模式显示扫描漏洞列表 --check 目标存活检测 (on and off), 默认是 on
|
参数和例子都给的很全,记录一下做一个备忘
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| # 测试所有漏洞 poc 不指定 -a all 将默认开启指纹识别 python3 vulmap.py -u http://example.com
# 检查站点是否存在 struts2 漏洞 python3 vulmap.py -u http://example.com -a struts2
# 对 http://example.com:7001 进行 WebLogic 的 CVE-2019-2729 漏洞利用 python3 vulmap.py -u http://example.com:7001 -v CVE-2019-2729 python3 vulmap.py -u http://example.com:7001 -m exp -v CVE-2019-2729
# 批量扫描 list.txt 中的 url python3 vulmap.py -f list.txt
# 扫描结果导出到 result.json python3 vulmap.py -u http://example.com:7001 --output-json result.json
# 调用 fofa api 批量扫描 python3 vulmap.py --fofa app=Apache-Shiro
|
贴个运行截图