xss php漏洞扫描工具,XSpear:一款强大的XSS漏洞扫描器工具
XSpear XSS掃描器
XSpear是一款基于RubyGems的的XSS漏洞掃描器。擁有常見的
XSS漏洞掃描器
主要特點
基于模式匹配的XSS掃描
檢測alert?confirm?prompt無頭瀏覽器上的事件(使用Selenium)
測試XSS保護旁路和反射參數的請求/響應
反射的參數
過濾測試?event handler?HTML tag?Special Char
測試盲XSS(使用XSS Hunter,ezXSS,HBXSS,等等所有網址盲測...)
動態/靜態分析查找SQL錯誤模式
分析Security頭(CSP?HSTS?X-frame-options,XSS-protection等..)
分析其他標題..(服務器版本,內容類型等...)
從Raw文件掃描(Burp suite,ZAP Request)
在ruby代碼上運行的XSpear(使用Gem庫)
顯示table base cli-report和filtered rule,testing raw query(網址)
在所選參數下進行測試
支持輸出格式?cli?jsoncli:摘要,過濾規則(params),Raw Query
支持詳細級別(退出/正常/原始數據)
支持自定義回調代碼,以測試各種攻擊向量
XSpear安裝
安裝
$ gem install XSpear
1
$geminstallXSpear
或者本地安裝特定版本
$ gem install XSpear-{version}.gem
1
$geminstallXSpear-{version}.gem
將此行添加到應用程序的Gemfile:
gem 'XSpear'
1
gem'XSpear'
然后執行
$ bundle
1
$bundle
依賴 gems
colorize?selenium-webdriver?terminal-table
如果您將其配置為在Gem庫中自動安裝,出現依賴問題,請嘗試:
$ gem install colorize
$ gem install selenium-webdriver
$ gem install terminal-table
1
2
3
$geminstallcolorize
$geminstallselenium-webdriver
$geminstallterminal-table
XSpear cli使用
Usage: xspear -u [target] -[options] [value]
[ e.g ]
$ ruby a.rb -u 'https://www.hahwul.com/?q=123' --cookie='role=admin'
[ Options ]
-u, --url=target_URL [required] Target Url
-d, --data=POST Body [optional] POST Method Body data
--headers=HEADERS [optional] Add HTTP Headers
--cookie=COOKIE [optional] Add Cookie
--raw=FILENAME [optional] Load raw file(e.g raw_sample.txt)
-p, --param=PARAM [optional] Test paramters
-b, --BLIND=URL [optional] Add vector of Blind XSS
+ with XSS Hunter, ezXSS, HBXSS, etc...
+ e.g : -b https://hahwul.xss.ht
-t, --threads=NUMBER [optional] thread , default: 10
-o, --output=FILENAME [optional] Save JSON Result
-v, --verbose=1~3 [optional] Show log depth
+ Default value: 2
+ v=1 : quite mode
+ v=2 : show scanning log
+ v=3 : show detail log(req/res)
-h, --help Prints this help
--version Show XSpear version
--update Update with online
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:xspear-u[target]-[options][value]
[e.g]
$rubya.rb-u'https://www.hahwul.com/?q=123'--cookie='role=admin'
[Options]
-u,--url=target_URL[required]TargetUrl
-d,--data=POSTBody[optional]POSTMethodBodydata
--headers=HEADERS[optional]AddHTTPHeaders
--cookie=COOKIE[optional]AddCookie
--raw=FILENAME[optional]Loadrawfile(e.graw_sample.txt)
-p,--param=PARAM[optional]Testparamters
-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]Showlogdepth
+Defaultvalue:2
+v=1:quitemode
+v=2:showscanninglog
+v=3:showdetaillog(req/res)
-h,--helpPrintsthishelp
--versionShowXSpearversion
--updateUpdatewithonline
結果類型
(I)NFO:獲取信息(例如sql錯誤,過濾規則,反射的參數等...)
(V)UNL:易受攻擊的XSS,已檢查警報/提示/確認與Selenium
(L)OW:低級問題
(M)EDIUM:中等水平問題
(H)IGH:高級別問題
個案分析
掃描XSS
$ xspear -u "http://testphp.vulnweb.com/search.php?test=query" -d "searchFor=yy"
1
$xspear-u"http://testphp.vulnweb.com/search.php?test=query"-d"searchFor=yy"
json輸出
$ xspear -u "http://testphp.vulnweb.com/search.php?test=query" -d "searchFor=yy" -o json -v 1
1
$xspear-u"http://testphp.vulnweb.com/search.php?test=query"-d"searchFor=yy"-ojson-v1
詳細日志
$ xspear -u "http://testphp.vulnweb.com/search.php?test=query" -d "searchFor=yy" -v 3
1
$xspear-u"http://testphp.vulnweb.com/search.php?test=query"-d"searchFor=yy"-v3
設置線程
$ xspear -u "http://testphp.vulnweb.com/search.php?test=query" -t 30
1
$xspear-u"http://testphp.vulnweb.com/search.php?test=query"-t30
在所選參數下進行測試
$ xspear -u "http://testphp.vulnweb.com/search.php?test=query&cat=123&ppl=1fhhahwul" -p cat,test
1
$xspear-u"http://testphp.vulnweb.com/search.php?test=query&cat=123&ppl=1fhhahwul"-pcat,test
測試盲目xss
$ xspear -u "http://testphp.vulnweb.com/search.php?test=query" -b "https://hahwul.xss.ht"
1
$xspear-u"http://testphp.vulnweb.com/search.php?test=query"-b"https://hahwul.xss.ht"
等等...
此外,你還可以自已添加模塊,編寫測試功能等等,更多見readme。
總結
以上是生活随笔為你收集整理的xss php漏洞扫描工具,XSpear:一款强大的XSS漏洞扫描器工具的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【Linux】Linux设备驱动开发详解
- 下一篇: UNIX网络编程卷一 学习笔记 第一章