xray:GitHub - chaitin/xray: 一款完善的安全评估工具,支持常见 web 安全问题扫描和自定义 poc | 使用之前务必先阅读文档
XRay是长亭科技洞鉴核心引擎中提取出的社区版漏洞扫描神器,属于一款功能十分强大的国产被动扫描工具,其应用范围涵括,Web通用漏洞扫描、被动代理扫描、社区POC集成……
XRay 的定位是一款安全辅助评估工具,而不是攻击工具,其内置的所有 payload 和 poc 均为无害化检查。毫不犹豫的说,XRay属于渗透测试人员安全渗透的一大神兵利器!
但是目前没有实现批量化扫描的功能,需要用户自己编写脚本联动
import os
import hashlib
import re
# 扫描
def get_url():
f = open("ips.txt")
lines = f.readlines()
# 匹配http | https请求头
pattern = re.compile(r'^(https|http)://')
for line in lines:
try:
if not pattern.match(line.strip()):
targeturl="http://"+line.strip()
else:
targeturl=line.strip()
# print(targeturl.strip())
outputfilename=hashlib.md5(targeturl.encode("utf-8"))
do_scan(targeturl.strip(), outputfilename.hexdigest())
except Exception as e:
print(e)
pass
f.close()
print("Xray Scan End~")
return
# 报告
def do_scan(targeturl,outputfilename="test"):
scan_command="./xray_darwin_arm64 webscan --url {} --plugins phantasm --poc '/Volumes/Security/scan/xray/poctemp/*' --html-output '/Volumes/Security/scan/xray/jieguo/{}.html'".format(targeturl,outputfilename)
#--poc制定你的poc路径;output是输出扫描结果的路径
# scan_command = "ping 943ogg.dnslog.cn"
# print(scan_command)
os.system(scan_command)
return
if __name__ == '__main__':
get_url()
以上是xray工具批量扫描,先将需要扫描的域名放在xray目录下面,命名为ips.txt,扫描完成后并将扫描后的结果保存在output下面。