MS11-021: Vulnerabilities in Microsoft Excel Could Allow Remote Code Execution (2489279) - Nessus

High   Plugin ID: 53378

This page contains detailed information about the MS11-021: Vulnerabilities in Microsoft Excel Could Allow Remote Code Execution (2489279) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 53378
Name: MS11-021: Vulnerabilities in Microsoft Excel Could Allow Remote Code Execution (2489279)
Filename: smb_nt_ms11-021.nasl
Vulnerability Published: 2011-02-07
This Plugin Published: 2011-04-13
Last Modification Time: 2018-11-15
Plugin Version: 1.27
Plugin Type: local
Plugin Family: Windows : Microsoft Bulletins
Dependencies: ms_bulletin_checks_possible.nasl, office_installed.nasl, smb_hotfixes.nasl, smb_nt_ms02-031.nasl
Required KB Items [?]: SMB/MS_Bulletin_Checks/Possible

Vulnerability Information


Severity: High
Vulnerability Published: 2011-02-07
Patch Published: 2011-04-12
CVE [?]: CVE-2011-0097, CVE-2011-0098, CVE-2011-0101, CVE-2011-0103, CVE-2011-0104, CVE-2011-0105, CVE-2011-0978, CVE-2011-0979, CVE-2011-0980
CPE [?]: cpe:/a:microsoft:excel, cpe:/a:microsoft:excel_viewer, cpe:/a:microsoft:office, cpe:/a:microsoft:office_compatibility_pack
Exploited by Malware: True

Synopsis

Arbitrary code can be executed on the remote host through Microsoft Excel.

Description

The remote Windows host is running a version of Microsoft Excel or Excel Viewer that is affected by several vulnerabilities.

If an attacker can trick a user on the affected host into opening a specially crafted Excel file, they could leverage this issue to execute arbitrary code subject to the user's privileges.

Solution

Microsoft has released a set of patches for Office XP, 2003, 2007, 2010, Excel Viewer, and Office Compatability Pack.

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 MS11-021: Vulnerabilities in Microsoft Excel Could Allow Remote Code Execution (2489279) vulnerability:

  1. Metasploit: exploit/windows/fileformat/ms11_021_xlb_bof
    [MS11-021 Microsoft Office 2007 Excel .xlb Buffer Overflow]
  2. Exploit-DB: exploits/windows/dos/17227.py
    [EDB-17227: Microsoft Excel - Axis Properties Record Parsing Buffer Overflow (PoC) (MS11-02)]
  3. Exploit-DB: exploits/windows/local/18067.txt
    [EDB-18067: Microsoft Excel 2007 SP2 - Buffer Overwrite (MS11-021)]
  4. Exploit-DB: exploits/windows/local/18087.rb
    [EDB-18087: Microsoft Excel 2007 - '.xlb' Local Buffer Overflow (MS11-021) (Metasploit)]
  5. GitHub: https://github.com/offensive-security/exploitdb-bin-sploits/blob/master/bin-sploits/18067.zip
    [EDB-18067]
  6. Immunity Canvas: White_Phosphorus

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_ms11-021.nasl nessus plugin source code. This script is Copyright (C) 2011-2018 Tenable Network Security, Inc.

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

include("compat.inc");

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

  script_cve_id(
    "CVE-2011-0097",
    "CVE-2011-0098",
    "CVE-2011-0101",
    "CVE-2011-0103",
    "CVE-2011-0104",
    "CVE-2011-0105",
    "CVE-2011-0978",
    "CVE-2011-0979",
    "CVE-2011-0980"
  );
  script_bugtraq_id(46225, 46226, 46229, 47201, 47235, 47243, 47244, 47245, 47256);
  script_xref(name:"EDB-ID", value:"18067");
  script_xref(name:"EDB-ID", value:"18087");
  script_xref(name:"MSFT", value:"MS11-021");
  script_xref(name:"MSKB", value:"2464583");
  script_xref(name:"MSKB", value:"2466146");
  script_xref(name:"MSKB", value:"2466156");
  script_xref(name:"MSKB", value:"2466158");
  script_xref(name:"MSKB", value:"2466169");
  script_xref(name:"MSKB", value:"2502786");

  script_name(english:"MS11-021: Vulnerabilities in Microsoft Excel Could Allow Remote Code Execution (2489279)");
  script_summary(english:"Checks version of Excel");

  script_set_attribute(
    attribute:"synopsis",
    value:
"Arbitrary code can be executed on the remote host through Microsoft
Excel."
  );
  script_set_attribute(
    attribute:"description",
    value:
"The remote Windows host is running a version of Microsoft Excel or
Excel Viewer that is affected by several vulnerabilities.

If an attacker can trick a user on the affected host into opening a
specially crafted Excel file, they could leverage this issue to
execute arbitrary code subject to the user's privileges."
  );
  script_set_attribute(attribute:"see_also", value:"https://docs.microsoft.com/en-us/security-updates/SecurityBulletins/2011/ms11-021");
  script_set_attribute(
    attribute:"solution",
    value:
"Microsoft has released a set of patches for Office XP, 2003, 2007,
2010, Excel Viewer, and Office Compatability Pack."
  );
  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:'MS11-021 Microsoft Office 2007 Excel .xlb Buffer Overflow');
  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:'White_Phosphorus');

  script_set_attribute(attribute:"vuln_publication_date", value:"2011/02/07");
  script_set_attribute(attribute:"patch_publication_date", value:"2011/04/12");
  script_set_attribute(attribute:"plugin_publication_date", value:"2011/04/13");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:office");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:excel");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:excel_viewer");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:office_compatibility_pack");
  script_end_attributes();

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

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

  script_dependencies("smb_nt_ms02-031.nasl", "office_installed.nasl", "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 = 'MS11-021';
kbs = make_list("2464583", "2466146", "2466156", "2466158", "2466169", "2502786");
if (get_kb_item("Host/patch_management_checks")) hotfix_check_3rd_party(bulletin:bulletin, kbs:kbs, severity:SECURITY_HOLE);

info = "";


# Excel.
vuln = 0;
installs = get_kb_list("SMB/Office/Excel/*/ProductPath");
if (!isnull(installs))
{
  foreach install (keys(installs))
  {
    version = install - 'SMB/Office/Excel/' - '/ProductPath';
    path = installs[install];

    ver = split(version, sep:'.', keep:FALSE);
    for (i=0; i<max_index(ver); i++)
      ver[i] = int(ver[i]);

    # Excel 2010.
    office_sp = get_kb_item("SMB/Office/2010/SP");
    if (
      (!isnull(office_sp) && office_sp == 0) &&
      (
        (ver[0] == 14 && ver[1] == 0 && ver[2] < 5130) ||
        (ver[0] == 14 && ver[1] == 0 && ver[2] == 5130 && ver[3] < 5003)
      )
    )
    {
      vuln++;
      info =
        '\n  Product           : Excel 2010' +
        '\n  File              : ' + path +
        '\n  Installed version : ' + version +
        '\n  Fixed version     : 14.0.5130.5003\n';
      hotfix_add_report(info, bulletin:bulletin, kb:'2466146');
    }
    # Excel 2007.
    office_sp = get_kb_item("SMB/Office/2007/SP");
    if (
      (!isnull(office_sp) && office_sp == 2) &&
      (
        (ver[0] == 12 && ver[1] == 0 && ver[2] < 6550) ||
        (ver[0] == 12 && ver[1] == 0 && ver[2] == 6550 && ver[3] < 5004)
      )
    )
    {
      vuln++;
      info =
        '\n  Product           : Excel 2007' +
        '\n  File              : ' + path +
        '\n  Installed version : ' + version +
        '\n  Fixed version     : 12.0.6550.5004\n';
      hotfix_add_report(info, bulletin:bulletin, kb:"2464583");
    }
    # Excel 2003.
    office_sp = get_kb_item("SMB/Office/2003/SP");
    if (
      (!isnull(office_sp) && office_sp == 3) &&
      (ver[0] == 11 && ver[1] == 0 && ver[2] < 8332)
    )
    {
      vuln++;
      info =
        '\n  Product           : Excel 2003' +
        '\n  File              : ' + path +
        '\n  Installed version : ' + version +
        '\n  Fixed version     : 11.0.8332.0\n';
      hotfix_add_report(info, bulletin:bulletin, kb:"2502786");
    }
    # Excel 2002.
    if (
      (!isnull(office_sp) && office_sp == 3) &&
      (ver[0] == 10 && ver[1] == 0 && ver[2] < 6869)
    )
    {
      vuln++;
      info =
        '\n  Product           : Excel 2002' +
        '\n  File              : ' + path +
        '\n  Installed version : ' + version +
        '\n  Fixed version     : 10.0.6869.0\n';

      hotfix_add_report(info, bulletin:bulletin, kb:"2466169");
    }
  }
}

# Excel Viewer.
installs = get_kb_list("SMB/Office/ExcelViewer/*/ProductPath");
if (!isnull(installs))
{
  foreach install (keys(installs))
  {
    version = install - 'SMB/Office/ExcelViewer/' - '/ProductPath';
    path = installs[install];
    path = 'n/a';

    ver = split(version, sep:'.', keep:FALSE);
    for (i=0; i<max_index(ver); i++)
      ver[i] = int(ver[i]);

    # Excel Viewer.
    if (
      ver[0] == 12 && ver[1] == 0 &&
      (
        ver[2] < 6550 ||
        (ver[2] == 6550 && ver[3] < 5004)
      )
    )
    {
      vuln++;
      info =
        '\n  Product           : Excel Viewer' +
        '\n  File              : '+ path +
        '\n  Installed version : '+ version +
        '\n  Fixed version     : 12.0.6550.5004\n';
      hotfix_add_report(info, bulletin:bulletin, kb:"2466158");
      break;
    }
  }
}


# 2007 Microsoft Office system and the Microsoft Office Compatibility Pack.
installs = get_kb_list("SMB/Office/ExcelCnv/*/ProductPath");
if (!isnull(installs))
{
  foreach install (keys(installs))
  {
    version = install - 'SMB/Office/ExcelCnv/' - '/ProductPath';
    path = installs[install];

    ver = split(version, sep:'.', keep:FALSE);
    for (i=0; i<max_index(ver); i++)
      ver[i] = int(ver[i]);

    # 2007 Office system and the Office Compatibility Pack.
    if (
      ver[0] == 12 && ver[1] == 0 &&
      (
        ver[2] < 6550 ||
        (ver[2] == 6550 && ver[3] < 5004)
      )
    )
    {
      vuln++;
      info =
        '\n  Product           : 2007 Office system and the Office Compatibility Pack' +
        '\n  File              : '+ path +
        '\n  Installed version : '+ version +
        '\n  Fixed version     : 12.0.6550.5004\n';
      hotfix_add_report(info, bulletin:bulletin, kb:"2466156");
      break;
    }
  }
}

if (vuln)
{
  set_kb_item(name:"SMB/Missing/"+bulletin, value:TRUE);
  hotfix_security_hole();
  exit(0);
}
else 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_ms11-021.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\smb_nt_ms11-021.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/smb_nt_ms11-021.nasl

Go back to menu.

How to Run


Here is how to run the MS11-021: Vulnerabilities in Microsoft Excel Could Allow Remote Code Execution (2489279) 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 MS11-021: Vulnerabilities in Microsoft Excel Could Allow Remote Code Execution (2489279) plugin ID 53378.
  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_ms11-021.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a smb_nt_ms11-021.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_ms11-021.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_ms11-021.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: MSKB | Microsoft Knowledge Base: MSFT | Microsoft Security Bulletin:
  • MS11-021
See also: Similar and related Nessus plugins:
  • 53374 - MS11-021 / MS11-022 / MS11-023: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (2489279 / 2489283 / 2489293) (Mac OS X)
  • 51162 - MS10-090: Cumulative Security Update for Internet Explorer (2416400)
  • 51164 - MS10-092: Vulnerability in Task Scheduler Could Allow Elevation of Privilege (2305420)
  • 51165 - MS10-093: Vulnerability in Windows Movie Maker Could Allow Remote Code Execution (2424434)
  • 51168 - MS10-096: Vulnerability in Windows Address Book Could Allow Remote Code Execution (2423089)
  • 51169 - MS10-097: Insecure Library Loading in Internet Connection Signup Wizard Could Allow Remote Code Execution (2443105)
  • 51170 - MS10-098: Vulnerabilities in Windows Kernel-Mode Drivers Could Allow Elevation of Privilege (2436673)
  • 51174 - MS10-102: Vulnerability in Hyper-V Could Allow Denial of Service (2345316)
  • 51176 - MS10-104: Vulnerability in Microsoft SharePoint Could Allow Remote Code Execution (2455005)
  • 51454 - MS11-001: Vulnerability in Windows Backup Manager Could Allow Remote Code Execution (2478935)
  • 51455 - MS11-002: Vulnerabilities in Microsoft Data Access Components Could Allow Remote Code Execution (2451910)
  • 51903 - MS11-003: Cumulative Security Update for Internet Explorer (2482017)
  • 51904 - MS11-004: Vulnerability in Internet Information Services (IIS) FTP Service Could Allow Remote Code Execution (2489256)
  • 51906 - MS11-006: Vulnerability in Windows Shell Graphics Processing Could Allow Remote Code Execution (2483185)
  • 51911 - MS11-011: Vulnerabilities in Windows Kernel Could Allow Elevation of Privilege (2393802)
  • 52584 - MS11-016: Vulnerability in Microsoft Groove Could Allow Remote Code Execution (2494047)
  • 53376 - MS11-019: Vulnerabilities in SMB Client Could Allow Remote Code Execution (2511455)
  • 53377 - MS11-020: Vulnerability in SMB Server Could Allow Remote Code Execution (2508429)
  • 53381 - MS11-024: Vulnerability in Windows Fax Cover Page Editor Could Allow Remote Code Execution (2527308)
  • 53382 - MS11-025: Vulnerability in Microsoft Foundation Class (MFC) Library Could Allow Remote Code Execution (2500212)
  • 53383 - MS11-026: Vulnerability in MHTML Could Allow Information Disclosure (2503658)
  • 53384 - MS11-027: Cumulative Security Update of ActiveX Kill Bits (2508272)
  • 53386 - MS11-029: Vulnerability in GDI+ Could Allow Remote Code Execution (2489979)
  • 53389 - MS11-032: Vulnerability in the OpenType Compact Font Format (CFF) Driver Could Allow Remote Code Execution (2507618)
  • 53391 - MS11-034: Vulnerabilities in Windows Kernel-Mode Drivers Could Allow Elevation of Privilege (2506223)
  • 53858 - MS11-035: Vulnerability in WINS Could Allow Remote Code Execution (2524426)
  • 55123 - MS11-043: Vulnerability in SMB Client Could Allow Remote Code Execution (2536276)
  • 55125 - MS11-045: Vulnerabilities in Microsoft Excel Could Allow Remote Code Execution (2537146)
  • 55126 - MS11-046: Vulnerability in Ancillary Function Driver Could Allow Elevation of Privilege (2503665)
  • 55127 - MS11-047: Vulnerability in Hyper-V Could Allow Denial of Service (2525835)
  • 55128 - MS11-048: Vulnerability in SMB Server Could Allow Denial of Service (2536275)
  • 55130 - MS11-050: Cumulative Security Update for Internet Explorer (2530548)
  • 55570 - MS11-054: Vulnerabilities in Windows Kernel-Mode Drivers Could Allow Elevation of Privilege (2555917)
  • 55571 - MS11-055: Vulnerability in Microsoft Visio Could Allow Remote Code Execution (2560847)
  • 55792 - MS11-062: Vulnerability in Remote Access Service NDISTAPI Driver Could Allow Elevation of Privilege (2566454)

Version


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

Go back to menu.