Lucene search

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

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

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

7.1 High

AI Score

Confidence

Low

The remote Mac OS X host is running a version of Java for Mac OS X 10.5 that is missing Update 8.

The remote version of this software contains several security vulnerabilities, including some that may allow untrusted Java applets or applications to obtain elevated privileges and lead to execution of arbitrary code with the privileges of the current user outside the Java sandbox.

#TRUSTED 448a659949ee9e7e709de1955a19f19a11b6116d0ed9d91231cf471cd77d01cba2cf5129c9b182762651600922872e7b5bbcf28e5ad078c18c6e82912e76a606264820d65a3024092eb44da70854211cdff95a459073edefc86f09079661321f40b706c1b0f1d43ac855a22bf227eb83cebee0121c093eb9c46615017352604f07c4f4e470a03514b358d42e05a63c28c402788a36f9453dba84dcad6783decd3f3e824647d3f98459d94cc74d9e758a02660eb3aff70d48efd5ca467d3f3b75a4ecea9f9f3925b58ccf153654f2ffb80fe9e131b399197c431915c32637eed7ca988bc47a9be72f2ba35203be8dc39614d14870cb454e9c54bd35b17e5a685cc1683b82db8e6ae6da19ba8a287c9084b190b1d432a1ddd46eb79f50095775f6fbb6596092d33e0aa6b61c8a176aade8ffd7922058f43141d99e7135301acce526e84f6b3738a7059cd99077265d5cbabdb3fef87153dc3550e896cef67d33ac33222d4316d1b21a41e2da2c7a432ef707dfe931d8cc6ffdbcda6c6fd3dc8b236ef3fe2d1ffdee64bd39968ae15928f2b22e76ada3bf5c2d7e3fc339df6aaba9d270d0a25c90c575d9a79055db6303c7aa85beae889a570081ff240362e54cf3a0cfdfd568d0711853927ff65a941a710a96c8145966dad1167933ae72887453efa5f6a65cf5e39e255b93aa305e811909af7e29dc88b4ce45184ccee22149ab
#TRUST-RSA-SHA256 562a74ffadbf0106527c2ff814b3c522be4e59c344c5767d0dedf69094dea5d19847385b9971416684e1d051436207abb50812216e77d1570664bf3a6ebcde3cf45dfd6ed6eaf77bd1d26fd03bf590a3aeebf934f40e482eedee303752189f795256d6fe617342080f343fc4d9a984cbb21468819b0229b7b472f58559c5d20a9b1cbcdecef7491edf867909ac94129bea8f5100cf2b4d679805b86257805b654a933e9e0205376667a8ea3ab0c622fd286858e7a915db2281fcb25231c7059be35f7bbb0a7785235b07c486bc968529aa97f825d9322fe4217ca596164bea48a3aadc2857699289ac6624d7bc0fc10e8ac344e70a7bbd95b10d80190c3a2a93a627e6a55d03042f34462309fe12eb78269894853f620489ee7f0e0abb7e66217c6a1acd2151c98d139f92d44853c1a050a53f1971fcbc4f3fbf666ddafa066874f4bd3d986f0f6e20ea160ccdfde09766515b63eb5bd9a81af2096294686d43395c2b4820aa9660e9bb78d151217abcd1b3a2c41c31696cb5b1a3c047379d23a85a8082a2cd21f26df1ae36848ce7d81b4143196ab2dc9f3bc87815b1b1c41993d11f742d7514a413963d50126ab136764846cf9f9fd448ed7e031728a6653ce61cf8798583eba1a025aec56173ae6321defe71bb71d7f5914baa225f5239650185c1bd98ea35793f7eaa1442efd021fe2e3f0ca0271dd293661534961bf43a
#
# (C) Tenable Network Security, Inc.
#



include("compat.inc");


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

  script_cve_id(
    "CVE-2009-3555",
    "CVE-2010-1321",
    "CVE-2010-1826",
    "CVE-2010-1827"
  );
  script_bugtraq_id(36935, 40235, 44277, 44279);

  script_name(english:"Mac OS X : Java for Mac OS X 10.5 Update 8");
  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 8.

The remote version of this software contains several security
vulnerabilities, including some that may allow untrusted Java applets
or applications to obtain elevated privileges and lead to execution of
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/HT4418"
  );
  script_set_attribute(
    attribute:"see_also",
    value:"http://lists.apple.com/archives/security-announce/2010/Oct/msg00001.html"
  );
  script_set_attribute(
    attribute:"solution",
    value:"Upgrade to Java for Mac OS X 10.5 Update 8 or later."
  );
  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:POC/RL:OF/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2010-1321");
  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_cwe_id(310);

  script_set_attribute(attribute:"vuln_publication_date", value:"2009/11/04");
  script_set_attribute(attribute:"patch_publication_date", value:"2010/10/20");
  script_set_attribute(attribute:"plugin_publication_date", value:"2010/10/20");

  script_set_attribute(attribute:"plugin_type", value:"local");
  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");

  exit(0);
}

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

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


enable_ssh_wrappers();

function exec(cmd)
{
  local_var ret, buf;

  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();
  }
  if (buf !~ "^[0-9]") exit(1, "Failed to get the version - '"+buf+"'.");

  buf = chomp(buf);
  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.");

# Mac OS X 10.5 only.
if (!egrep(pattern:"Darwin.* 9\.", string:uname)) exit(0, "The remote Mac is not running Mac OS X 10.5 and thus is not affected.");

plist = "/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/version.plist";
cmd = 
  'cat ' + plist + ' | ' +
  'grep -A 1 CFBundleVersion | ' +
  'tail -n 1 | ' +
  'sed \'s/.*string>\\(.*\\)<\\/string>.*/\\1/g\'';
version = exec(cmd:cmd);
if (!strlen(version)) exit(1, "Can't get version info from '"+plist+"'.");

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

# Fixed in version 12.7.0.
if (
  ver[0] < 12 ||
  (ver[0] == 12 && ver[1] < 7)
)
{
  gs_opt = get_kb_item("global_settings/report_verbosity");
  if (gs_opt && gs_opt != 'Quiet')
  {
    report = 
      '\n  Installed version : ' + version +
      '\n  Fixed version     : 12.7.0\n';
    security_hole(port:0, extra:report);
  }
  else security_hole(0);
}
else exit(0, "The remote host is not affected since JavaVM Framework version "+version+" is installed.");