yaSSL 1.7.5 Buffer Overflow - Nessus

High   Plugin ID: 17814

This page contains detailed information about the yaSSL 1.7.5 Buffer Overflow Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 17814
Name: yaSSL 1.7.5 Buffer Overflow
Filename: mysql_6_0_4_yaSSL.nasl
Vulnerability Published: 2008-01-22
This Plugin Published: 2012-01-16
Last Modification Time: 2018-11-15
Plugin Version: 1.7
Plugin Type: remote
Plugin Family: Databases
Dependencies: mysql_login.nasl, mysql_version.nasl
Required KB Items [?]: Settings/ParanoidReport

Vulnerability Information


Severity: High
Vulnerability Published: 2008-01-22
Patch Published: N/A
CVE [?]: CVE-2008-0226, CVE-2008-0227
CPE [?]: cpe:/a:mysql:mysql

Synopsis

Arbitrary code can be executed on the remote database server.

Description

The version of MySQL installed on the remote host reportedly allows a remote user to execute arbitrary code by exploiting a buffer overflow in yaSSL 1.7.5 or earlier.

Solution

Upgrade to MySQL version 5.0.54a, 5.1.23, 6.0.4 or later.

Public Exploits


Target Network Port(s): 3306
Target Asset(s): Services/mysql
Exploit Available: True (Metasploit Framework, Exploit-DB, Core Impact)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the yaSSL 1.7.5 Buffer Overflow vulnerability:

  1. Metasploit: exploit/linux/mysql/mysql_yassl_hello
    [MySQL yaSSL SSL Hello Message Buffer Overflow]
  2. Metasploit: exploit/windows/mysql/mysql_yassl_hello
    [MySQL yaSSL SSL Hello Message Buffer Overflow]
  3. Exploit-DB: exploits/linux/remote/9953.rb
    [EDB-9953: MySQL 6.0 yaSSL 1.7.5 - Hello Message Buffer Overflow (Metasploit)]
  4. Exploit-DB: exploits/windows/remote/16701.rb
    [EDB-16701: MySQL yaSSL (Windows) - SSL Hello Message Buffer Overflow (Metasploit)]
  5. Exploit-DB: exploits/linux/remote/16849.rb
    [EDB-16849: MySQL yaSSL (Linux) - SSL Hello Message Buffer Overflow (Metasploit)]

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:L/Au:N/C:P/I:P/A:P/E:F/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.2 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.2 (Medium)

Go back to menu.

Plugin Source


This is the mysql_6_0_4_yaSSL.nasl nessus plugin source code. This script is Copyright (C) 2012-2018 and is owned by Tenable, Inc. or an Affiliate thereof.

#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(17814);
  script_version("1.7");
  script_cvs_date("Date: 2018/11/15 20:50:21");

  script_cve_id("CVE-2008-0226", "CVE-2008-0227");
  script_bugtraq_id(27140);	# 31681 is retired

  script_name(english:"yaSSL 1.7.5 Buffer Overflow");
  script_summary(english:"Checks version of MySQL Server");

  script_set_attribute(attribute:"synopsis", value:
"Arbitrary code can be executed on the remote database server.");
  script_set_attribute(attribute:"description", value:
"The version of MySQL installed on the remote host reportedly allows a
remote user to execute arbitrary code by exploiting a buffer overflow
in yaSSL 1.7.5 or earlier.");
  script_set_attribute(attribute:"see_also", value:"https://bugs.mysql.com/bug.php?id=33814");
  script_set_attribute(attribute:"see_also", value:"https://www.securityfocus.com/archive/1/archive/1/485810/100/0/threaded");
  script_set_attribute(attribute:"solution", value:
"Upgrade to MySQL version 5.0.54a, 5.1.23, 6.0.4 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:F/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:"metasploit_name", value:'MySQL yaSSL SSL Hello Message Buffer Overflow');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_cwe_id(119);

  script_set_attribute(attribute:"vuln_publication_date", value:"2008/01/22");
  script_set_attribute(attribute:"plugin_publication_date", value:"2012/01/16");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:mysql:mysql");
  script_end_attributes();
 
  script_category(ACT_GATHER_INFO);
  script_family(english:"Databases");

  script_copyright(english:"This script is Copyright (C) 2012-2018 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("mysql_version.nasl", "mysql_login.nasl");
  script_require_keys("Settings/ParanoidReport");
  script_require_ports("Services/mysql", 3306);

  exit(0);
}


include("mysql_version.inc");

mysql_check_version(fixed:make_list('5.0.55', '5.1.23', '6.0.4'), severity:SECURITY_HOLE);

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

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

Go back to menu.

How to Run


Here is how to run the yaSSL 1.7.5 Buffer Overflow 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 Databases plugin family.
  6. On the right side table select yaSSL 1.7.5 Buffer Overflow plugin ID 17814.
  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 mysql_6_0_4_yaSSL.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

/opt/nessus/bin/nasl -T - mysql_6_0_4_yaSSL.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 mysql_6_0_4_yaSSL.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: CWE | Common Weakness Enumeration:
  • CWE-119 (Weakness) Improper Restriction of Operations within the Bounds of a Memory Buffer
See also: Similar and related Nessus plugins:
  • 30125 - Debian DSA-1478-1 : mysql-dfsg-5.0 - buffer overflows
  • 34374 - Mac OS X Multiple Vulnerabilities (Security Update 2008-007)
  • 36561 - Mandriva Linux Security Advisory : mysql (MDVSA-2008:150)
  • 34159 - MySQL Community Server 5.0 < 5.0.67 Multiple Vulnerabilities
  • 31638 - Ubuntu 6.06 LTS / 6.10 / 7.04 / 7.10 : mysql-dfsg-5.0 vulnerabilities (USN-588-1)
  • 31783 - Ubuntu 6.06 LTS : mysql-dfsg-5.0 regression (USN-588-2)
  • 17835 - MySQL < 5.0.90 / 5.1.43 / 5.5.0-m2 Multiple Buffer Overflows
  • 65734 - MySQL 5.5 < 5.5.30 yaSSL Buffer Overflow
  • 63147 - MariaDB 5.1 < 5.1.66 Buffer Overflow
  • 63148 - MariaDB 5.2 < 5.2.13 Buffer Overflow
  • 63149 - MariaDB 5.3 < 5.3.11 Buffer Overflow
  • 63150 - MariaDB 5.5 < 5.5.28a Buffer Overflow

Version


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

Go back to menu.