Mac OS X : Java for Mac OS X 10.5 Update 4 - Nessus

High   Plugin ID: 39435

This page contains detailed information about the Mac OS X : Java for Mac OS X 10.5 Update 4 Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 39435
Name: Mac OS X : Java for Mac OS X 10.5 Update 4
Filename: macosx_java_10_5_update4.nasl
Vulnerability Published: N/A
This Plugin Published: 2009-06-17
Last Modification Time: 2018-07-14
Plugin Version: 1.17
Plugin Type: local
Plugin Family: MacOS X Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/MacOSX/packages

Vulnerability Information


Severity: High
Vulnerability Published: N/A
Patch Published: 2009-06-15
CVE [?]: CVE-2008-2086, CVE-2008-5339, CVE-2008-5340, CVE-2008-5341, CVE-2008-5342, CVE-2008-5343, CVE-2008-5344, CVE-2008-5345, CVE-2008-5346, CVE-2008-5347, CVE-2008-5348, CVE-2008-5349, CVE-2008-5350, CVE-2008-5351, CVE-2008-5352, CVE-2008-5353, CVE-2008-5354, CVE-2008-5356, CVE-2008-5357, CVE-2008-5359, CVE-2008-5360, CVE-2009-1093, CVE-2009-1094, CVE-2009-1095, CVE-2009-1096, CVE-2009-1097, CVE-2009-1098, CVE-2009-1099, CVE-2009-1100, CVE-2009-1101, CVE-2009-1103, CVE-2009-1104, CVE-2009-1106, CVE-2009-1107, CVE-2009-1719
CPE [?]: N/A
Exploited by Malware: True

Synopsis

The remote host has a version of Java that is affected by multiple vulnerabilities.

Description

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

The remote version of this software contains several security vulnerabilities. A remote attacker could exploit these issues to bypass security restrictions, disclose sensitive information, cause a denial of service, or escalate privileges.

Solution

Upgrade to Java for Mac OS X 10.5 Update 4 (JavaVM Framework 12.3.0) or later.

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub, Immunity Canvas, Core Impact)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Mac OS X : Java for Mac OS X 10.5 Update 4 vulnerability:

  1. Metasploit: exploit/multi/browser/java_calendar_deserialize
    [Sun Java Calendar Deserialization Privilege Escalation]
  2. Exploit-DB: exploits/osx/remote/8753.txt
    [EDB-8753: Apple Mac OSX - Java applet Remote Deserialization Remote (2)]
  3. Exploit-DB: exploits/multiple/remote/9948.rb
    [EDB-9948: Sun Java Runtime and Development Kit 6 Update 10 - Calendar Deserialization (Metasploit)]
  4. Exploit-DB: exploits/multiple/remote/16293.rb
    [EDB-16293: Sun Java - Calendar Deserialization (Metasploit)]
  5. Exploit-DB: exploits/multiple/remote/16302.rb
    [EDB-16302: Signed Applet Social Engineering - Code Execution (Metasploit)]
  6. GitHub: https://github.com/LAIR-RCC/InfSecurityRussianNLP
    [CVE-2008-5353]
  7. GitHub: https://github.com/svartkanin/source_code_analyzer
    [CVE-2008-5353]
  8. GitHub: https://github.com/offensive-security/exploitdb-bin-sploits/blob/master/bin-sploits/8753.tgz
    [EDB-8753]
  9. Immunity Canvas: CANVAS

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS V2 Vector [?]: AV:N/AC:M/Au:N/C:C/I:C/A:C/E:H/RL:OF/RC:C
CVSS Base Score:9.3 (High)
Impact Subscore:10.0
Exploitability Subscore:8.6
CVSS Temporal Score:8.1 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.1 (High)

Go back to menu.

Plugin Source


This is the macosx_java_10_5_update4.nasl nessus plugin source code. This script is Copyright (C) 2009-2018 Tenable Network Security, Inc.

#TRUSTED 8b8cd4a52754ac6be75f4da84782e78c59d2862c1a09de5f9e8c823e6f128387805805d1a1033a182d9e1291f0fc4535745996a0f5a83531661cd970cb76a72f3bf4b6c9dbd21926710ad443bcea1a2eda3d6c67328cc0e4746b0e20eb1bd1fd8baaa8ecd4e1a3fc4451a1e13367d89ff78373bdc562971e572313b854c309c2e54e0d455c6b3afefd993bf00cb52d9bc89be923b409c60155f5bef8ec3db12b8d2786235090a75d722aff3ff0e289014203ea1d1779d8949e2ab969cd86e8b892e8d57eec452200a14785d67c4d28ed258cc4862a7c0c4d2f94f57f82e5a437eec15cddf7de27ae6c29f31d5c6fd600f303790c1a0edc1e2319f246d88909d0db39a5664be1ec5d516708c4e7ec298660468be71ebc8a17caf7be3f8bafbc0c27c476e6d051f1644a9d3a835a03f054b31e68a5d2561d845554a50576983b6e59ca9d96be4c00f5d0d0be522d94b6f8be8c8c7b7e624f083e6a17decf15bd3bce68342d0560d195867502c57f8e1a3cb5e1cfb0af13e43580bf706288140495b85ffd499a4876d5b92043ef0d6ab9f25572b5815777f8f67d0dc5e8a9d09a3e11512fc67669cf652070123d443afcd375e16e06c36600dd183b8512ba8cb270cf8a0efa76fb3750f00f8c05fd7d50034943fcc37f49c70e3e0d4d1e1b5d0dbe322f67f0ac3f543dea2830c6b94acb79ab3779b084b4a4986750849a0b59f66e
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(39435);
  script_version("1.17");
  script_set_attribute(attribute:"plugin_modification_date", value:"2018/07/14");

  script_cve_id(
    "CVE-2008-2086",
    "CVE-2008-5339",
    "CVE-2008-5340",
    "CVE-2008-5341",
    "CVE-2008-5342",
    "CVE-2008-5343",
    "CVE-2008-5344",
    "CVE-2008-5345",
    "CVE-2008-5346",
    "CVE-2008-5347",
    "CVE-2008-5348",
    "CVE-2008-5349",
    "CVE-2008-5350",
    "CVE-2008-5351",
    "CVE-2008-5352",
    "CVE-2008-5353",
    "CVE-2008-5354",
    "CVE-2008-5356",
    "CVE-2008-5357",
    "CVE-2008-5359",
    "CVE-2008-5360",
    "CVE-2009-1093",
    "CVE-2009-1094",
    "CVE-2009-1095",
    "CVE-2009-1096",
    "CVE-2009-1097",
    "CVE-2009-1098",
    "CVE-2009-1099",
    "CVE-2009-1100",
    "CVE-2009-1101",
    "CVE-2009-1103",
    "CVE-2009-1104",
    "CVE-2009-1106",
    "CVE-2009-1107",
    "CVE-2009-1719"
  );
  script_bugtraq_id(32620, 32892, 32608, 34240, 35381);
  script_xref(name:"Secunia", value:"35118");

  script_name(english:"Mac OS X : Java for Mac OS X 10.5 Update 4");
  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 10.5 host is running a version of Java for
Mac OS X that is missing Update 4.

The remote version of this software contains several security
vulnerabilities.  A remote attacker could exploit these issues to
bypass security restrictions, disclose sensitive information, cause a
denial of service, or escalate privileges."
  );
  script_set_attribute(
    attribute:"see_also",
    value:"http://support.apple.com/kb/HT3632"
  );
  script_set_attribute(
    attribute:"see_also",
    value:"http://lists.apple.com/archives/Security-announce/2009/Jun/msg00003.html"
  );
  script_set_attribute(
    attribute:"solution",
    value:
"Upgrade to Java for Mac OS X 10.5 Update 4 (JavaVM Framework 12.3.0)
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:"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:"exploit_framework_canvas", value:"true");
  script_set_attribute(attribute:"canvas_package", value:'CANVAS');
  script_set_attribute(attribute:"metasploit_name", value:'Sun Java Calendar Deserialization Privilege Escalation');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_cwe_id(94);

  script_set_attribute(attribute:"patch_publication_date", value:"2009/06/15");
  script_set_attribute(attribute:"plugin_publication_date", value:"2009/06/17");

  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-2018 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");



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

function exec(cmd)
{
  local_var buf, ret;

  if (islocalhost())
    buf = pread(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+"'.");
  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))
{
  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, "Failed to 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.3.0
  if (
    ver[0] < 12 ||
    (ver[0] == 12 && ver[1] < 3)
  )
  {
    gs_opt = get_kb_item("global_settings/report_verbosity");
    if (gs_opt && gs_opt != 'Quiet')
    {
      report =
        '\n  Installed version : ' + version +
        '\n  Fixed version     : 12.3.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 + " is installed.");
}

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/macosx_java_10_5_update4.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\macosx_java_10_5_update4.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/macosx_java_10_5_update4.nasl

Go back to menu.

How to Run


Here is how to run the Mac OS X : Java for Mac OS X 10.5 Update 4 as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select MacOS X Local Security Checks plugin family.
  6. On the right side table select Mac OS X : Java for Mac OS X 10.5 Update 4 plugin ID 39435.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl macosx_java_10_5_update4.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a macosx_java_10_5_update4.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - macosx_java_10_5_update4.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state macosx_java_10_5_update4.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: Secunia Advisory: CWE | Common Weakness Enumeration:
  • CWE-94 (Weakness) Improper Control of Generation of Code ('Code Injection')
See also: Similar and related Nessus plugins:
  • 35046 - Fedora 9 : java-1.6.0-openjdk-1.6.0.0-0.20.b09.fc9 (2008-10860)
  • 42834 - GLSA-200911-02 : Sun JDK/JRE: Multiple vulnerabilities
  • 46674 - Mac OS X : Java for Mac OS X 10.6 Update 2
  • 39766 - Mac OS X : Java for Mac OS X 10.4 Release 9
  • 40731 - RHEL 4 / 5 : java-1.6.0-sun (RHSA-2008:1018)
  • 40732 - RHEL 4 / 5 : java-1.5.0-sun (RHSA-2008:1025)
  • 40737 - RHEL 4 / 5 : java-1.6.0-ibm (RHSA-2009:0015)
  • 40738 - RHEL 4 / 5 : java-1.5.0-ibm (RHSA-2009:0016)
  • 40743 - RHEL 3 / 4 / 5 : java-1.4.2-ibm (RHSA-2009:0445)
  • 53539 - RHEL 4 : Sun Java Runtime in Satellite Server (RHSA-2009:1662)
  • 44029 - RHEL 4 / 5 : IBM Java Runtime in Satellite Server (RHSA-2010:0043)
  • 35030 - Sun Java JRE Multiple Vulnerabilities (244986 et al)
  • 64828 - Sun Java JRE Multiple Vulnerabilities (244986 et al) (Unix)
  • 37381 - Ubuntu 8.10 : OpenJDK vulnerabilities (USN-713-1)
  • 89116 - VMware ESX / ESXi Multiple Vulnerabilities (VMSA-2009-0014) (remote check)
  • 42870 - VMSA-2009-0016 : VMware vCenter and ESX update release and vMA patch release address multiple security issues in third party components.
  • 89117 - VMware ESX / ESXi Multiple Vulnerabilities (VMSA-2009-0016) (remote check)
  • 45386 - VMSA-2010-0002 : VMware vCenter update release addresses multiple security issues in Java JRE
  • 89736 - VMware ESX Java Runtime Environment (JRE) Multiple Vulnerabilities (VMSA-2010-0002) (remote check)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file macosx_java_10_5_update4.nasl version 1.17. For more plugins, visit the Nessus Plugin Library.

Go back to menu.