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

047910
CVSS 10.0 - CRITICAL
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
low complexity
microsoft
CWE-119
critical
nessus

Summary

Stack-based buffer overflow in the EnumeratePrintShares function in Windows Print Spooler Service (win32spl.dll) in Microsoft Windows 2000 SP4 allows remote printer servers to execute arbitrary code via a crafted ShareName in a response to an RPC request, related to "printing data structures," aka "Buffer Overflow in Print Spooler Vulnerability."

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.

Msbulletin

bulletin_idMS09-022
bulletin_url
date2009-06-09T00:00:00
impactRemote Code Execution
knowledgebase_id961501
knowledgebase_url
severityCritical
titleVulnerabilities in Windows Print Spooler Could Allow Remote Code Execution

Nessus

NASL familyWindows : Microsoft Bulletins
NASL idSMB_NT_MS09-022.NASL
descriptionThe version of the Print Spooler service on the remote Windows host is affected by one or more of the following vulnerabilities : - A buffer overflow vulnerability could allow an unauthenticated, remote attacker to execute arbitrary code with SYSTEM privileges. (CVE-2009-0228) - Using a specially crafted separator page, a local user can read or print any file on the affected system. (CVE-2009-0229) - Using a specially crafted RPC message, a user who has the
last seen2020-06-01
modified2020-06-02
plugin id39344
published2009-06-10
reporterThis script is Copyright (C) 2009-2018 Tenable Network Security, Inc.
sourcehttps://www.tenable.com/plugins/nessus/39344
titleMS09-022: Vulnerabilities in Windows Print Spooler Could Allow Remote Code Execution (961501)
code
#
# (C) Tenable Network Security, Inc.
#


include("compat.inc");


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

  script_cve_id("CVE-2009-0228", "CVE-2009-0229", "CVE-2009-0230");
  script_bugtraq_id(35206, 35208, 35209);
  script_xref(name:"MSFT", value:"MS09-022");
  script_xref(name:"MSKB", value:"961501");

  script_name(english:"MS09-022: Vulnerabilities in Windows Print Spooler Could Allow Remote Code Execution (961501)");
  script_summary(english:"Checks version of Localspl.dll");

  script_set_attribute(attribute:"synopsis", value:
"Arbitrary code can be executed on the remote host due to a flaw in the
Spooler service.");
  script_set_attribute(attribute:"description", value:
"The version of the Print Spooler service on the remote Windows host is
affected by one or more of the following vulnerabilities :

  - A buffer overflow vulnerability could allow an
    unauthenticated, remote attacker to execute arbitrary
    code with SYSTEM privileges. (CVE-2009-0228)

  - Using a specially crafted separator page, a local user
    can read or print any file on the affected system.
    (CVE-2009-0229)

  - Using a specially crafted RPC message, a user who has
    the 'Manage Printer' privilege can have the spooler
    load an arbitrary DLL and thereby execute arbitrary
    code with elevated privileges. (CVE-2009-0230)");
  script_set_attribute(attribute:"see_also", value:"https://docs.microsoft.com/en-us/security-updates/SecurityBulletins/2009/ms09-022");
  script_set_attribute(attribute:"solution", value:
"Microsoft has released a set of patches for Windows 2000, XP, 2003,
Vista and 2008.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/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, 200, 264);

  script_set_attribute(attribute:"vuln_publication_date", value:"2009/06/09");
  script_set_attribute(attribute:"patch_publication_date", value:"2009/06/09");
  script_set_attribute(attribute:"plugin_publication_date", value:"2009/06/10");

  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_family(english:"Windows : Microsoft Bulletins");

  script_copyright(english:"This script is Copyright (C) 2009-2018 Tenable Network Security, Inc.");

  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_func.inc");
include("smb_hotfixes.inc");
include("smb_hotfixes_fcheck.inc");
include("misc_func.inc");

get_kb_item_or_exit("SMB/MS_Bulletin_Checks/Possible");

bulletin = 'MS09-022';
kb = "961501";

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', xp:'2,3', win2003:'2', vista:'0,2') <= 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 (
  # Vista / Windows 2008
  hotfix_is_vulnerable(os:"6.0", sp:2, file:"Localspl.dll", version:"6.0.6002.22120", min_version:"6.0.6002.20000", dir:"\system32", bulletin:bulletin, kb:kb) ||
  hotfix_is_vulnerable(os:"6.0", sp:2, file:"Localspl.dll", version:"6.0.6002.18024",                               dir:"\system32", bulletin:bulletin, kb:kb) ||
  hotfix_is_vulnerable(os:"6.0", sp:1, file:"Localspl.dll", version:"6.0.6001.22417", min_version:"6.0.6001.20000", dir:"\system32", bulletin:bulletin, kb:kb) ||
  hotfix_is_vulnerable(os:"6.0", sp:1, file:"Localspl.dll", version:"6.0.6001.18247",                               dir:"\system32", bulletin:bulletin, kb:kb) ||
  hotfix_is_vulnerable(os:"6.0", sp:0, file:"Localspl.dll", version:"6.0.6000.21045", min_version:"6.0.6000.20000", dir:"\system32", bulletin:bulletin, kb:kb) ||
  hotfix_is_vulnerable(os:"6.0", sp:0, file:"Localspl.dll", version:"6.0.6000.16850",                               dir:"\system32", bulletin:bulletin, kb:kb) ||

  # Windows 2003
  hotfix_is_vulnerable(os:"5.2", sp:2, file:"Localspl.dll", version:"5.2.3790.4509", dir:"\system32", bulletin:bulletin, kb:kb) ||

  # Windows XP
  hotfix_is_vulnerable(os:"5.1", sp:3,             file:"Localspl.dll", version:"5.1.2600.5809", dir:"\system32", bulletin:bulletin, kb:kb) ||
  hotfix_is_vulnerable(os:"5.1", sp:2, arch:"x64", file:"Localspl.dll", version:"5.2.3790.4509", dir:"\system32", bulletin:bulletin, kb:kb) ||
  hotfix_is_vulnerable(os:"5.1", sp:2, arch:"x86", file:"Localspl.dll", version:"5.1.2600.3569", dir:"\system32", bulletin:bulletin, kb:kb) ||

  # Windows 2000
  hotfix_is_vulnerable(os:"5.0", file:"Localspl.dll", version:"5.0.2195.7296", dir:"\system32", 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

accepted2009-07-21T07:46:10.235-04:00
classvulnerability
contributors
nameDragos Prisaca
organizationGideon Technologies, Inc.
definition_extensions
commentMicrosoft Windows 2000 SP4 or later is installed
ovaloval:org.mitre.oval:def:229
descriptionStack-based buffer overflow in the EnumeratePrintShares function in Windows Print Spooler Service (win32spl.dll) in Microsoft Windows 2000 SP4 allows remote printer servers to execute arbitrary code via a a crafted ShareName in a response to an RPC request, related to "printing data structures," aka "Buffer Overflow in Print Spooler Vulnerability."
familywindows
idoval:org.mitre.oval:def:6317
statusaccepted
submitted2009-06-09T14:00:00
titleBuffer Overflow in Print Spooler Vulnerability
version69

Saint

bid35206
descriptionWindows Print Spooler EnumeratePrintShares buffer overflow
idwin_patch_printspool
titlewindows_print_spooler_enumerateprintshares
typeremote

Seebug

bulletinFamilyexploit
descriptionBUGTRAQ ID: 35206 CVE(CAN) ID: CVE-2009-0228 Microsoft Windows是微软发布的非常流行的操作系统。 Windows的打印后台程序在解析某些打印数据结构时存在缓冲区溢出漏洞。远程攻击者可以首先诱骗用户访问恶意的打印服务器,然后向受影响系统发送特制的RPC请求,导致在枚举期间错误的解析打印服务器的ShareName。成功利用此漏洞的攻击者可以完全控制受影响的系统。攻击者可随后安装程序;查看、更改或删除数据;或者创建新帐户。 Microsoft Windows 2000SP4 临时解决方法: * 在防火墙阻断TCP 139和445端口。 * 在Windows 2000 SP4上,从NullSessionPipes注册表项删除Print Spooler服务。 1. 单击“开始”,单击“运行”,键入regedt32,然后单击“确定”。 2. 在注册表编辑器中,找到以下注册表项: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\NullSessionPipes 3. 编辑该注册表项,并删除SPOOLSS值。 4. 执行这些操作之后重新启动受影响的系统。 * 禁用Print Spooler服务 1. 单击“开始”,然后单击“控制面板”。或者,指向“设置”,然后单击“控制面板”。 2. 双击“管理工具”。 3. 双击“服务”。 4. 双击“Print Spooler”。 5. 在“启动类型”列表中,单击“禁用”。 6. 单击“停止”,然后单击“确定”。 您还可以通过在命令提示符处使用以下命令来停止和禁用Print Spooler服务: sc stop Spooler &amp; sc config Spooler start=disabled 厂商补丁: Microsoft --------- Microsoft已经为此发布了一个安全公告(MS09-022)以及相应补丁: MS09-022:Vulnerabilities in Windows Print Spooler Could Allow Remote Code Execution (961501) 链接:<a href="http://www.microsoft.com/technet/security/Bulletin/MS09-022.mspx?pf=true" target="_blank" rel=external nofollow>http://www.microsoft.com/technet/security/Bulletin/MS09-022.mspx?pf=true</a> 补丁下载: <a href="http://www.microsoft.com/downloads/details.aspx?familyid=86378753-db24-44c2-a27d-cc0239f40ab8" target="_blank" rel=external nofollow>http://www.microsoft.com/downloads/details.aspx?familyid=86378753-db24-44c2-a27d-cc0239f40ab8</a>
idSSV:11607
last seen2017-11-19
modified2009-06-13
published2009-06-13
reporterRoot
titleMicrosoft Windows打印后台程序远程溢出漏洞(MS09-022)