Lucene search

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

MS08-026: Vulnerabilities in Microsoft Word Could Allow Remote Code Execution (951207) (Mac OS X)

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

7.2 High

AI Score

Confidence

Low

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 Word file, these issues could be leveraged to execute arbitrary code subject to the user’s privileges.

#TRUSTED 87301dea0b0d8a2ab00adf5996de6c60340ab901765ac03b877590d079cec2d2b0328f72e5faee7ef301091cbe81a8a5005cceacf00a4d632c7bbaea1ac7aafcda69226a1757fe3fbe12bbe99bff081701a77b2670542a8d231df4b76682170ec4d9c455cccf453fa0e20e4c64732b16471e61f1f6622921415db51eeb6edb99f6ab8d62318af51ad00116963bf296d499efbd0c0e79bf1fe68a376faf32d9987873ed9d814170f75626a61485e3e378087f75eca65f3bcfef17d23f255050ef03fa02867bae102bf369c8bdca09241e56d8439fcae9fd6efa45ae525e6c14ba0cdce488dd22a23c3270e44af6e06fa85bfb93232aa26c755202ae64b71b038d68f7975204383c10e5d0366d0ea0e03b9292ed7c9a8c50d5cbebd1a09c61189dd7ba57535b5c76c2693b495a58ef5e7afa3e01c4b9a28f7d437242a39ffec5893d6ae0850fd1946cea45fcfd67e157749e542ed99df7fe9003be5bdfa77b1dade7cbe938cae346717bc152ae62fb335fa6614c85bb015dfc8fabb463e1d77a3a09d54546c80722c26b90d1b6e1b1d1cb6d894dd92d259657a0b2134dfb02ac9beb079b5643ebf2ad64de58f248574f6e12d7392118a4b1b8974a6dcb298c8dadbe63617bf576bc38510d1084d9f5e1ef1adb249235b32929015a313ca970933ebc6e9cd20d604d1f1761a1ff4e78d9ff82d00ec70469274b2a8d2f5185c77390
#TRUST-RSA-SHA256 5c0492a8563961debd42c677d2e8a80905361f234f5198cdbc8b5d531d0a9d0b11a5adbd314af5563a2ef8bf0b50088f047e3845b8d61510bd77843d1e2dd91cd7acb88f7ae9ba1b3079c4750eb7708fd6dcf68c9320bd4386cdb8b3ad0922992485794a5d0707900fbd9b6845d6b1dc25e5caa2f31d00b5bf1718cd61b6f66a5738be948763d3d1a374bdff29ec58add304b13815a9ceb1c0b09699e4b5029cb61c7fe7a50670e4cbca1e38cec677c7bfac8eb9dbc4cce345660edd20ae69bda95bebbbd807d64be232f1b241db44d7a83d2fcf5caab771f3b234ba0d6feda265e32dc08535c2524bf4e821e6d47f331512566f02c14449072d7ef786955c2ca5653bdafef327c3ddb4c4f31467e08334200c0cff82f7ff675710e79bbe3c3198c2772e893af33bb910233862ffdc68bc9bfc728a07aeb8a46ccf0ccddc2110baaa45faf2e31486c21a934ad237a301110c8fa23a86251c85a22c8e0ba0354e9cbc939917badc896d7237f0215fd07df10af75481a82d21b9ddab013d9ac287dca6751f392f19e41926388119587279d8c878806e787d64a21635298c296e5c9a6c3d1b7fa029a9a8fff033ec41ae716b4e4239125bebc07364a0b29ee7e30651210b4baaaa397109abc16deb90b55e335f2d30483f441f34d80d4cb3b904f9d852c791eee3e2f23413b3eae1fbf5fe703409ef4abe2593a82d5f26caf74104
#
# (C) Tenable Network Security, Inc.
#


include("compat.inc");


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

  script_cve_id("CVE-2008-1091", "CVE-2008-1434");
  script_bugtraq_id(29104, 29105);
  script_xref(name:"MSFT", value:"MS08-026");
  script_xref(name:"MSKB", value:"952331");
  script_xref(name:"MSKB", value:"952332");
  script_xref(name:"MSKB", value:"951207");

  script_name(english:"MS08-026: Vulnerabilities in Microsoft Word Could Allow Remote Code Execution (951207) (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 Office that
is affected by several vulnerabilities.

If an attacker can trick a user on the affected host into opening a
specially crafted 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/ms08-026");
  script_set_attribute(attribute:"solution", value:
"Microsoft has released a set of patches for Office 2004 for Mac and
Office 2008 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-1434");
  script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"false");
  script_cwe_id(399);

  script_set_attribute(attribute:"vuln_publication_date", value:"2008/05/13");
  script_set_attribute(attribute:"patch_publication_date", value:"2008/05/13");
  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_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.0';
  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.4.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;
}


# 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 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

7.2 High

AI Score

Confidence

Low