代码漏洞扫描工具,自动化测试xss漏洞
XSpear XSS扫描仪
XSpear是基于RubyGems的XSS漏洞扫描仪。 常见
XSS漏洞扫描仪
主要特点
基于模式匹配的XSS扫描
在alertconfirmprompt无头浏览器中检测事件(使用Selenium )
测试XSS保护旁路和反射参数的请求/响应
反射的参数
事件处理程序html标记特殊通道筛选器测试
测试盲XSS (使用XSS Hunter、ezXSS、HBXSS等所有网址进行盲测试……)。
使用动态/静态分析搜索SQL错误模式
安全标题分析(CSPHSTSX-frame-options、XSS-protection等)。
分析其他标题…(服务器版本、内容类型等…) )。
从原始文件扫描(Burp suite,ZAP Request ) ) ) ) ) ) ) )。
以ruby代码运行的xs pear (使用gem库) ) ) ) ) ) ) ) ) ) )。
显示table base cli-report和过滤规则,测试图形查询(网址)
在选定的参数下进行测试
输出格式clijsoncli :支持摘要、过滤规则(params )和原始查询
支持详细级别(退出/正常/原始数据) ) ) ) )。
支持定制回调代码以测试各种攻击向量
安装XSpear
安装
$ gem install XSpear
1
$geminstallXSpear
或本地安装特定版本
$ geminstallxspear-{ version }.gem
1
$ geminstallxspear-{ version }.gem
将此行添加到APP应用程序的Gemfile中:
gem 'XSpear '
1
gem'XSpear '
然后执行
$ bundle
1
$bundle
依赖于gems
Colorize selenium-webdriverterminal-table
设置为自动安装在Gem库中,如果遇到依赖关系问题,请尝试以下操作:
$ gem install colorize
$ gem install selenium-web驱动程序
$ gem安装终端表
1
2
3
$geminstallcolorize
$ geminstallselenium-web驱动程序
$geminstallterminal-table
使用XSpear cli
usage : xs pear-u [ target ]-[ options ] [ value ]
[ e.g ]
$ rubya.r B- u ' https://www.hah wul.com/q=123 '-- cookie=' role=admin '
[选项]
-u,--URL=target _ URL [ required ] targeturl
-d,--data=postbody [ optional ] postmethodbodydata
- headers=headers [可选] addhttpheaders
- cookie=cookie [可选] addcookie
- raw=filename [可选] loadrawfile (e.graw _ sample.txt )。
-p,--param=param [可选]测试参数
-b,--blind=URL [ optional ] addvectorofblindxss
with XSS Hunter,ezXSS,HBXSS,etc .
e.g : -b https://hahwul.xss.ht
-t,--threads=number [ optional ] thread,default: 10
-o,--output=filename [ optional ] savejsonresult
-v,--verbose=1至3 [ optional ] show log depth
默认值value : 2
v=1:队列模式
v=2 : show scanning log
v=3:显示详细信息日志(req/RES ) )。
-h,--help Prints this help
- -版本显示xs pear版本
- -更新更新使用在线
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
usage : xs pear-u [ target ]-[ options ] [ value ]
[e.g]
$ rubya.r B- u ' https://www.hah wul.com/q=123 '-- cookie=' role=admin '
[选项]
u,--URL=target _ URL [ required ] targeturl
-d,--data=postbody [ optional ] postmethodbodydata
- headers=headers [可选] addhttpheaders
- cookie=cookie [可选] addcookie
- raw=filename [可选] loadrawfile (e.graw _ sample.txt )。
-p,--param=param [可选]测试参数
-b,--blind=URL [ optional ] addvectorofblindxss
withXSSHunter,ezXSS,HBXSS,etc .
e.g:-bhttps://hahwul.xss.ht
-t,--threads=number [ optional ] thread,default:10
-o,--output=filename [ optional ] savejsonresult
-v,--verbose=1至3 [ optional ] show log depth
默认值value :2
v=1:队列模式
v=2:showscanninglog
v=3:显示详细信息日志(req/RES ) )。
-h,--helpPrintsthishelp
--versionShowXSpearversion
--updateUpdatewithonline
结果类型
(I )获取NFO )信息)例如,sql错误、过滤规则、反射参数等…)。
(v ) UNL )易受攻击的XSS检查了警报/提示/确认和Selenium
(l ) OW )低水平问题
(m ) EDIUM )中等问题
(h ) IGH )高级别问题
个案研究
XSS扫描
$ xs pear-u ' http://test PHP.vuln web.com/search.PHP? test=query' -d 'searchFor=yy '
1
$ xs pear-u ' http://test PHP.vuln web.com/search.PHP? test=query'-d'searchFor=yy '
json输出
$ xs pear-u ' http://test PHP.vuln web.com/search.PHP? test=query '-d ' search for=YY '-OJ son-v1
1
$ xs pear-u ' http://test PHP.vuln web.com/search.PHP? test=query '-d ' search for=YY '-OJ son-v1
详细日志
$ xs pear-u ' http://test PHP.vuln web.com/search.PHP? test=query' -d 'searchFor=yy' -v 3
1
$ xs pear-u ' http://test PHP.vuln web.com/search.PHP? test=query'-d'searchFor=yy'-v3
线程设置
$ xs pear-u ' http://test PHP.vuln web.com/search.PHP? test=query' -t 30
1
$ xs pear-u ' http://test PHP.vuln web.com/search.PHP? test=query'-t30
在选定的参数下进行测试
$ xs pear-u ' http://test PHP.vuln web.com/search.PHP? test=querycat=123 ppl=1fhahwul '-pcat,test
1
$ xs pear-u ' http://test PHP.vuln web.com/search.PHP? test=querycat=123 ppl=1fhahwul '-pcat,test
测试盲目的xss
$ xs pear-u ' http://test PHP.vuln web.com/search.PHP? test=query '-b ' https://hahwul.XSS.ht '
1
$ xs pear-u ' http://test PHP.vuln web.com/search.PHP? test=query '-b ' https://hahwul.XSS.ht '
等一下.
此外,还可以自己添加模块和创建测试功能。 请参阅自述。