Lucene search

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

MS08-072 / MS08-074: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (957173 / 959070) (Mac OS X)

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

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

#TRUSTED 2e8f6636f68cbb1a972dc2a0b1ed6f7dac01d65d4231098dc46ad8c80029c01cd8a74365be24788cab0b67082a2f266b6fa8edd7bf1c74e68eec73fa0c4167f9741a5a18e5d59461ff394dc1a3d3a7b80d53c7ab67bc2f746598f1829e5a513d1ad42b70eebf4647aa931dc64e2dd044295221e28539a0864f544a8da79c46f8e15c1a0b1168f57d2f497e71047b133377aa90bfaf560f06105c8e3f3b821ef68a185cf85e37e65ea9bb5e67e38cf9cdd9a80f9525894fedf1263f85290331ac626ebe6cd0b59b668ec8b46990f8b29b959f72982a9478651db84c0789a9c8382d7d07022fd1342319623d4c5ef018bc716aff333d9c3964fc43165946cefbbde36fc832a9019d75b3b8ea2bb17cec8307009cd232124b674f7cf0ade6398d40a29f0e4ff9d079e8925ebc2df6c31b67821b9dd116f5cf5bc44417d61006968413c2ad84f29e13bfc6606fed36069d4fe10dd5a748160467cd5c951a4134bb20be69e9ca0ac08c35ab5c7e5aa60baa6b70e1de324bfa0f251eeb0aed4581a47323a04756d831a9e09b6ad2f3db22f70784fef202c070005b59ac6cd7853b0061e11dbea4c532d1c3176abc5bd7ea443a4bbf10b31c4fd4320dd5a6b72057352a400b08fc14f7f668728896c73f5711a551cedb12eaf9bdeb88b29515383fbb0577f126b54d7dfe26beb6f8b5605589d607ee115e2523e44bdcf95e54656396c9
#TRUST-RSA-SHA256 664ff71017a15667731e8b03d436361b31f3ab9d4f73014062c81e45cf79281d320e5b9349c4b6a5e1c40484d2f78a5621ce0fe79e821a82075adcdc08d9b2e50e3ad09b516a9dc942136efe9685107a1c8c31d21343f68979a1a3da18823793c5875f8c9db89e4eaea451ac964155976978aa8704864f14fe5de8b062eef029b05a25c3e7bbead0da9668d4bacbb1f2cd5e21465890e22d72cebff02f69280623763c2c92c52fa1847fea307e506c5023932ccf2bf3f0d0e97007070b090c229a27e3c3a630c1eb8794890020db92107a0bc0fc1e25231d38380ff0fff06f0ea7d32f217da3e9790f7fad49f23c45160d59f924d0f915406b9c06bd57a77aecb90e7f3f75cf7aac944593c499c8cc10b41b4b603c6959aac9c86571865a0be55d8dc3dc5246e5dd796f8d71d08decc23ce7b69b5cb6684b7753491bc2028f2e781db97b7fb25b9afcd51d1c1a33b226d63dba8db8d2ab40d0e2f4cac93a879a9af975c137a22720e6632554d892cb84ef065d26b1d438a2460559e6ec31c3bd674925d24a659fd915a18964c9a18d7cd0f179f1af6c60fc07a53122cc58054684dee33e2660659ab438a27d4466bf4d9c9219ab39d3e404235b26817e3f270d2d0ea2b4bc95f628b54cc91f47b9fcf69c1dbc28ff34df2772a78cbe860c45d52985130d3a004cfa1ebf1f6b41ab6639d2e3b031a35b00ecca7a63f09f91e622
#
# (C) Tenable Network Security, Inc.
#


include("compat.inc");


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

  script_cve_id(
    "CVE-2008-4024",
    "CVE-2008-4025",
    "CVE-2008-4026",
    "CVE-2008-4027",
    "CVE-2008-4028",
    "CVE-2008-4031",
    "CVE-2008-4264",
    "CVE-2008-4266"
  );
  script_bugtraq_id(
    32579,
    32580,
    32581,
    32583,
    32585,
    32594,
    32621,
    32622
  );
  script_xref(name:"MSFT", value:"MS08-072");
  script_xref(name:"MSFT", value:"MS08-074");
  script_xref(name:"MSKB", value:"959070");
  script_xref(name:"MSKB", value:"957173");
  script_xref(name:"MSKB", value:"960401");
  script_xref(name:"MSKB", value:"960402");
  script_xref(name:"MSKB", value:"960403");

  script_name(english:"MS08-072 / MS08-074: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (957173 / 959070) (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 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/ms08-072");
  script_set_attribute(attribute:"see_also", value:"http://technet.microsoft.com/en-us/security/bulletin/ms08-074");
  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-2008-4266");
  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"exploited_by_malware", value:"true");
  script_cwe_id(399);

  script_set_attribute(attribute:"vuln_publication_date", value:"2008/12/09");
  script_set_attribute(attribute:"patch_publication_date", value:"2008/12/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.1.5';
  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.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 = '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.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 / 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.1 High

AI Score

Confidence

Low