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, PowerPoint, or Word file, these issues could be leveraged to execute arbitrary code subject to the user’s privileges.
#TRUSTED 37f4233e309c9f1649886aa7b6439e65ff4eb803fd0462841e2bd97b174a8a54e97b333bea6671a0eaec1323c91cd2499fa6778443d298a5a78debc2d351a52793a8afc1ff996327db2694f688aa38197691a28a1aa55d486af8849dbe3c7204010e4b8d84ab02d7abd5a2b7170968ff990418e3f9b3d24471eefc8ca5230ff8ba4a54739b021c6345dd98a6261a149cfcf1945fbf966ec9eceebbd39a78b7c02cec43e79ca671b950da4899a74c4db6ebb1b0649191845bae70cfdcdf0743cfbfe5a0e6c00aade569e3b18a1a136c93b17564aaff1a10681be7afeaad7f28b7267a5044887243ed17493182a06942a7b3fb5b9519057a7cdc83fae1274f593211d842e4eddcf5647d21758bec4d9a7bd4081515ff6830e07851ec126c0d8a0a737340498d9ebca9c1ee9e795c9a4e9bd5dac7fc6b98fa5898ee759b1ecb39482be046304088648d220640572be623c9c089d9a915fef30247a1525673cc1e959445b77f440acb3a0f940a0b55c5c22d0ac6bb579a1ce1350a6f059c9e91cbaeacdda7028fad52ef7e35aae64015c4d940c51be374d523534dab398d5115014c6f0733f25fd2d47be7a5d86f67ce5631c694c06286ba94bdb8a3bd3afb0822d0661db74110796af67ed860ba9e3801e5de58eba257d8521ceb1b1ba8f8203b71a1fe7aba27c0e93d0c7293ae6dda4fcb19cb6b72242b389f2c6208c32b0f496c
#TRUST-RSA-SHA256 8e9759ef9fc64a3ab7e23ca3909cb1190b0000e97add3c23b25a03a8b847312950931f38e2823ab548c10b1d6910593aa06ec8bf2b1d0ac19850a4c988088be5f96329441857458d25958f9885cf1ee28114c21c33b6f09ccea78d5f7f40d1e60d6e59d1203aeccbd9a061efea370a902b8149dd815d4ad1aed1bee0a538e5232cc825d065c03a1246fd1a9cf1eb1706300166eb53ecbe12ef8b625a9520144e6af73af21f569f0192192b176a89454038f78003497995ff14dd15268ce8604c7dd960a7accbb3280286e6bbe42b9226338fd3f7fa6930aea016feb4000122022b0a72121ae5007acc5597356b41486e109bf7c6cced48622c2b4c8b1f2789e43f8a741f65f293eeabc8675e66e4eb4542f79a2a046b988bcba042ad6b4cb4c354099d73874e65c5df062898caf0eec5f973ba0232dda6f3e6b39611f9cea0f1a30182fa92457968f1ceb57cfa8f39174951a4f86e8a988c5efa6558269b87d509ae8f162ae72460b262e45dbf275a7caaea72c62ff76777857cc3e9717f079d19d49bdc369ed1ae95e1e0555e65b6115950865c013f6d49e073faa12c55014230d694a83097fb1223738c016e5eb5697f9ed93dde9700b16ae0feb31850dfd2b1ac69fbdfbd658f3ff7310d9ca0148126e635551e474e72cb7e49630439d3f0b3481844e5cc45077dcc1a431e32c6925c30c493e90765753c3ff4416ef09663
#
# (C) Tenable Network Security, Inc.
#
include('compat.inc');
if (description)
{
script_id(50062);
script_version("1.26");
script_set_attribute(attribute:"plugin_modification_date", value:"2023/11/27");
script_cve_id(
"CVE-2009-0224",
"CVE-2009-0549",
"CVE-2009-0557",
"CVE-2009-0558",
"CVE-2009-0560",
"CVE-2009-0561",
"CVE-2009-0563",
"CVE-2009-0565"
);
script_bugtraq_id(
34879,
35188,
35190,
35215,
35241,
35242,
35244,
35245
);
script_xref(name:"MSFT", value:"MS09-017");
script_xref(name:"MSFT", value:"MS09-021");
script_xref(name:"MSFT", value:"MS09-027");
script_xref(name:"MSKB", value:"967340");
script_xref(name:"MSKB", value:"969462");
script_xref(name:"MSKB", value:"969514");
script_xref(name:"MSKB", value:"969661");
script_xref(name:"MSKB", value:"971822");
script_xref(name:"MSKB", value:"971824");
script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/06/22");
script_name(english:"MS09-017 / MS09-021 / MS09-027: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (967340 / 969462 / 969514) (Mac OS X)");
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, PowerPoint, 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/ms09-017");
script_set_attribute(attribute:"see_also", value:"http://technet.microsoft.com/en-us/security/bulletin/ms09-021");
script_set_attribute(attribute:"see_also", value:"http://technet.microsoft.com/en-us/security/bulletin/ms09-027");
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-2009-0565");
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:"exploited_by_malware", value:"true");
script_cwe_id(94, 119);
script_set_attribute(attribute:"vuln_publication_date", value:"2009/06/09");
script_set_attribute(attribute:"patch_publication_date", value:"2009/06/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 and is owned by Tenable, Inc. or an Affiliate thereof.");
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.9';
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.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 = '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.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;
}
# 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);
}
}
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0224
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0549
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0557
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0558
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0560
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0561
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0563
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0565
technet.microsoft.com/en-us/security/bulletin/ms09-017
technet.microsoft.com/en-us/security/bulletin/ms09-021
technet.microsoft.com/en-us/security/bulletin/ms09-027