MS12-043: Vulnerability in Microsoft XML Core Services Could Allow Remote Code Execution (2722479) - Nessus

High   Plugin ID: 59906

This page contains detailed information about the MS12-043: Vulnerability in Microsoft XML Core Services Could Allow Remote Code Execution (2722479) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 59906
Name: MS12-043: Vulnerability in Microsoft XML Core Services Could Allow Remote Code Execution (2722479)
Filename: smb_nt_ms12-043.nasl
Vulnerability Published: 2012-06-12
This Plugin Published: 2012-07-11
Last Modification Time: 2018-11-15
Plugin Version: 1.26
Plugin Type: local
Plugin Family: Windows : Microsoft Bulletins
Dependencies: ms_bulletin_checks_possible.nasl, smb_hotfixes.nasl
Required KB Items [?]: SMB/MS_Bulletin_Checks/Possible

Vulnerability Information


Severity: High
Vulnerability Published: 2012-06-12
Patch Published: 2012-07-10
CVE [?]: CVE-2012-1889
CPE [?]: cpe:/a:microsoft:xml_core_services
Exploited by Malware: True

Synopsis

Arbitrary code can be executed on the remote host through Microsoft XML Core Services.

Description

The version of Microsoft XML Core Services installed on the remote Windows host is affected by a remote code execution vulnerability that could allow arbitrary code execution if a user views a specially crafted web page using Internet Explorer.

Solution

Microsoft has released a set of patches for Windows XP, 2003, Vista, 2008, 7, and 2008 R2.

Public Exploits


Target Network Port(s): 139, 445
Target Asset(s): Host/patch_management_checks
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub, Immunity Canvas, Core Impact)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the MS12-043: Vulnerability in Microsoft XML Core Services Could Allow Remote Code Execution (2722479) vulnerability:

  1. Metasploit: exploit/windows/browser/msxml_get_definition_code_exec
    [MS12-043 Microsoft XML Core Services MSXML Uninitialized Memory Corruption]
  2. Exploit-DB: exploits/windows/remote/19186.rb
    [EDB-19186: Microsoft XML Core Services - MSXML Uninitialized Memory Corruption (MS12-043) (Metasploit)]
  3. GitHub: https://github.com/l-iberty/cve-2012-1889
    [CVE-2012-1889]
  4. GitHub: https://github.com/whu-enjoy/CVE-2012-1889
    [CVE-2012-1889: 这里保存着我学习CVE-2012-1889这个漏洞的利用所用到的文件]
  5. Immunity Canvas: CANVAS

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS V2 Vector [?]: AV:N/AC:M/Au:N/C:C/I:C/A:C/E:H/RL:OF/RC:C
CVSS Base Score:9.3 (High)
Impact Subscore:10.0
Exploitability Subscore:8.6
CVSS Temporal Score:8.1 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.1 (High)

Go back to menu.

Plugin Source


This is the smb_nt_ms12-043.nasl nessus plugin source code. This script is Copyright (C) 2012-2018 Tenable Network Security, Inc.

#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(59906);
  script_version("1.26");
  script_cvs_date("Date: 2018/11/15 20:50:31");

  script_cve_id("CVE-2012-1889");
  script_bugtraq_id(53934);
  script_xref(name:"MSFT", value:"MS12-043");
  script_xref(name:"MSKB", value:"2719985");
  script_xref(name:"MSKB", value:"2721691");
  script_xref(name:"MSKB", value:"2721693");
  script_xref(name:"MSKB", value:"2687324");
  script_xref(name:"MSKB", value:"2596856");
  script_xref(name:"MSKB", value:"2596679");
  script_xref(name:"MSKB", value:"2687497");
  script_xref(name:"MSKB", value:"2687627");

  script_name(english:"MS12-043: Vulnerability in Microsoft XML Core Services Could Allow Remote Code Execution (2722479)");
  script_summary(english:"Checks the versions of Msxml3.dll, Msxml4.dll, and Msxml6.dll");
  script_set_attribute(
    attribute:"synopsis",
    value:
"Arbitrary code can be executed on the remote host through Microsoft
XML Core Services."
  );
  script_set_attribute(
    attribute:"description",
    value:
"The version of Microsoft XML Core Services installed on the remote
Windows host is affected by a remote code execution vulnerability
that could allow arbitrary code execution if a user views a specially
crafted web page using Internet Explorer."
  );
  script_set_attribute(attribute:"see_also", value:"https://docs.microsoft.com/en-us/security-updates/SecurityBulletins/2012/ms12-043");
  script_set_attribute(attribute:"see_also", value:"https://docs.microsoft.com/en-us/security-updates/SecurityAdvisories/2012/2719615");
  script_set_attribute(
    attribute:"solution",
    value:
"Microsoft has released a set of patches for Windows XP, 2003, Vista,
2008, 7, and 2008 R2."
  );
  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:H/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:"exploited_by_malware", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'MS12-043 Microsoft XML Core Services MSXML Uninitialized Memory Corruption');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
  script_set_attribute(attribute:"canvas_package", value:'CANVAS');

  script_set_attribute(attribute:"vuln_publication_date", value:"2012/06/12");
  script_set_attribute(attribute:"patch_publication_date", value:"2012/07/10");
  script_set_attribute(attribute:"plugin_publication_date", value:"2012/07/11");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:xml_core_services");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Windows : Microsoft Bulletins");

  script_copyright(english:"This script is Copyright (C) 2012-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("smb_hotfixes_fcheck.inc");
include("smb_hotfixes.inc");
include("smb_func.inc");
include("misc_func.inc");
include("audit.inc");

get_kb_item_or_exit("SMB/MS_Bulletin_Checks/Possible");

bulletin = 'MS12-043';
kbs = make_list("2719985", "2721691", "2721693", "2687324", "2596856", "2596679", "2687497", "2687627");

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(xp:'3', win2003:'2', vista:'2', win7:'0,1', win8:'0') <= 0) audit(AUDIT_OS_SP_NOT_VULN);
if (hotfix_check_server_core() == 1) audit(AUDIT_WIN_SERVER_CORE);

if (!is_accessible_share())  audit(AUDIT_SHARE_FAIL, 'is_accessible_share');

commonfiles = hotfix_get_commonfilesdir();
if (commonfiles)
  msxml5_dir = commonfiles + '\\Microsoft Shared\\Office11';

vuln = 0;

# Windows 8 / Server 2012
vuln += hotfix_is_vulnerable(os:"6.2", sp:0, file:"Msxml4.dll", version:"4.30.2114.0", min_version:"4.30.0.0",            dir:"\System32", bulletin:bulletin, kb:"2721691");

# Windows 7 / Server 2008 R2
vuln += hotfix_is_vulnerable(os:"6.1", sp:0, file:"Msxml3.dll", version:"8.110.7600.17036",                                  dir:"\System32", bulletin:bulletin, kb:"2719985");
vuln += hotfix_is_vulnerable(os:"6.1", sp:0, file:"Msxml3.dll", version:"8.110.7600.21227", min_version:"8.110.7600.21000",  dir:"\System32", bulletin:bulletin, kb:"2719985");
vuln += hotfix_is_vulnerable(os:"6.1", sp:1, file:"Msxml3.dll", version:"8.110.7601.17857", min_version:"8.110.7601.17000",  dir:"\System32", bulletin:bulletin, kb:"2719985");
vuln += hotfix_is_vulnerable(os:"6.1", sp:1, file:"Msxml3.dll", version:"8.110.7601.22012", min_version:"8.110.7601.22000",  dir:"\System32", bulletin:bulletin, kb:"2719985");
vuln += hotfix_is_vulnerable(os:"6.1",       file:"Msxml4.dll", version:"4.30.2114.0", min_version:"4.30.0.0",            dir:"\System32", bulletin:bulletin, kb:"2721691");
vuln += hotfix_is_vulnerable(os:"6.1", sp:0, file:"Msxml6.dll", version:"6.30.7600.17036",                                   dir:"\System32", bulletin:bulletin, kb:"2719985");
vuln += hotfix_is_vulnerable(os:"6.1", sp:0, file:"Msxml6.dll", version:"6.30.7600.21227",  min_version:"6.30.7600.21000",   dir:"\System32", bulletin:bulletin, kb:"2719985");
vuln += hotfix_is_vulnerable(os:"6.1", sp:1, file:"Msxml6.dll", version:"6.30.7601.17857",  min_version:"6.30.7601.17000",   dir:"\System32", bulletin:bulletin, kb:"2719985");
vuln += hotfix_is_vulnerable(os:"6.1", sp:1, file:"Msxml6.dll", version:"6.30.7601.22012",  min_version:"6.30.7601.22000",   dir:"\System32", bulletin:bulletin, kb:"2719985");

# Vista / Windows Server 2008
vuln += hotfix_is_vulnerable(os:"6.0", sp:2, file:"Msxml3.dll", version:"8.100.5005.0",                               dir:"\System32", bulletin:bulletin, kb:"2719985");
vuln += hotfix_is_vulnerable(os:"6.0", sp:2, file:"Msxml4.dll", version:"4.30.2114.0", min_version:"4.30.0.0",     dir:"\System32", bulletin:bulletin, kb:"2721691");
vuln += hotfix_is_vulnerable(os:"6.0", sp:2, file:"Msxml6.dll", version:"6.20.5005.0",                                dir:"\System32", bulletin:bulletin, kb:"2719985");

# Windows 2003 and XP x64
vuln += hotfix_is_vulnerable(os:"5.2", sp:2, file:"Msxml3.dll", version:"8.100.1052.0",                               dir:"\System32", bulletin:bulletin, kb:"2719985");
vuln += hotfix_is_vulnerable(os:"5.2", sp:2, file:"Msxml4.dll", version:"4.30.2114.0", min_version:"4.30.0.0",     dir:"\System32", bulletin:bulletin, kb:"2721691");
vuln += hotfix_is_vulnerable(os:"5.2", sp:2, file:"Msxml6.dll", version:"6.20.2012.0",                                dir:"\System32", bulletin:bulletin, kb:"2721693");

# Windows XP
vuln += hotfix_is_vulnerable(os:"5.1", sp:3, file:"Msxml3.dll", version:"8.100.1053.0",                               dir:"\System32", bulletin:bulletin, kb:"2719985");
vuln += hotfix_is_vulnerable(os:"5.1", sp:3, file:"Msxml4.dll", version:"4.30.2114.0", min_version:"4.30.0.0",     dir:"\System32", bulletin:bulletin, kb:"2721691");
vuln += hotfix_is_vulnerable(os:"5.1", sp:3, file:"Msxml6.dll", version:"6.20.2501.0",                                dir:"\System32", bulletin:bulletin, kb:"2719985");

# XML Core Services 5 (this could be one of three KBs - KB2687324, KB2596856, KB2596679)
# Update: KBs KB2687324 and KB2596679 are replaced by KB2687627 and KB2687497 respectively.
if (msxml5_dir)
  vuln += hotfix_is_vulnerable(path:msxml5_dir, file:"Msxml5.dll", version:"5.20.1096.0", min_version:"5.0.0.0", bulletin:bulletin);

if (vuln > 0)
{
  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');
}

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/smb_nt_ms12-043.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\smb_nt_ms12-043.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/smb_nt_ms12-043.nasl

Go back to menu.

How to Run


Here is how to run the MS12-043: Vulnerability in Microsoft XML Core Services Could Allow Remote Code Execution (2722479) as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Windows : Microsoft Bulletins plugin family.
  6. On the right side table select MS12-043: Vulnerability in Microsoft XML Core Services Could Allow Remote Code Execution (2722479) plugin ID 59906.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl smb_nt_ms12-043.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a smb_nt_ms12-043.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - smb_nt_ms12-043.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state smb_nt_ms12-043.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: MSKB | Microsoft Knowledge Base: MSFT | Microsoft Security Bulletin:
  • MS12-043
See also: Similar and related Nessus plugins:
  • 57470 - MS12-002: Vulnerability in Windows Object Packager Could Allow Remote Code Execution (2603381)
  • 57472 - MS12-004: Vulnerabilities in Windows Media Could Allow Remote Code Execution (2636391)
  • 57473 - MS12-005: Vulnerability in Microsoft Windows Could Allow Remote Code Execution (2584146)
  • 57474 - MS12-006: Vulnerability in SSL/TLS Could Allow Information Disclosure (2643584)
  • 57942 - MS12-008: Vulnerabilities in Windows Kernel-Mode Drivers Could Allow Remote Code Execution (2660465)
  • 57943 - MS12-009: Vulnerabilities in Ancillary Function Driver Could Allow Elevation of Privilege (2645640)
  • 57948 - MS12-014: Vulnerability in Indeo Codec Could Allow Remote Code Execution (2661637)
  • 58332 - MS12-020: Vulnerabilities in Remote Desktop Could Allow Remote Code Execution (2671387)
  • 58657 - MS12-025: Vulnerability in .NET Framework Could Allow Remote Code Execution (2671605)
  • 58659 - MS12-027: Vulnerability in Windows Common Controls Could Allow Remote Code Execution (2664258)
  • 59037 - MS12-029: Vulnerability in Microsoft Word Could Allow Remote Code Execution (2680352)
  • 59042 - MS12-034: Combined Security Update for Microsoft Office, Windows, .NET Framework, and Silverlight (2681578)
  • 59455 - MS12-037: Cumulative Security Update for Internet Explorer (2699988)
  • 59457 - MS12-039: Vulnerabilities in Lync Could Allow Remote Code Execution (2707956)
  • 59460 - MS12-042: Vulnerabilities in Windows Kernel Could Allow Elevation of Privilege (2711167)
  • 59912 - MS12-049: Vulnerability in TLS Could Allow Information Disclosure (2655992)
  • 59913 - MS12-050: Vulnerabilities in SharePoint Could Allow Elevation of Privilege (2695502)
  • 61533 - MS12-058: Vulnerabilities in Microsoft Exchange Server WebReady Document Viewing Could Allow Remote Code Execution (2740358)
  • 61535 - MS12-060: Vulnerability in Windows Common Controls Could Allow Remote Code Execution (2720573)
  • 62223 - MS12-063: Cumulative Security Update for Internet Explorer (2744842)
  • 62462 - MS12-067: Vulnerabilities in FAST Search Server 2010 for SharePoint Parsing Could Allow Remote Code Execution (2742321)
  • 62905 - MS12-073: Vulnerabilities in Microsoft Internet Information Services (IIS) Could Allow Information Disclosure (2733829)
  • 59046 - MS12-029 / MS12-030: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (2680352 / 2663830) (Mac OS X)
  • 58435 - MS12-020: Vulnerabilities in Remote Desktop Could Allow Remote Code Execution (2671387) (uncredentialed check)
  • 58751 - SSL/TLS Protocol Initialization Vector Implementation Information Disclosure Vulnerability (BEAST)
  • 60016 - Vulnerability in TLS Could Allow Information Disclosure (2655992) (uncredentialed check)
  • 63420 - MS13-002: Vulnerabilities in Microsoft XML Core Services Could Allow Remote Code Execution (2756145)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file smb_nt_ms12-043.nasl version 1.26. For more plugins, visit the Nessus Plugin Library.

Go back to menu.