Lucene search

K
nessusThis script is Copyright (C) 2009-2023 Tenable Network Security, Inc.MACOSX_JAVA_10_6_UPDATE1.NASL
HistoryDec 04, 2009 - 12:00 a.m.

Mac OS X : Java for Mac OS X 10.6 Update 1

2009-12-0400:00:00
This script is Copyright (C) 2009-2023 Tenable Network Security, Inc.
www.tenable.com
30

7.4 High

AI Score

Confidence

Low

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

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

#TRUSTED 474243d7a33134c9447819935956e8f92b3748d27a2a335b43abeafa8aafe937d46e13ac13951ce87af412b6182f776fd0877d75f9a1c289c9352d922b0661cf39966df45adba4d99c3be056a991740dac453566c11028d97a22abf29fb096a70d0a4bd7222cfbda30eee41da8ca1d73e7145c0b0d965646f3e7257d1e67706dc24ccff685de9021348eccf62d7fc43a205b37face6c80b49c3d3e0f33cd8bd4d3a06477a796509c587b113c303f6ae0d39c1054223e572ab61a91160d83ddef8d1963643dd846ec36498ecf6b532612bc64ee4ff500f10a2885d7057e4a48666385c5837ea07d1d3cb12ce73724faa9e3e38342254178b95440c3b4f2fe3de6c71e16488b1d7d39b3fb196e755aec1a6e691443fd045e3191d279bef81e048410cdce8e1476a7991877304349ce1632a0a79da64c24a275e104976746fc011780caa5c6837c0ced939aec2d2ec51ced6246c919995ca6d88f1ec95abfbd838f6d363443bed0f2c2fe506ea03a0635056faffae9d2e6475c6bb0388b553fed47d74d02544ca3870b1b37485e9b279af269ee2c9f56e8bfe8e094be2b03f918e99b431440f5ad71ab0001cbd43957528131d49a6728f643af41cc77b231bdbcfb967178c4957580fabd33122509c4dd3541ea8173bb031f3919d19375a52aefd0fb959fde96de2bce1c41f39a827a1575905f2964e6a56b1e37c698fed808361b
#TRUST-RSA-SHA256 5368af096548e312c1fa3ae25566931fbb781ee952965ea9d67bfa956c3f14dcf9c51e0017b8ac5d5622b65fed833a2065145cd5bfdaa0d62646782e908acac7b29d801d6aa2ff7c76a815fd7af997a5a25d22edbd1c76fdb63f07d9ec36a72d703e048a158372e7de79f3e767e5c122c8b35eb300762f2839223996ba3b77e975c20167b4f50b66e26734053fa793f5f52f4af3db14164c55fb93320f548eccde51ac0e6e7750cb4214942ef878ddfb61034be7d2a04e4cb3108aea2d15d3f975eae9d2f2f69d117539f3543931d6b91b0a32b9f80e4a6cbc469c4134b3f836968c8ab7696e7619d709972e42112b285ec7dd3f88891b0b7ac44d0b83a15ac7fb7f61d59770dfe8072842c13a2833e9e8001a40a2baec52b299b97939d776ce02ed9795f052344190cd4e31cdc1c2d1949803cb33d1d3132d3000de6a649dc6cebaf224f740bb5bdce740dc1d36114330b30965677436665553b23c61eca6ffa9efcefdcdf5fdd5307d79f423a3d7d0cfcffa0719be7b71de5e93c8e14d77572dbad1d037df0f7e85c48711dfc73523520d2baa4bf89d16acd2081b411d25b4d29d55574b188ea31e38b84e092a485636ee0a0cd164ac54f564e7e06959f7c9f3ba2d277f0a3eb2fde40223844d99f3804bbf6821552977e6505f7156fb22e334a38335b924dbd3cf7121bc6ff08b161ac1671bda3341dab28f66d1af762920
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

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

  script_cve_id(
    "CVE-2009-2843",
    "CVE-2009-3728",
    "CVE-2009-3865",
    "CVE-2009-3866",
    "CVE-2009-3867",
    "CVE-2009-3868",
    "CVE-2009-3869",
    "CVE-2009-3871",
    "CVE-2009-3872",
    "CVE-2009-3873",
    "CVE-2009-3874",
    "CVE-2009-3875",
    "CVE-2009-3877",
    "CVE-2009-3884"
  );
  script_bugtraq_id(36881, 37206);

  script_name(english:"Mac OS X : Java for Mac OS X 10.6 Update 1");
  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.6 that is missing Update 1.

The remote version of this software contains several security
vulnerabilities, including some that may allow untrusted Java applets
to obtain elevated privileges and lead to execution of arbitrary code
with the privileges of the current user."
  );
  script_set_attribute(
    attribute:"see_also",
    value:"http://support.apple.com/kb/HT3969"
  );
  script_set_attribute(
    attribute:"see_also",
    value:"http://lists.apple.com/archives/security-announce/2009/Dec/msg00000.html"
  );
  script_set_attribute(
    attribute:"see_also",
    value:"http://www.securityfocus.com/advisories/18434"
  );
  script_set_attribute(
    attribute:"solution",
    value:"Upgrade to Java for Mac OS X 10.6 Update 1 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:H/RL:OF/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2009-3874");
  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_set_attribute(attribute:"metasploit_name", value:'Sun Java JRE AWT setDiffICM Buffer Overflow');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
  script_set_attribute(attribute:"canvas_package", value:'CANVAS');
script_cwe_id(310);

  script_set_attribute(attribute:"vuln_publication_date", value:"2009/12/03");
  script_set_attribute(attribute:"patch_publication_date", value:"2009/12/03");
  script_set_attribute(attribute:"plugin_publication_date", value:"2009/12/04");

  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) 2009-2023 Tenable Network Security, Inc.");

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/MacOSX/packages");

  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.6 only.
if (!egrep(pattern:"Darwin.* 10\.", string:uname)) exit(0, "The remote Mac is not running Mac OS X 10.6 and thus is not affected.");

plist = "/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/version.plist";
cmd = string(
  "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 13.1.0.
if (
  ver[0] < 13 ||
  (ver[0] == 13 && ver[1] < 1)
)
{
  gs_opt = get_kb_item("global_settings/report_verbosity");
  if (gs_opt && gs_opt != 'Quiet')
  {
    report =
      '\n  Installed version : ' + version +
      '\n  Fixed version     : 13.1.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.");

References