可以发现此处应该不存在报错注入,而且只会返回正确。
尝试双注入后任然没有返回
既然得不到反馈就考虑用时间盲注吧
根据前面的经验会发现用下述sql语句没有用,为什么呢
1' and if(length(database())>5,sleep(1),1)#
先来构造一下sql语句
select username,password from table where Uname=‘’ and Passwd=‘’;
当输入1' and if(length(database())>5,sleep(1),1)#
时候,语句变成了
select username,password from table where Uname=‘1' and if(length(database())>5,sleep(1),1)#
’ and Passwd=‘’;
乍一看没问题,但是因为是and
所以必须满足username=1才能触发1' and if(length(database())>5,sleep(1),1)#
,所以没有满足username字段没有值为1的元组,所以不会触发。
换种思路
1' union select 1,if(length(database())>5,sleep(1),1)#
那为什么union
就能呢,因为没有一个叫1的用户,union
是联合查询,union
前的语句为空联合后面的语句后便有了值。所以查询语句成立。
然后盲注表名、字段名、元组