Mac OS X : Java for Mac OS X 10.5 Update 10

2011-06-29T00:00:00
ID MACOSX_JAVA_10_5_UPDATE10.NASL
Type nessus
Reporter Tenable
Modified 2017-05-30T00:00:00

Description

The remote Mac OS X host is running a version of Java for Mac OS X 10.5 that is missing Update 10, which updates the Java version to 1.6.0_26 / 1.5.0_30. As such, it is affected by several security vulnerabilities, the most serious of which may allow an untrusted Java applet to execute arbitrary code with the privileges of the current user outside the Java sandbox.

                                        
                                            #TRUSTED 2de2ea626f1211185286779bec93be0f1e0d5541f3e31d2015a932fba6ba7655a359fe648325c9d396111b7e948bd8e6ef61f3e56b381552fe3c66ec10bdfa5406f80d23e0d736758d3bb219a6c96522ef56a51b568272a8a36b6dc9338098f6c83a0f41fd86f5fe134147d7aafcea62007bd5847d9334e32da672819e47c4d4ec97bec31804d5a9e0d9255578dc2f14d81a375bd43f7e184ca0803398383e24a80502d5867ec81235204da41074cb58d7cc8755ddc48215aa24d0fa910028a42b779bca688ef52f716481f3466a62654bfb382c756a9769c3b5801f5ff0cd9c3062e6f2a69013a9f30582a40999c2b30933882e5049b333330e6ab5cf4c3135afd304d9411a0a6454561a623bc63ca3ee675303bc771cf90b31fb6dbe7572c5c6447af77c3b028f66e5f5c5b22f0bb356f5fff076128ea8aa167b08a76c2c3da9fe9b44af28cd702caa449c65f86072417af66d15956367d3794463e8e61145994df86db54cf4895abba814d2f5faac47a4078fb97d6dae3c9fad1ea17c74e095c668657edaead2d93e39c16ee6d380f7a00f16a36449cff90517bd8628e0fdfea3ae4955c84ec8edf383617a2f38936aaa3e93104d2eb9e1cba08cf6765a26d3e875697d0f1b6dc33e9f053353867e433ac39db17e6f5b82272a1b041e866bb05b643c9e6515381c1a0629e6e66a6c6692f34f97268bfa646979ceade52d55
#
# (C) Tenable Network Security, Inc.
#


if (!defined_func("bn_random")) exit(0);
if (NASL_LEVEL < 3000) exit(0);


include("compat.inc");


if (description)
{
  script_id(55458);
  script_version("1.7");
  script_set_attribute(attribute:"plugin_modification_date", value:"2017/05/30");

  script_cve_id(
    "CVE-2011-0802",
    "CVE-2011-0814",
    "CVE-2011-0862",
    "CVE-2011-0863",
    "CVE-2011-0864",
    "CVE-2011-0865",
    "CVE-2011-0867",
    "CVE-2011-0868",
    "CVE-2011-0869",
    "CVE-2011-0871",
    "CVE-2011-0873"
  );
  script_bugtraq_id(
    48137,
    48138,
    48140,
    48144,
    48145,
    48147,
    48148,
    48149
  );
  script_osvdb_id(
    73069,
    73070,
    73073,
    73074,
    73075,
    73076,
    73077,
    73081,
    73083,
    73084,
    73085,
    73176
  );

  script_name(english:"Mac OS X : Java for Mac OS X 10.5 Update 10");
  script_summary(english:"Checks version of the JavaVM framework");

  script_set_attribute(
    attribute:"synopsis",
    value:
"The remote host has a version of Java that is affected by multiple
vulnerabilities."
  );
  script_set_attribute(
    attribute:"description",
    value:
"The remote Mac OS X host is running a version of Java for Mac OS X
10.5 that is missing Update 10, which updates the Java version to
1.6.0_26 / 1.5.0_30.  As such, it is affected by several security
vulnerabilities, the most serious of which may allow an untrusted Java
applet to execute arbitrary code with the privileges of the current
user outside the Java sandbox."
  );
  script_set_attribute(
    attribute:"see_also",
    value:"http://support.apple.com/kb/HT4739"
  );
  script_set_attribute(
    attribute:"see_also",
    value:"http://lists.apple.com/archives/security-announce/2011/Jun/msg00002.html"
  );
  script_set_attribute(
    attribute:"solution",
    value:
"Upgrade to Java for Mac OS X 10.5 Update 10, which includes version
12.9.0 of the JavaVM Framework."
  );
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
  script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"false");

  script_set_attribute(attribute:"vuln_publication_date", value:"2011/06/08");
  script_set_attribute(attribute:"patch_publication_date", value:"2011/06/28");
  script_set_attribute(attribute:"plugin_publication_date", value:"2011/06/29");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:apple:java_1.5");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:apple:java_1.6");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"MacOS X Local Security Checks");

  script_copyright(english:"This script is Copyright (C) 2011-2017 Tenable Network Security, Inc.");

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/local_checks_enabled", "Host/MacOSX/Version");

  exit(0);
}


include("global_settings.inc");
include("misc_func.inc");
include("ssh_func.inc");
include("macosx_func.inc");



if(sshlib::get_support_level() >= sshlib::SSH_LIB_SUPPORTS_COMMANDS)
  enable_ssh_wrappers();
else disable_ssh_wrappers();

if (!get_kb_item("Host/local_checks_enabled")) exit(0, "Local checks are not enabled.");

os = get_kb_item("Host/MacOSX/Version");
if (!os) exit(0, "The host does not appear to be running Mac OS X.");
if (!ereg(pattern:"Mac OS X 10\.5([^0-9]|$)", string:os)) 
  exit(0, "The host is running "+os+" and therefore is not affected.");


plist = "/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/version.plist";
cmd = 
  'plutil -convert xml1 -o - \'' + plist + '\' | ' +
  'grep -A 1 CFBundleVersion | ' +
  'tail -n 1 | ' +
  'sed \'s/.*string>\\(.*\\)<\\/string>.*/\\1/g\'';
version = exec_cmd(cmd:cmd);
if (!strlen(version)) exit(1, "Failed to get the version of the JavaVM Framework.");

version = chomp(version);
if (!ereg(pattern:"^[0-9]+\.", string:version)) exit(1, "The JavaVM Framework version does not appear to be numeric ("+version+").");

ver = split(version, sep:'.', keep:FALSE);
for (i=0; i<max_index(ver); i++)
  ver[i] = int(ver[i]);

# Fixed in version 12.9.0.
if (
  ver[0] < 12 ||
  (ver[0] == 12 && ver[1] < 9)
)
{
  if (report_verbosity > 0)
  {
    report = 
      '\n  Framework         : JavaVM' +
      '\n  Installed version : ' + version +
      '\n  Fixed version     : 12.9.0\n';
    security_hole(port:0, extra:report);
  }
  else security_hole(0);
}
else exit(0, "The host is not affected since it is running Mac OS X 10.5 and has JavaVM Framework version "+version+".");