MS09-067 / MS09-068: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (972652 / 976307) (Mac OS X) - Nessus

High   Plugin ID: 50063

This page contains detailed information about the MS09-067 / MS09-068: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (972652 / 976307) (Mac OS X) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 50063
Name: MS09-067 / MS09-068: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (972652 / 976307) (Mac OS X)
Filename: macosx_ms_office_nov2009.nasl
Vulnerability Published: 2009-11-10
This Plugin Published: 2010-10-20
Last Modification Time: 2022-03-08
Plugin Version: 1.23
Plugin Type: local
Plugin Family: MacOS X Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/MacOSX/packages, Host/uname

Vulnerability Information


Severity: High
Vulnerability Published: 2009-11-10
Patch Published: 2009-11-10
CVE [?]: CVE-2009-3127, CVE-2009-3129, CVE-2009-3130, CVE-2009-3131, CVE-2009-3132, CVE-2009-3133, CVE-2009-3134, CVE-2009-3135
CPE [?]: cpe:/a:microsoft:office:2004::mac, cpe:/a:microsoft:office:2008::mac, cpe:/a:microsoft:open_xml_file_format_converter:::mac
Exploited by Malware: True

Synopsis

An application installed on the remote Mac OS X host is affected by multiple remote code execution vulnerabilities.

Description

The remote Mac OS X host is running a version of Microsoft Office that is affected by several vulnerabilities.

If an attacker can trick a user on the affected host into opening a specially crafted Excel or Word file, these issues could be leveraged to execute arbitrary code subject to the user's privileges.

Solution

Microsoft has released a set of patches for Office 2004 for Mac, Office 2008 for Mac, and Open XML File Format Converter for Mac.

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (Metasploit Framework, Exploit-DB, Core Impact)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the MS09-067 / MS09-068: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (972652 / 976307) (Mac OS X) vulnerability:

  1. Metasploit: exploit/windows/fileformat/ms09_067_excel_featheader
    [MS09-067 Microsoft Excel Malformed FEATHEADER Record Vulnerability]
  2. Exploit-DB: exploits/windows/local/14706.py
    [EDB-14706: Microsoft Excel - FEATHEADER Record (MS09-067)]
  3. Exploit-DB: exploits/windows/local/16625.rb
    [EDB-16625: Microsoft Excel - Malformed FEATHEADER Record (MS09-067) (Metasploit)]

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 Score Source [?]: CVE-2009-3135
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 macosx_ms_office_nov2009.nasl nessus plugin source code. This script is Copyright (C) 2010-2022 Tenable Network Security, Inc.

#TRUSTED 15a19d9da3b507622bcecc7ab61266f1baffbb0e81a8614533f9837363e5378883f760426cb20334a1d9a0ad6ea5733347dbd82c9781b0a0a0146641a3d6480924f9cf7bc0f9fd932bc426803fd222df190c5bc5e32606ba1928e8fec19d549c94a490fd2cd5e2a2d84b6b476b94cb64df364c1702fb189d7cb24049f27458f7c460a62d05654260ce24c63963156dc4f67d92bb0b71b7e25f08fb76d0515b93f61c09dc159e10e6ae0b00fb3b2b72b2b6b05c09ebed63ebe675d5e0a5d0251e90a03c725bcd25b8e70beec44a8de39812c165210cebf97e13a5a2d23d21224603671d0f587097e570654b1795d889115b8a68ffefc313c4901cd465cad94c9cdf2db7dd4441408d6f8f71d77373b962b905fe38a6be78d4ec3588b45ba97817c5fd4d71bbcf15334f6b6611b2a546569790b2f97a96913b183250bbebc8e946a9111cf7f3b46b735b3693f48aebc8f9c84a204f19b76c66eb16336b3912b6ef140bd89781105796c7cdb0b9c8cee1e9de49cc0619b5d6e35b0491fb35778c267db05928cbdfe10db85252ec57f5bacf568a8fc5d258d977e20bd029f1f07dca5cb7076d02fad9f046059db9d0746e2fabb8047ff6f39fdc5d19d43bf860a1495c94de82ecabf8e95c455b30d6b4b3675e54cd26eb0403648d8f58c8afdf759f6ceb13a6584b1774ff1d5bc639f1e7f36ef44dda581bf1fd50d6c4ed816ab90b
#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(50063);
  script_version("1.23");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/03/08");

  script_cve_id(
    "CVE-2009-3127",
    "CVE-2009-3129",
    "CVE-2009-3130",
    "CVE-2009-3131",
    "CVE-2009-3132",
    "CVE-2009-3133",
    "CVE-2009-3134",
    "CVE-2009-3135"
  );
  script_bugtraq_id(
    36908,
    36909,
    36911,
    36912,
    36943,
    36945,
    36946,
    36950
  );
  script_xref(name:"MSFT", value:"MS09-067");
  script_xref(name:"MSFT", value:"MS09-068");
  script_xref(name:"MSKB", value:"972652");
  script_xref(name:"MSKB", value:"976307");
  script_xref(name:"MSKB", value:"976828");
  script_xref(name:"MSKB", value:"976830");
  script_xref(name:"MSKB", value:"976831");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/03/24");

  script_name(english:"MS09-067 / MS09-068: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (972652 / 976307) (Mac OS X)");

  script_set_attribute(attribute:"synopsis", value:
"An application installed on the remote Mac OS X host is affected by
multiple remote code execution vulnerabilities.");
  script_set_attribute(attribute:"description", value:
"The remote Mac OS X host is running a version of Microsoft Office that
is affected by several vulnerabilities.

If an attacker can trick a user on the affected host into opening a
specially crafted Excel or Word file, these issues could be leveraged
to execute arbitrary code subject to the user's privileges.");
  script_set_attribute(attribute:"see_also", value:"http://technet.microsoft.com/en-us/security/bulletin/ms09-067");
  script_set_attribute(attribute:"see_also", value:"http://technet.microsoft.com/en-us/security/bulletin/ms09-068");
  script_set_attribute(attribute:"solution", value:
"Microsoft has released a set of patches for Office 2004 for Mac,
Office 2008 for Mac, and Open XML File Format Converter for Mac.");
  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:"cvss_score_source", value:"CVE-2009-3135");

  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:'MS09-067 Microsoft Excel Malformed FEATHEADER Record Vulnerability');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_cwe_id(94);

  script_set_attribute(attribute:"vuln_publication_date", value:"2009/11/10");
  script_set_attribute(attribute:"patch_publication_date", value:"2009/11/10");
  script_set_attribute(attribute:"plugin_publication_date", value:"2010/10/20");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:office:2004::mac");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:office:2008::mac");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:open_xml_file_format_converter:::mac");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"MacOS X Local Security Checks");

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

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/MacOSX/packages", "Host/uname");

  exit(0);
}


include("misc_func.inc");
include("ssh_func.inc");
include("macosx_func.inc");



if(sshlib::get_support_level() >= sshlib::SSH_LIB_SUPPORTS_COMMANDS)
  enable_ssh_wrappers();
else disable_ssh_wrappers();

function exec(cmd)
{
  local_var buf, ret;

  if (islocalhost())
    buf = pread(cmd:"/bin/bash", argv:make_list("bash", "-c", cmd));
  else
  {
    ret = ssh_open_connection();
    if (!ret) exit(1, "ssh_open_connection() failed.");
    buf = ssh_cmd(cmd:cmd);
    ssh_close_connection();
  }
  return buf;
}


packages = get_kb_item("Host/MacOSX/packages");
if (!packages) exit(1, "The 'Host/MacOSX/packages' KB item is missing.");

uname = get_kb_item("Host/uname");
if (!uname) exit(1, "The 'Host/uname' KB item is missing.");
if (!egrep(pattern:"Darwin.*", string:uname)) exit(1, "The host does not appear to be using the Darwin sub-system.");


# Gather version info.
info = '';
installs = make_array();

prod = 'Office 2008 for Mac';
plist = "/Applications/Microsoft Office 2008/Office/MicrosoftComponentPlugin.framework/Versions/12/Resources/Info.plist";
cmd =  'cat \'' + plist + '\' | ' +
  'grep -A 1 CFBundleShortVersionString | ' +
  'tail -n 1 | ' +
  'sed \'s/.*string>\\(.*\\)<\\/string>.*/\\1/g\'';
version = exec(cmd:cmd);
if (version && version =~ "^[0-9]+\.")
{
  version = chomp(version);
  if (version !~ "^12\.") exit(1, "Failed to get the version for "+prod+" - '"+version+"'.");

  installs[prod] = version;

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

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

  for (i=0; i<max_index(fix); i++)
    if ((ver[i] < fix[i]))
    {
      info +=
        '\n  Product           : ' + prod +
        '\n  Installed version : ' + version +
        '\n  Fixed version     : ' + fixed_version + '\n';
      break;
    }
    else if (ver[i] > fix[i])
      break;
}

prod = 'Office 2004 for Mac';
cmd = GetCarbonVersionCmd(file:"Microsoft Component Plugin", path:"/Applications/Microsoft Office 2004/Office");
version = exec(cmd:cmd);
if (version && version =~ "^[0-9]+\.")
{
  version = chomp(version);
  if (version !~ "^11\.") exit(1, "Failed to get the version for "+prod+" - '"+version+"'.");

  installs[prod] = version;

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

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

  for (i=0; i<max_index(fix); i++)
    if ((ver[i] < fix[i]))
    {
      info +=
        '\n  Product           : ' + prod +
        '\n  Installed version : ' + version +
        '\n  Fixed version     : ' + fixed_version + '\n';
      break;
    }
    else if (ver[i] > fix[i])
      break;
}

prod = 'Open XML File Format Converter for Mac';
plist = "/Applications/Open XML Converter.app/Contents/Info.plist";
cmd =  'cat \'' + plist + '\' | ' +
  'grep -A 1 CFBundleShortVersionString | ' +
  'tail -n 1 | ' +
  'sed \'s/.*string>\\(.*\\)<\\/string>.*/\\1/g\'';
version = exec(cmd:cmd);
if (version && version =~ "^[0-9]+\.")
{
  version = chomp(version);
  installs[prod] = version;

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

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

  for (i=0; i<max_index(fix); i++)
    if ((ver[i] < fix[i]))
    {
      info +=
        '\n  Product           : ' + prod +
        '\n  Installed version : ' + version +
        '\n  Fixed version     : ' + fixed_version + '\n';
      break;
    }
    else if (ver[i] > fix[i])
      break;
}


# Report findings.
if (info)
{
  gs_opt = get_kb_item("global_settings/report_verbosity");
  if (gs_opt && gs_opt != 'Quiet') security_hole(port:0, extra:info);
  else security_hole(0);

  exit(0);
}
else
{
  if (max_index(keys(installs)) == 0) exit(0, "Office for Mac / Open XML File Format Converter is not installed.");
  else
  {
    msg = 'The host has ';
    foreach prod (sort(keys(installs)))
      msg += prod + ' ' + installs[prod] + ' and ';
    msg = substr(msg, 0, strlen(msg)-1-strlen(' and '));

    msg += ' installed and thus is not affected.';

    exit(0, msg);
  }
}

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

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

Go back to menu.

How to Run


Here is how to run the MS09-067 / MS09-068: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (972652 / 976307) (Mac OS X) 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 MacOS X Local Security Checks plugin family.
  6. On the right side table select MS09-067 / MS09-068: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (972652 / 976307) (Mac OS X) plugin ID 50063.
  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 macosx_ms_office_nov2009.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

/opt/nessus/bin/nasl -T - macosx_ms_office_nov2009.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 macosx_ms_office_nov2009.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: MSKB | Microsoft Knowledge Base: MSFT | Microsoft Security Bulletin:
  • MS09-067, MS09-068
CWE | Common Weakness Enumeration:
  • CWE-94 (Weakness) Improper Control of Generation of Code ('Code Injection')
See also: Similar and related Nessus plugins:
  • 42441 - MS09-067: Vulnerabilities in Microsoft Office Excel Could Allow Remote Code Execution (972652)
  • 50062 - MS09-017 / MS09-021 / MS09-027: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (967340 / 969462 / 969514) (Mac OS X)
  • 40825 - MS09-053: Microsoft IIS FTPd NLST Command Remote Buffer Overflow (975191) (uncredentialed check)
  • 40887 - MS09-050: Microsoft Windows SMB2 _Smb2ValidateProviderCallback() Vulnerability (975497) (EDUCATEDSCHOLAR) (uncredentialed check)
  • 35362 - MS09-001: Microsoft Windows SMB Vulnerabilities Remote Code Execution (958687) (uncredentialed check)
  • 35635 - MS09-004: Vulnerability in Microsoft SQL Server Could Allow Remote Code Execution (959420) (uncredentialed check)
  • 39622 - MS09-032: Cumulative Security Update of ActiveX Kill Bits (973346)
  • 39783 - MS09-043: Vulnerabilities in Microsoft Office Web Components Control Could Allow Remote Code Execution (973472)
  • 35361 - MS09-001: Vulnerabilities in SMB Could Allow Remote Code Execution (958687)
  • 35630 - MS09-002: Cumulative Security Update for Internet Explorer (961260)
  • 35632 - MS09-004: Vulnerability in Microsoft SQL Server Could Allow Remote Code Execution (959420)
  • 36148 - MS09-010: Vulnerabilities in WordPad and Office Text Converters Could Allow Remote Code Execution (960477)
  • 36150 - MS09-012: Vulnerabilities in Windows Could Allow Elevation of Privilege (959454)
  • 36152 - MS09-014: Cumulative Security Update for Internet Explorer (963027)
  • 39341 - MS09-019: Cumulative Security Update for Internet Explorer (969897)
  • 39342 - MS09-020: Vulnerabilities in Internet Information Services (IIS) Could Allow Elevation of Privilege (970483)
  • 39344 - MS09-022: Vulnerabilities in Windows Print Spooler Could Allow Remote Code Execution (961501)
  • 39349 - MS09-027: Vulnerabilities in Microsoft Office Word Could Allow Remote Code Execution (969514)
  • 39791 - MS09-028: Vulnerabilities in Microsoft DirectShow Could Allow Remote Code Execution (971633)
  • 40556 - MS09-037: Vulnerabilities in Microsoft Active Template Library (ATL) Could Allow Remote Code Execution (973908)
  • 40562 - MS09-043: Vulnerabilities in Microsoft Office Web Components Could Allow Remote Code Execution (957638)
  • 40891 - MS09-048: Vulnerabilities in Windows TCP/IP Could Allow Remote Code Execution (967723)
  • 42106 - MS09-050: Vulnerabilities in SMBv2 Could Allow Remote Code Execution (975517) (EDUCATEDSCHOLAR)
  • 42107 - MS09-051: Vulnerabilities in Windows Media Runtime Could Allow Remote Code Execution (975682)
  • 42109 - MS09-053: Vulnerabilities in FTP Service for Internet Information Services Could Allow Remote Code Execution (975254)
  • 42110 - MS09-054: Cumulative Security Update for Internet Explorer (974455)
  • 42112 - MS09-056: Vulnerabilities in Windows CryptoAPI Could Allow Spoofing (974571)
  • 42117 - MS09-061: Vulnerabilities in the Microsoft .NET Common Language Runtime Could Allow Remote Code Execution (974378)
  • 42439 - MS09-065: Vulnerabilities in Windows Kernel-Mode Drivers Could Allow Remote Code Execution (969947)
  • 43064 - MS09-072: Cumulative Security Update for Internet Explorer (976325)
  • 108811 - Windows Server 2008 Critical RCE Vulnerabilities (uncredentialed) (PCI/DSS)

Version


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

Go back to menu.