SQL Server SA权限总结经典技术
发布时间:2020-12-12 09:40:49 所属栏目:MsSql教程 来源:网络整理
导读:前提需要工具:SQLQueryAnalyzer和SqlExecSunxVersion 第一部分: 有关去掉xp_cmdshell来保护系统的分析总结: 首先知道一下语句: 1.去掉xp_cmdshell扩展过程的方法是使用如下语句: ifexists(select*fromdbo.sysobjectswhereid=object_id(N'[dbo].[xpcmdsh
前提需要工具:SQLQueryAnalyzer和SqlExecSunxVersion 第一部分:有关去掉xp_cmdshell来保护系统的分析总结: 首先知道一下语句: 1.去掉xp_cmdshell扩展过程的方法是使用如下语句: ifexists(select*fromdbo.sysobjectswhereid=object_id(N'[dbo].[xpcmdshell]')andOBJECTPROPERTY(id,N'IsExtendedProc')=1)execsp_dropextendedprocN'[dbo].[xp_cmdshell]' 2.添加xp_cmdshell扩展过程的方法是使用如下语句: sp_addextendedprocxp_cmdshell,@dllname='xplog70.dll' 现在看看现象: 我们在取得SA权限后远程用Sqlexec执行cmd命令,出现提示SQL_ERROR,那么很可能是去掉了xp_cmdshell。 现在来看看被去掉xp_cmdshell后恢复的两种方法: 方法一、使用SQLQueryAnalyzer连接对方后直接写入,挺方便sp_addextendedprocxp_cmdshell,@dllname='xplog70.dll'方法二、使用SqlExecSunxVersion首先在SqlExecSunxVersion的Format选项里填上%s,在CMD选项里输入sp_addextendedproc'xp_cmdshell','xpsql70.dll'或者对Sql2000情况下使用sp_addextendedproc'xp_cmdshell','xplog70.dll'另外使用SqlExecSunxVersion来去除xp_cmdshell的方法和加的时候选择条件一样,然后输入sp_dropextendedproc'xp_cmdshell'就可以了 |
推荐文章
站长推荐
热点阅读