Lucene search

K
nessusThis script is Copyright (C) 2010-2023 Tenable Network Security, Inc.MACOSX_MS08-057.NASL
HistoryOct 20, 2010 - 12:00 a.m.

MS08-057: Vulnerabilities in Microsoft Excel Could Allow Remote Code Execution (956416) (Mac OS X)

2010-10-2000:00:00
This script is Copyright (C) 2010-2023 Tenable Network Security, Inc.
www.tenable.com
22

7.2 High

AI Score

Confidence

Low

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

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

#TRUSTED 3254183254f8597092f8d0306b81a268922f10f2b0c7707ad9dea17d37ec292859e9256d11ca5ffbfeb4a86f2438c07f7cc841cd04a71470ac72d8623ff475c964929104c150dd8571ec7c22d3bad99e1d2057e7bf3201cf3afef99ddb676124bebaf9e97c963181a78540d843fb1338559c8b224601b852912534f08da2f82eb2683482e2664bf78294522ab5e3745f3d9c16a6c13d65ea112722e7449a24eda721bea8b25caf7c7846412f0369898a27962e82f5b5c4714a77b1558cb425799f3a08c797bc582131404bde1550902f482d103d24a1866ba98cbfed0f566edcd959239eba2188f8b653cb444ae4bcd5acbc182de928234578c192ebf33d2dd9893e1c6d641d05738d1a400c22cdae2dd10648e9fc1321d86dbc796fcd29c5090680b3463a2b0f77594ddc92175fb40473398ff7f26754cb6573c231480348a1dc835c75ac1b1b8f8119d8f0e1a74fb8b9ae1265f3a59b8f9d1cabb7d16bd01e279ad620e201360f2d04df47fb6d90ae313bb39aad58318ad8156d243db842b2f8b5479766848de89151068f48c4d5b6005729ea74354b36bc04cf03d2e8623f7184f1191ab6339f209112f48e9b3b72636001fbd984d0a93613dd92a8f2857b040e9008a213a6c88f58d09a68f85e1e7046222b3b49ba20ca7e37a223af1b78bd94a33e396f7b5220a2e9ad0cb43a5a89d3559681c93b539a002738325a444c
#TRUST-RSA-SHA256 73818942bcbe79737c0879f6c9ea6f773d882726534dd06f39dcdd0150f037e5598cc1c19e1daa038f7255b64e5a8c222cc2e72a1d86171af79e4b7989d1ea99d0268626f6b9ed05da54b1f6bee04b98fb2a8ac10549d57f4d9d6be1bd77c29ee7ac51609c92ce722e0a4eb1fb1e4d3c0906e8626db25f488411ca62d9c16d39d01411776296150eaec7eefc5cdfe249b4a60efb39474a6d029f3bf198751a51c02b4ce4ec3402235d2d7a1a406b93e29f118000d012223cbe87f9d4c5fdec8ca67a0500130db6bb7d42c5dfb9ae04cc01ac6f75199542fc20d5958fb92c70bea2fdc0412f53ee1fe4b585b7bdbb40a5f96f3e17caa2cfbbb31db6cd7e5bffca0a0d8adb21fc896ba6d81941c400c52753998e9d5bcbc6609196e8849030ce206db5118331c79c0396d268ea78c128ad7807b45cca19530c70109c2e59b2204196640218182bea4697202be9090753bfe10838d80a54a4492ea079f37d89ce1130743f445363f764eb9fa856e1db0cb293823d16604c0e68718b14630f86e31cac055344e436acc35743ecc0fb04ac26b4b83779009a5ab69293bfa0f1dc4d18ffe28d3f71ae877dbaf6c831c35f7bf80f20b54790fd2ea3ea19d4351074662f8941580a1e0fb24a1f75f6b0350d93fa8fc9537658144fa0f0ffe69a1f0b4b17ce738c6f1af36ec1eaf9552ee22853397a5cd7974cdee5f442f88024acd6d587
#
# (C) Tenable Network Security, Inc.
#


include("compat.inc");


if (description)
{
  script_id(50059);
  script_version("1.21");
  script_set_attribute(attribute:"plugin_modification_date", value:"2023/11/27");

  script_cve_id("CVE-2008-3471", "CVE-2008-4019");
  script_bugtraq_id(31705, 31706);
  script_xref(name:"MSFT", value:"MS08-057");
  script_xref(name:"MSKB", value:"956416");
  script_xref(name:"MSKB", value:"958267");
  script_xref(name:"MSKB", value:"958304");
  script_xref(name:"MSKB", value:"958312");

  script_name(english:"MS08-057: Vulnerabilities in Microsoft Excel Could Allow Remote Code Execution (956416) (Mac OS X)");
  script_summary(english:"Check 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 is running a version of Microsoft Excel that
is affected by several vulnerabilities.

If an attacker can trick a user on the affected host into opening a
specially crafted Excel 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/ms08-057");
  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:U/RL:OF/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2008-4019");
  script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"false");
  script_cwe_id(189);

  script_set_attribute(attribute:"vuln_publication_date", value:"2008/10/14");
  script_set_attribute(attribute:"patch_publication_date", value:"2008/10/14");
  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-2023 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");



enable_ssh_wrappers();

function exec(cmd)
{
  local_var buf, ret;

  if (islocalhost())
    buf = pread_wrapper(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.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;
}

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.2';
  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.0.1';
  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);
  }
}
VendorProductVersionCPE
microsoftoffice2004cpe:/a:microsoft:office:2004::mac
microsoftoffice2008cpe:/a:microsoft:office:2008::mac
microsoftopen_xml_file_format_convertercpe:/a:microsoft:open_xml_file_format_converter:::mac

7.2 High

AI Score

Confidence

Low