安全研究

安全漏洞
Microsoft Agent Active控件远程堆溢出漏洞(MS06-068)

发布日期:2006-11-14
更新日期:2007-01-30

受影响系统:
Microsoft Windows XP SP2
Microsoft Windows Server 2003 SP1
Microsoft Windows Server 2003
Microsoft Windows 2000SP4
描述:
BUGTRAQ  ID: 21034
CVE(CAN) ID: CVE-2006-3445

Microsoft Windows是微软发布的非常流行的操作系统。

Microsoft的Agent Active控件在解析畸形的字符文件时存在整数溢出。在agentdpv.dll的ReadWideString函数中:

711a2cc4     mov     eax,[ebp+0xc]
711a2cc7     cmp     eax,ebx
711a2cc9     jz      agentdpv!ReadWideStringW+0x6b (711a2d0e)
711a2ccb     lea     eax,[eax+eax+0x2]
711a2ccf     push    eax
711a2cd0     call    agentdpv!operator new (711aaa6c)

在内存中解压时.acf格式会将字符串的长度附加到字符串上。如果要触发这个漏洞,攻击者需要在解压之前在字符串的长度字段中设置很大的值7FFFFFFF以创建畸形的.acf文件。当Microsoft Agent解析该.acf文件时,就会在解压文件后读取这个长度:

711a2cc4     mov     eax,[ebp+0xc] ; length of string

在使用所提供的长度计算为宽字符串所分配的内存大小时可能会出现整数溢出,导致分配0字节:

711a2ccb     lea     eax,[eax+eax+0x2]
711a2ccf     push    eax
711a2cd0     call    agentdpv!operator new (711aaa6c)

之后仍会从之前所分配的内存读取字符串并拷贝到缓冲区,导致堆溢出。

711a2ce8     push    ebx
711a2ce9     add     edx,edx
711a2ceb     push    edx
711a2cec     push    eax
711a2ced     push    edi
711a2cee     call    dword ptr [ecx+0xc]{ole32!CMemStm::Read (771e7a1f)}

攻击者可能通过构建特制网页来利用此漏洞,如果用户查看了该网页,则可能允许远程执行代码。

<*来源:Microsoft
  
  链接:http://secunia.com/advisories/22878
        http://www.kb.cert.org/vuls/id/810772
        http://marc.theaimsgroup.com/?l=bugtraq&m=117019790706652&w=2
        http://www.microsoft.com/technet/security/bulletin/ms06-068.mspx
        http://www.us-cert.gov/cas/techalerts/TA06-318A.html
*>

建议:
临时解决方法:

如果您不能立刻安装补丁或者升级,NSFOCUS建议您采取以下措施以降低威胁:

* 暂时禁止在Internet Explorer中运行Microsoft Agent ActiveX控件。请将以下文本粘贴于记事本等文本编辑器中。然后,使用.reg文件扩展名保存文件。

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{D45FD31B-5C6E-11D1-9EC1-00C04FD7081F}]

"Compatibility Flags"=dword:00000400

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{F5BE8BD2-7DE6-11D0-91FE-00C04FD701A5}]

"Compatibility Flags"=dword:00000400

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{4BAC124B-78C8-11D1-B9A8-00C04FD97575}]

"Compatibility Flags"=dword:00000400

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{D45FD31D-5C6E-11D1-9EC1-00C04FD7081F}]

"Compatibility Flags"=dword:00000400

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{D45FD31E-5C6E-11D1-9EC1-00C04FD7081F}]

"Compatibility Flags"=dword:00000400

您可以通过双击此.reg文件将其应用到各个系统,还可以使用组策略跨域应用该文件。

* 将Internet Explorer配置为在Internet和本地Intranet安全区域中运行ActiveX控件之前进行提示。
* 将Internet和本地intranet安全区设置为“高”以在运行ActiveX控件和活动脚本之前要求提示。

厂商补丁:

Microsoft
---------
Microsoft已经为此发布了一个安全公告(MS06-068)以及相应补丁:
MS06-068:Vulnerability in Microsoft Agent Could Allow Remote Code Execution (920213)
链接:http://www.microsoft.com/technet/security/bulletin/ms06-068.mspx

浏览次数:5028
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障