Lucene search

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

MS10-017: Vulnerabilities in Microsoft Office Excel Could Allow Remote Code Execution (980150) (Mac OS X)

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

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 a244b01feaa5d774589c8296c9f3f96873d843b8b1e58af687b96c2a270bb157059def6e253735db33372cb1b36757893b36df927c1f8e10a642072061b7e8b888fd0991f9820c5d2a2608e07df96b16e019e7f47bc9757776d60fc1ada606d465c03608102d68a28921241a1f7fc68d3f441d9d8980bfb0fccfbcbcb0100b6f81bc1304582f8efa3ff5cdacbedddee7dc7f667a71412cb453f63eef9d0cf4110cace578460b19d99342368b0dc9a0199ce063ab086dd81760f85d54a632be829c5fe907a1236afdd71ffc9514fdc78e91aff1fb2cf01207a2ddf1a5642871cd9253e57e8df341d0a2957b4839a63153ab5c153370bb9586310647dd097cb9a1998d2c0bb2190673a3a2fd21ab7a6b383f86c5e22ecd044da620c2cfc8a11c67fc7222aca339dd156325064a8a56f36e324f10ac7c166869d7ebda87b1c7e805d0a79d3ca065e50b9b256473064d3722cae3623834277cb5be43b33b950b35541c08dc1c91515f1caea7524e62408c93b3d9a7b044922672bce5a9d71cd46dad528d3dc70be8257bcb38dbc3be28330068ef6f0e862f45ddc98432978dadf10b8694813eee6fa153b622afe5b2aa8e5b0eb9b9c258f1f01de37649635b964042c5140c5ae850f3964579eb79cea909a703b25a9b5a356b9d5427cb8f69c199c5e1f84b6f95a7fa5f29b9e7a624bf6f37d577696e6f8afaf3e868a8bd864f5b6d
#TRUST-RSA-SHA256 32c7295283d0a967a2512e5fd42943a57f1ff6e55947bd6ca2a2daffd0d307268ce7a11902228a095c7c0e2693b0c46bfc13fee6e22b57149f73cd1a56511fc77a1bd71456a1b13b3e2624d6f6893d0cfb6882a060a2c7b7c48cc9f936bd7d94833c16b3e74eb1f867afa752c51bd3519a279adc264e68a9b9b1fb2eaa3f7cb12e703118bb3fcefb7c3de22babaf768ba4f6f6639f84c7d138067b574c5b4c2de60697ffbdf5d0e71504c08a3e438f8cfadfbf8a35a284af856ae2c0ed3152371715a2cbf7760b552ee7e8373885688305a01788b351ae208bed232a2182dc439e3d85fd265ddc3e6520ba7c2c66f1aea5c1a9a6cc66073c624585cc685941bb3d76d598ab215ef09066de02bdf217c7fc7f5aa44f1c407597ad71250da18a9d8d3fdf4ae8320302c2cdaf0c6b9b06b4e6ec6b033de6352ef7d7f3065e2d932e35c6a0b6cf01513feb9e0927a3a1cdfe4bdaa5edad80835a98c723ca7396df951ed3c0d2516f165978f636fad1e15a969713ff919bfcb3abd27f750c3c34c57c25282ddc883eef79f0f3d808482b0cea97998f87b9123afc8b0a095c38ca4877b84aedebd8b0f940ae66f5b98cd35dd9ea4c7c9b130bc1916a232e16ed053e39ce616437f63aa383a74dbd0d3ad2df9490543156240fcc1567a872f5dce41ec821c267304d48374f77d696dde26b8800cf74b3a10ba488502211e8e590ced211
#
# (C) Tenable Network Security, Inc.
#


include("compat.inc");


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

  script_cve_id(
    "CVE-2010-0258",
    "CVE-2010-0262",
    "CVE-2010-0263",
    "CVE-2010-0264"
  );
  script_bugtraq_id(38550, 38553, 38554, 38555);
  script_xref(name:"MSFT", value:"MS10-017");
  script_xref(name:"MSKB", value:"980150");
  script_xref(name:"MSKB", value:"980837");
  script_xref(name:"MSKB", value:"980839");
  script_xref(name:"MSKB", value:"980840");

  script_name(english:"MS10-017: Vulnerabilities in Microsoft Office Excel Could Allow Remote Code Execution (980150) (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/ms10-017");
  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:F/RL:OF/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2010-0264");
  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:"vuln_publication_date", value:"2010/03/09");
  script_set_attribute(attribute:"patch_publication_date", value:"2010/03/09");
  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.2.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;
}

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.8';
  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.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)
{
  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