MS15-081: Vulnerability in Microsoft Office Could Allow Remote Code Execution (3072620) (Mac OS X)

2015-08-12T00:00:00
ID MACOSX_MS15-081_OFFICE_2011.NASL
Type nessus
Reporter Tenable
Modified 2018-08-10T00:00:00

Description

The remote Mac OS X host has a version of Microsoft Office installed that is affected by multiple remote code execution vulnerabilities :

  • Multiple remote code execution vulnerabilities exist due to improper handling of objects in memory. A remote attacker can exploit these vulnerabilities by convincing a user to open a specially crafted Office file, resulting in the execution of arbitrary code in the context of the current user. (CVE-2015-2468, CVE-2015-2469, CVE-2015-2477)

  • A remote code execution vulnerability exists when Office decreases an integer value beyond its intended minimum value. A remote attacker can exploit this vulnerability by convincing a user to open a specially crafted Office file, resulting in the execution of arbitrary code in the context of the current user. (CVE-2015-2470)

                                        
                                            #TRUSTED 69e5afca93ccfcfb1ca8d5a31f740b39d8a9e5910884c839f6f59d714c83d01f076fca0e3163a95f6fbbbc99e08a36f4cfe02ded01fddc6a9fe3ab434341eee355dbf05241dd377c94d2863cfd06e725b9eba8aeafe4d4e0e3968de26291dd391cbb61e290a599cf95b223375162b1f7e7f277d59c6d4abefb0c04bb84380fc975bcc9f1417d0ced0c58c200d264d504186ed2393d85d6d29ad21ab85172ecdae6979a1eb8f9f9576bb2fa435cabe2caa36cbc69739fb472beb5153880bf0d1de788cf9a018f95eddc58bd897d36e13b9c49f8adbf8e7cd6559b4ad74de45445321a7dcd96c66f1105b56c7110e65954b8cbdf91bec4490adadb6e020837fb9596a97e93e29ffcae85aca59a6e4eca19c0efea665bd1f048e90e59cee623ba2f919d22f5bd8b987ecb46e09cf9b478a13fe905633280e2c3a6f11414955d70cd909172a21140e87c0d3d71c2a65c27942a97c808dc646e4d6b1a0cb360705f8cb6b7ec73953e5d21ba523d637e8f6ed2535fa9a9a628b482ddfb93936aefb2b29173c5eb0e8e44e0bc9027f756ffeb28eea749d61e3e12e5f62a86c9a7f0beb8c82a3b45275c4f3f758dbcfced0f5c8881e2dd8a2881ff644d309f864faa0f96522dd03beb3f3ad82f04ae18268900cd54c679296d411e932b8a819080e3efdf8fd0502233df98fa9cc5967f16b4573149155f2f73474b4e049179ee5d401b8a
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(85349);
  script_version("1.8");
  script_set_attribute(attribute:"plugin_modification_date", value:"2018/08/10");

  script_cve_id(
    "CVE-2015-2468",
    "CVE-2015-2469",
    "CVE-2015-2470",
    "CVE-2015-2477"
  );
  script_bugtraq_id(
    76206,
    76212,
    76214,
    76219
  );
  script_xref(name:"MSFT", value:"MS15-081");
  script_xref(name:"IAVA", value:"2015-A-0194");
  script_xref(name:"MSKB", value:"3081349");

  script_name(english:"MS15-081: Vulnerability in Microsoft Office Could Allow Remote Code Execution (3072620) (Mac OS X)");
  script_summary(english:"Checks the version of Microsoft Office.");

  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 has a version of Microsoft Office installed
that is affected by multiple remote code execution vulnerabilities :

  - Multiple remote code execution vulnerabilities exist due
    to improper handling of objects in memory. A remote
    attacker can exploit these vulnerabilities by convincing
    a user to open a specially crafted Office file,
    resulting in the execution of arbitrary code in the
    context of the current user. (CVE-2015-2468,
    CVE-2015-2469, CVE-2015-2477)

  - A remote code execution vulnerability exists when Office
    decreases an integer value beyond its intended minimum
    value. A remote attacker can exploit this vulnerability
    by convincing a user to open a specially crafted Office
    file, resulting in the execution of arbitrary code in
    the context of the current user. (CVE-2015-2470)");
  script_set_attribute(attribute:"see_also", value:"https://technet.microsoft.com/library/security/ms15-081");
  script_set_attribute(attribute:"solution", value:
"Microsoft has released a patch for Office for Mac 2011.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C");

  script_set_attribute(attribute:"vuln_publication_date", value:"2015/08/11");
  script_set_attribute(attribute:"patch_publication_date", value:"2015/08/11");
  script_set_attribute(attribute:"plugin_publication_date", value:"2015/08/12");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:office:2011:mac");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:office:2016:mac");
  script_set_attribute(attribute:"stig_severity", value:"II");
  script_end_attributes();

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

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

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/local_checks_enabled", "Host/MacOSX/Version");

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
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();

if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);

os = get_kb_item("Host/MacOSX/Version");
if (!os) audit(AUDIT_OS_NOT, "Mac OS X");

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

prod = 'Office for Mac 2011';
plist = "/Applications/Microsoft Office 2011/Office/MicrosoftComponentPlugin.framework/Versions/14/Resources/Info.plist";
cmd =  'cat \'' + plist + '\' | ' +
  'grep -A 1 CFBundleShortVersionString | ' +
  'tail -n 1 | ' +
  'sed \'s/.*string>\\(.*\\)<\\/string>.*/\\1/g\'';
version = exec_cmd(cmd:cmd);
if (version && version =~ "^[0-9]+\.")
{
  version = chomp(version);
  if (version !~ "^14\.") 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 = '14.5.4';
  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)
{
  if (report_verbosity > 0) security_hole(port:0, extra:info);
  else security_hole(0);

  exit(0);
}
else
{
  if (max_index(keys(installs)) == 0) exit(0, "Office for Mac 2011 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);
  }
}