Vulnerabilities > CVE-2007-3040 - Improper Restriction of Operations Within the Bounds of A Memory Buffer vulnerability in Microsoft Windows 2000

047910
CVSS 9.3 - CRITICAL
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
microsoft
CWE-119
critical
nessus
exploit available

Summary

Stack-based buffer overflow in agentdpv.dll 2.0.0.3425 in Microsoft Agent on Windows 2000 SP4 allows remote attackers to execute arbitrary code via a crafted URL to the Agent (Agent.Control) ActiveX control, which triggers an overflow within the Agent Service (agentsrv.exe) process, a different issue than CVE-2007-1205.

Vulnerable Configurations

Part Description Count
OS
Microsoft
1

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

Exploit-Db

descriptionMicrosoft Agent agentdpv.dll ActiveX Control Malformed URL Stack Buffer Overflow Vulnerability. CVE-2007-3040. Remote exploit for windows platform
idEDB-ID:30567
last seen2016-02-03
modified2007-09-11
published2007-09-11
reporterYamata Li
sourcehttps://www.exploit-db.com/download/30567/
titleMicrosoft Agent agentdpv.dll ActiveX Control Malformed URL Stack Buffer Overflow Vulnerability

Nessus

NASL familyWindows : Microsoft Bulletins
NASL idSMB_NT_MS07-051.NASL
descriptionThe remote version of Windows contains a flaw in the Microsoft Agent service that may allow an attacker to execute code on the remote host. To exploit this flaw, an attacker would need to set up a rogue website and lure a victim on the remote host into visiting it.
last seen2020-06-01
modified2020-06-02
plugin id26017
published2007-09-11
reporterThis script is Copyright (C) 2007-2018 Tenable Network Security, Inc.
sourcehttps://www.tenable.com/plugins/nessus/26017
titleMS07-051: Vulnerability in Microsoft Agent Could Allow Remote Code Execution (938827)
code
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
 script_id(26017);
 script_version("1.31");
 script_cvs_date("Date: 2018/11/15 20:50:30");

 script_cve_id("CVE-2007-3040");
 script_bugtraq_id(25566);
 script_xref(name:"MSFT", value:"MS07-051");
 script_xref(name:"MSKB", value:"938827");
 
 script_xref(name:"CERT", value:"716872");
 script_xref(name:"EDB-ID", value:"30567");

 script_name(english:"MS07-051: Vulnerability in Microsoft Agent Could Allow Remote Code Execution (938827)");
 script_summary(english:"Determines the presence of update 938827");

 script_set_attribute(attribute:"synopsis", value:
"Arbitrary code can be executed on the remote host through the web or
email client.");
 script_set_attribute(attribute:"description", value:
"The remote version of Windows contains a flaw in the Microsoft Agent
service that may allow an attacker to execute code on the remote host.

To exploit this flaw, an attacker would need to set up a rogue website
and lure a victim on the remote host into visiting it.");
 script_set_attribute(attribute:"see_also", value:"https://docs.microsoft.com/en-us/security-updates/SecurityBulletins/2007/ms07-051");
 script_set_attribute(attribute:"solution", value:"Microsoft has released a set of patches for Windows 2000.");
 script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C");
 script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
 script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
 script_set_attribute(attribute:"exploit_available", value:"true");
 script_set_attribute(attribute:"exploit_framework_core", value:"true");
 script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
 script_set_attribute(attribute:"canvas_package", value:'CANVAS');
 script_cwe_id(119);

 script_set_attribute(attribute:"vuln_publication_date", value:"2007/09/11");
 script_set_attribute(attribute:"patch_publication_date", value:"2007/09/11");
 script_set_attribute(attribute:"plugin_publication_date", value:"2007/09/11");

 script_set_attribute(attribute:"plugin_type", value:"local");
 script_set_attribute(attribute:"cpe", value:"cpe:/o:microsoft:windows");
 script_end_attributes();

 script_category(ACT_GATHER_INFO);

 script_copyright(english:"This script is Copyright (C) 2007-2018 Tenable Network Security, Inc.");
 script_family(english:"Windows : Microsoft Bulletins");

 script_dependencies("smb_hotfixes.nasl", "ms_bulletin_checks_possible.nasl");
 script_require_keys("SMB/MS_Bulletin_Checks/Possible");
 script_require_ports(139, 445, 'Host/patch_management_checks');
 exit(0);
}


include("audit.inc");
include("smb_hotfixes_fcheck.inc");
include("smb_hotfixes.inc");
include("smb_func.inc");
include("misc_func.inc");

get_kb_item_or_exit("SMB/MS_Bulletin_Checks/Possible");

bulletin = 'MS07-051';
kb = "938827";

kbs = make_list(kb);
if (get_kb_item("Host/patch_management_checks")) hotfix_check_3rd_party(bulletin:bulletin, kbs:kbs, severity:SECURITY_HOLE);

get_kb_item_or_exit("SMB/Registry/Enumerated");
get_kb_item_or_exit("SMB/WindowsVersion", exit_code:1);

if (hotfix_check_sp_range(win2k:'4,5') <= 0) audit(AUDIT_OS_SP_NOT_VULN);

rootfile = hotfix_get_systemroot();
if (!rootfile) exit(1, "Failed to get the system root.");

share = hotfix_path2share(path:rootfile);
if (!is_accessible_share(share:share)) audit(AUDIT_SHARE_FAIL, share);

if (hotfix_is_vulnerable(os:"5.0", file:"Agentdpv.dll", version:"2.0.0.3426", dir:"\msagent", bulletin:bulletin, kb:kb))
{
  set_kb_item(name:"SMB/Missing/"+bulletin, value:TRUE);
  hotfix_security_hole();
  hotfix_check_fversion_end();
  exit(0);
}
else
{
  hotfix_check_fversion_end();
  audit(AUDIT_HOST_NOT, 'affected');
}

Oval

accepted2007-10-18T21:59:20.077-04:00
classvulnerability
contributors
nameSudhir Gandhe
organizationSecure Elements, Inc.
definition_extensions
commentMicrosoft Windows 2000 SP4 or later is installed
ovaloval:org.mitre.oval:def:229
descriptionStack-based buffer overflow in agentdpv.dll 2.0.0.3425 in Microsoft Agent on Windows 2000 SP4 allows remote attackers to execute arbitrary code via a crafted URL to the Agent (Agent.Control) ActiveX control, which triggers an overflow within the Agent Service (agentsrv.exe) process, a different issue than CVE-2007-1205.
familywindows
idoval:org.mitre.oval:def:2116
statusaccepted
submitted2007-09-13T11:17:00
titleAgent Remote Code Execution Vulnerability
version36

Saint

bid25566
descriptionMicrosoft Agent crafted URL vulnerability
idwin_patch_agentver
osvdb36934
titlemicrosoft_agent_url
typeclient

Seebug

bulletinFamilyexploit
descriptionBUGTRAQ ID: 25566 CVE(CAN) ID: CVE-2007-3040 Microsoft Windows是微软发布的非常流行的操作系统。 Windows操作系统所安装的Microsoft Agent ActiveX控件用于使用动画字符引导用户了解如何使用计算机,该ActiveX控件注册如下: 文件:agentdpv.dll ProgID:Agent.Control CLASSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F Microsoft Agent控件处理某些特制URL的方式存在栈溢出漏洞,如果用户受骗访问了恶意网页的话攻击者就可以在受影响的系统上远程执行代码。那些帐户被配置为拥有较少系统用户权限的用户比具有管理用户权限的用户受到的影响要小。 Microsoft Windows 2000SP4 临时解决方法: * 阻止在Internet Explorer中运行Agent ActiveX控件,将以下文本粘贴于记事本等文本编辑器中。然后,使用.reg文件扩展名保存文件并双击导入。 Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{D45FD31B-5C6E-11D1-9EC1-00C04FD7081F}] &quot;Compatibility Flags&quot;=dword:00000400 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{F5BE8BD2-7DE6-11D0-91FE-00C04FD701A5}] &quot;Compatibility Flags&quot;=dword:00000400 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{4BAC124B-78C8-11D1-B9A8-00C04FD97575}] &quot;Compatibility Flags&quot;=dword:00000400 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{D45FD31D-5C6E-11D1-9EC1-00C04FD7081F}] &quot;Compatibility Flags&quot;=dword:00000400 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{D45FD31E-5C6E-11D1-9EC1-00C04FD7081F}] &quot;Compatibility Flags&quot;=dword:00000400 * 注销AgentSvr.exe,在命令行处或者在登录或计算机启动脚本中输入下列命令: %windir%\msagent\agentsvr.exe /unregserver * 将Internet Explorer配置为在Internet和本地Intranet安全区域中运行活动脚本之前进行提示。 * 将Internet和本地intranet安全区设置为“高”以在运行ActiveX控件和活动脚本之前要求提示。 厂商补丁: Microsoft --------- Microsoft已经为此发布了一个安全公告(MS07-051)以及相应补丁: MS07-051:Vulnerability in Microsoft Agent Could Allow Remote Code Execution (938827) 链接:<a href="http://www.microsoft.com/technet/security/Bulletin/MS07-051.mspx?pf=true" target="_blank">http://www.microsoft.com/technet/security/Bulletin/MS07-051.mspx?pf=true</a> 补丁下载: <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=7cd248ed-d154_4dce-89ef-ceefd2700965&amp;displaylang=en" target="_blank">http://www.microsoft.com/downloads/details.aspx?FamilyId=7cd248ed-d154_4dce-89ef-ceefd2700965&amp;displaylang=en</a>
idSSV:2212
last seen2017-11-19
modified2007-09-12
published2007-09-12
reporterRoot
titleMicrosoft Agent agentdpv.dll ActiveX控件畸形URL栈溢出漏洞(MS07-051)