Vulnerabilities > CVE-2002-1359 - Improper Input Validation vulnerability in multiple products

047910
CVSS 10.0 - CRITICAL
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
low complexity
cisco
fissh
intersoft
netcomposite
pragma-systems
putty
winscp
CWE-20
critical
nessus
exploit available
metasploit

Summary

Multiple SSH2 servers and clients do not properly handle large packets or large fields, which may allow remote attackers to cause a denial of service or possibly execute arbitrary code via buffer overflow attacks, as demonstrated by the SSHredder SSH protocol test suite.

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Server Side Include (SSI) Injection
    An attacker can use Server Side Include (SSI) Injection to send code to a web application that then gets executed by the web server. Doing so enables the attacker to achieve similar results to Cross Site Scripting, viz., arbitrary code execution and information disclosure, albeit on a more limited scale, since the SSI directives are nowhere near as powerful as a full-fledged scripting language. Nonetheless, the attacker can conveniently gain access to sensitive files, such as password files, and execute shell commands.
  • Cross Zone Scripting
    An attacker is able to cause a victim to load content into their web-browser that bypasses security zone controls and gain access to increased privileges to execute scripting code or other web objects such as unsigned ActiveX controls or applets. This is a privilege elevation attack targeted at zone-based web-browser security. In a zone-based model, pages belong to one of a set of zones corresponding to the level of privilege assigned to that page. Pages in an untrusted zone would have a lesser level of access to the system and/or be restricted in the types of executable content it was allowed to invoke. In a cross-zone scripting attack, a page that should be assigned to a less privileged zone is granted the privileges of a more trusted zone. This can be accomplished by exploiting bugs in the browser, exploiting incorrect configuration in the zone controls, through a cross-site scripting attack that causes the attackers' content to be treated as coming from a more trusted page, or by leveraging some piece of system functionality that is accessible from both the trusted and less trusted zone. This attack differs from "Restful Privilege Escalation" in that the latter correlates to the inadequate securing of RESTful access methods (such as HTTP DELETE) on the server, while cross-zone scripting attacks the concept of security zones as implemented by a browser.
  • Cross Site Scripting through Log Files
    An attacker may leverage a system weakness where logs are susceptible to log injection to insert scripts into the system's logs. If these logs are later viewed by an administrator through a thin administrative interface and the log data is not properly HTML encoded before being written to the page, the attackers' scripts stored in the log will be executed in the administrative interface with potentially serious consequences. This attack pattern is really a combination of two other attack patterns: log injection and stored cross site scripting.
  • Command Line Execution through SQL Injection
    An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.

Exploit-Db

  • descriptionPuTTy.exe. CVE-2002-1359. Remote exploit for windows platform
    idEDB-ID:1788
    last seen2016-01-31
    modified2006-05-15
    published2006-05-15
    reportery0
    sourcehttps://www.exploit-db.com/download/1788/
    titlePuTTy.exe <= 0.53 - validation Remote Buffer Overflow Exploit meta
  • descriptionPuTTy.exe. CVE-2002-1359. Remote exploit for windows platform
    idEDB-ID:16463
    last seen2016-02-01
    modified2010-06-15
    published2010-06-15
    reportermetasploit
    sourcehttps://www.exploit-db.com/download/16463/
    titlePuTTy.exe <= 0.53 - Buffer Overflow

Metasploit

descriptionThis module exploits a buffer overflow in the PuTTY SSH client that is triggered through a validation error in SSH.c. This vulnerability affects versions 0.53 and earlier.
idMSF:EXPLOIT/WINDOWS/SSH/PUTTY_MSG_DEBUG
last seen2020-05-22
modified2017-07-24
published2006-12-14
references
reporterRapid7
sourcehttps://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/windows/ssh/putty_msg_debug.rb
titlePuTTY Buffer Overflow

Nessus

  • NASL familyMisc.
    NASL idSSH_MULTIVULNS_16122002.NASL
    descriptionAccording 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.
    last seen2020-06-01
    modified2020-06-02
    plugin id11195
    published2002-12-20
    reporterThis script is Copyright (C) 2002-2018 Paul Johnston, Westpoint Ltd
    sourcehttps://www.tenable.com/plugins/nessus/11195
    titleSSH Multiple Remote Vulnerabilities
    code
    #
    # 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);
    }
    
  • NASL familyCISCO
    NASL idCISCO-SA-20021219-SSH-PACKETHTTP.NASL
    descriptionCertain Cisco products containing support for the Secure Shell (SSH) server are vulnerable to a Denial of Service (DoS) if the SSH server is enabled on the device. A malformed SSH packet directed at the affected device can cause a reload of the device. No authentication is necessary for the packet to be received by the affected device. The SSH server in Cisco IOS is disabled by default. Cisco will be making free software available to correct the problem as soon as possible. The malformed packets can be generated using the SSHredder test suite from Rapid7, Inc. Workarounds are available. The Cisco PSIRT is not aware of any malicious exploitation of this vulnerability.
    last seen2019-10-28
    modified2010-09-01
    plugin id48968
    published2010-09-01
    reporterThis script is (C) 2010-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/48968
    titleSSH Malformed Packet Vulnerabilities - Cisco Systems
  • NASL familyCISCO
    NASL idCSCDZ60229.NASL
    descriptionIt is possible to make the remote IOS crash when sending it malformed SSH packets during the key exchange. These flaws are documented as CISCO bug ID CSCdz60229, CSCdy87221 and CSCdu75477.
    last seen2020-06-01
    modified2020-06-02
    plugin id11383
    published2003-03-14
    reporterThis script is (C) 2003-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/11383
    titleCisco SSH2 Server/Client Malformed Packet Remote DoS (CSCdz60229, CSCdy87221, CSCdu75477)

Oval

accepted2008-09-08T04:00:53.225-04:00
classvulnerability
contributors
nameYuzheng Zhou
organizationHewlett-Packard
descriptionMultiple SSH2 servers and clients do not properly handle large packets or large fields, which may allow remote attackers to cause a denial of service or possibly execute arbitrary code via buffer overflow attacks, as demonstrated by the SSHredder SSH protocol test suite.
familyios
idoval:org.mitre.oval:def:5848
statusaccepted
submitted2008-05-02T11:06:36.000-04:00
titleMultiple Vendors SSH2 "buffer overflow" Vulnerability
version3

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/83008/putty_msg_debug.rb.txt
idPACKETSTORM:83008
last seen2016-12-05
published2009-11-26
reporterMC
sourcehttps://packetstormsecurity.com/files/83008/PuTTy.exe-v0.53-Buffer-Overflow.html
titlePuTTy.exe <= v0.53 Buffer Overflow