SSH Multiple Remote Vulnerabilities - Nessus

Medium   Plugin ID: 11195

This page contains detailed information about the SSH Multiple Remote Vulnerabilities Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 11195
Name: SSH Multiple Remote Vulnerabilities
Filename: ssh_multivulns_16122002.nasl
Vulnerability Published: 2002-12-16
This Plugin Published: 2002-12-20
Last Modification Time: 2018-11-15
Plugin Version: 1.27
Plugin Type: remote
Plugin Family: Misc.
Dependencies: os_fingerprint.nasl, ssh_detect.nasl

Vulnerability Information


Severity: Medium
Vulnerability Published: 2002-12-16
Patch Published: N/A
CVE [?]: CVE-2002-1357, CVE-2002-1358, CVE-2002-1359, CVE-2002-1360
CPE [?]: N/A

Synopsis

It may be possible to crash the SSH server on the remote host.

Description

According to its banner, the remote SSH server is affected by one or more of the following vulnerabilities :

- CVE-2002-1357 (incorrect length)

- CVE-2002-1358 (lists with empty elements/empty strings)

- CVE-2002-1359 (large packets and large fields)

- CVE-2002-1360 (string fields with zeros)

The impact of successful exploitation of these vulnerabilities varies across products. In some cases, remote attackers will be able to execute arbitrary code with the privileges of the SSH process (usually root), although for the products currently tested, the maximum impact is believed to be just a denial of service.

Solution

Contact the vendor for an update.

Public Exploits


Target Network Port(s): 22
Target Asset(s): Services/ssh
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the SSH Multiple Remote Vulnerabilities vulnerability:

  1. Metasploit: exploit/windows/ssh/putty_msg_debug
    [PuTTY Buffer Overflow]
  2. Exploit-DB: exploits/windows/remote/1788.pm
    [EDB-1788: PuTTy.exe 0.53 - Validation Remote Buffer Overflow (Metasploit)]
  3. Exploit-DB: exploits/windows/remote/16463.rb
    [EDB-16463: PuTTy.exe 0.53 - Remote Buffer Overflow (Metasploit)]
  4. GitHub: https://github.com/kaleShashi/PuTTY
    [CVE-2002-1357]
  5. GitHub: https://github.com/pbr94/PuTTy-
    [CVE-2002-1357]
  6. GitHub: https://github.com/kaleShashi/PuTTY
    [CVE-2002-1359]
  7. GitHub: https://github.com/pbr94/PuTTy-
    [CVE-2002-1359]
  8. GitHub: https://github.com/kaleShashi/PuTTY
    [CVE-2002-1360]
  9. GitHub: https://github.com/pbr94/PuTTy-
    [CVE-2002-1360]

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

Go back to menu.

Plugin Source


This is the ssh_multivulns_16122002.nasl nessus plugin source code. This script is Copyright (C) 2002-2018 Paul Johnston, Westpoint Ltd

#
# This script was written by Paul Johnston of Westpoint Ltd <[email protected]>
#
# See the Nessus Scripts License for details
#

# Changes by Tenable:
# - Revised plugin title, family change (8/10/09)
# - Updated to use compat.inc, added CVSS score (11/20/2009)

include("compat.inc");

if (description)
{
  script_id(11195);
  script_version("1.27");
  script_cvs_date("Date: 2018/11/15 20:50:24");

  script_cve_id("CVE-2002-1357", "CVE-2002-1358", "CVE-2002-1359", "CVE-2002-1360");
  script_xref(name:"CERT-CC", value:"CA-2002-36");

  script_name(english:"SSH Multiple Remote Vulnerabilities");
  script_summary(english:"SSH Multiple Vulnerabilities 16/12/2002");

  script_set_attribute(attribute:"synopsis", value:"It may be possible to crash the SSH server on the remote host.");
  script_set_attribute(attribute:"description", value:
"According to its banner, the remote SSH server is affected by one or
more of the following vulnerabilities :

  - CVE-2002-1357 (incorrect length)

  - CVE-2002-1358 (lists with empty elements/empty strings)

  - CVE-2002-1359 (large packets and large fields)

  - CVE-2002-1360 (string fields with zeros)

The impact of successful exploitation of these vulnerabilities varies
across products.  In some cases, remote attackers will be able to
execute arbitrary code with the privileges of the SSH process (usually
root), although for the products currently tested, the maximum impact is
believed to be just a denial of service.");
  script_set_attribute(attribute:"see_also", value:"http://www.rapid7.com/advisories/R7-0009.txt");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/vulnwatch/2002/q4/88");
  script_set_attribute(attribute:"solution", value:"Contact the vendor for an update.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/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:"metasploit_name", value:'PuTTY Buffer Overflow');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_cwe_id(20, 119);

  script_set_attribute(attribute:"vuln_publication_date", value:"2002/12/16");
  script_set_attribute(attribute:"plugin_publication_date", value:"2002/12/20");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_end_attributes();

  script_category(ACT_GATHER_INFO); 
  script_copyright(english:"This script is Copyright (C) 2002-2018 Paul Johnston, Westpoint Ltd");
  script_family(english:"Misc.");
  script_require_ports("Services/ssh", 22);
  script_dependencie("ssh_detect.nasl", "os_fingerprint.nasl");

  exit(0);
}

#
# The script code starts here
#
include("backport.inc");
port = get_kb_item("Services/ssh");
if (!port) port = 22;

banner = get_kb_item("SSH/banner/" + port);
if ( ! banner ) exit(0);


banner = get_backport_banner(banner:banner);


#
# SSH-2.0-3.2.0 F-Secure SSH Windows NT Server
# versions up to 3.1.* affected
#
if(ereg(pattern:"^SSH-2.0-([12]\..*|3\.[01]\..*) F-Secure SSH", string:banner, icase:TRUE))
{ 
  security_warning(port);
}

#
# SSH-2.0-3.2.0 SSH Secure Shell Windows NT Server
# versions up to 3.1.* affected
#
if(ereg(pattern:"^SSH-2.0-([12]\..*|3\.[01]\..*) SSH Secure Shell", string:banner, icase:TRUE))
{ 
  type = get_kb_item("Host/OS/Type");
  if ( isnull(type) || type == "embedded" ) exit(0);
  security_warning(port);
}

#
# SSH-1.99-Pragma SecureShell 3.0
# versions up to 2.* affected
#
if(ereg(pattern:"^SSH-1.99-Pragma SecureShell ([12]\..*)", string:banner, icase:TRUE))
{ 
  security_warning(port);
}

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

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

Go back to menu.

How to Run


Here is how to run the SSH Multiple Remote Vulnerabilities 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 Misc. plugin family.
  6. On the right side table select SSH Multiple Remote Vulnerabilities plugin ID 11195.
  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 ssh_multivulns_16122002.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


CERT-CC | CERT Coordination Center:
  • CA-2002-36
CWE | Common Weakness Enumeration:
  • CWE-20 (Weakness) Improper Input Validation
  • CWE-119 (Weakness) Improper Restriction of Operations within the Bounds of a Memory Buffer
See also: Similar and related Nessus plugins:
  • 48968 - SSH Malformed Packet Vulnerabilities - Cisco Systems
  • 11383 - Cisco SSH2 Server/Client Malformed Packet Remote DoS (CSCdz60229, CSCdy87221, CSCdu75477)
  • 70658 - SSH Server CBC Mode Ciphers Enabled
  • 10607 - SSH CRC-32 Compensation Attack Remote Overflow
  • 86328 - SSH Diffie-Hellman Modulus <= 1024 Bits (Logjam)
  • 32320 - Weak Debian OpenSSH Keys in ~/.ssh/authorized_keys
  • 32314 - Debian OpenSSH/OpenSSL Package Random Number Generator Weakness
  • 73920 - SSH Static Key Accepted
  • 63156 - Tectia SSH Server Authentication Bypass
  • 118154 - SSH Protocol Authentication Bypass (Remote Exploit Check)

Version


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

Go back to menu.