SkipNavigation
US-CERT
American Flag
  Vulnerability
Notes
Database

Search Vulnerability Notes

Vulnerability Notes Help Information


 
 View Notes By
  Name

ID Number

CVE Name

Date Public

Date Published

Date Updated

Severity Metric



 Other Documents
  Technical Alerts

Technical Bulletins

Alerts

Security Tips

 

Vulnerability Note VU#978316

Vulnerability in OpenSSH daemon (sshd)

Overview

A vulnerability in the OpenSSH daemon (sshd) may give remote attackers a better chance of gaining access to restricted resources.

I. Description

OpenSSH is an implementation of the Secure Shell protocol. It is used to provide strong authentication and cryptographically secure communications between hosts. A vulnerability in versions up to and including 3.6.1 of OpenSSH may allow a remote attacker to circumvent security policies and attempt to or actually login from IP addresses that are not permitted to access resources.

There are two methods a client can use to authenticate to an SSH server. The first method is password authentication. This method is generally the easiest to set up, but the least secure. As long as the client has a valid username and password, they can gain access to the system running the SSH server. The second method is public key authentication. Public key authentication is one of the most secure methods available to authenticate a user. For a client to gain access to a system using public key authentication, a copy of the client's public key must exist on the SSH server. The client must also have the private key in their possession as well as the passphrase associated with the private key.

In addition to the methods available to authenticate a user, there also exists ways in which one can restrict access to the SSH server, such that connections are permitted only from trusted hosts. One of the most common methods is by utilizing a firewall to do host-based access restriction. Additionally, sshd has the ability to restrict access by IP address or hostname. While this is not cryptographically strong security, it provides an additional layer of protection which some sites rely upon to limit their exposure.

A flaw exists in the way OpenSSH evaluates IP addresses and hostnames. We have included an excerpt of the report sent to BugTraq regarding this vulnerability:

    Interestingly, when a purely numeric IP address is provided, an attacker who controls reverse DNS for his host can circumvent this controls by returning text containing a numeric IP address in the reverse DNS response. This would allow stolen keys containing numeric IP address restrictions to be used from other IP address, or external access to a system which had

    AllowUsers *@192.168.*.*

    set in an attempt to limit access to users in the internal 192.168/16 network.

    The exploit works because the code treats both the IP address and hostname as strings, and there is no logic to indicate when a pure IP address match should be attempted.

II. Impact

An attacker can attempt to login to your system from a location that is not allowed. If the attacker has a private key in their possession that is allowed to access the system, they will be able to gain entry to the network. If the attacker does not have a legitimate private key, they may be able to guess a correct username/password pair if you allow password authentication.

III. Solution

The OpenSSH maintainers recommend enabling VerifyReverseMapping in sshd_config. You may also wish to restrict access to the secure shell service by applying packet filters for port 22/tcp at your network perimeter. While this measure will limit your exposure to attacks, blocking port 22/tcp at a network perimeter would still allow attackers within the perimeter of your network to exploit the vulnerability. It is important to understand your network's configuration and service requirements before deciding what changes are appropriate. In cases where applying packet filters is not feasible, software such as Wietse Venema's TCP Wrappers can be used to restrict access to the secure shell daemon. Finally, it is highly advisable to use public key authentication as opposed to password authentication. In our estimation, this vulnerability does not pose an imminent threat; however, it permits a greater-than-expected level of access to a security control in your infrastructure. The next release of OpenSSH will drop the VerifyReverseMapping option and, subsequently, sshd will by default perform reverse-mapping. At this point in time, we do not know if the OpenSSH maintainers plan to make a patch available before the next release.

Systems Affected

VendorStatusDate Updated
3ComUnknown6-Jun-2003
AlcatelNot Vulnerable1-Aug-2003
Apple Computer, Inc.Unknown6-Jun-2003
AT&TUnknown6-Jun-2003
AvayaUnknown6-Jun-2003
Berkeley Software Design, Inc.Unknown6-Jun-2003
BitviseUnknown6-Jun-2003
BorderwareUnknown6-Jun-2003
Cisco Systems, Inc.Unknown6-Jun-2003
ClavisterNot Vulnerable9-Jun-2003
Computer AssociatesUnknown6-Jun-2003
Cray Inc.Vulnerable9-Jun-2003
D-Link SystemsUnknown6-Jun-2003
Data GeneralUnknown6-Jun-2003
Debian LinuxUnknown6-Jun-2003
EngardeUnknown6-Jun-2003
eSoftUnknown6-Jun-2003
Extreme NetworksNot Vulnerable24-Jun-2003
F-SecureUnknown6-Jun-2003
F5 Networks, Inc.Unknown6-Jun-2003
FiSSHUnknown6-Jun-2003
Foundry Networks Inc.Not Vulnerable9-Jun-2003
FreeBSD, Inc.Unknown6-Jun-2003
FreeS/WANUnknown6-Jun-2003
FreSSHUnknown6-Jun-2003
FujitsuNot Vulnerable16-Jul-2003
Global Technology AssociatesUnknown6-Jun-2003
Hewlett-Packard CompanyUnknown6-Jun-2003
HitachiNot Vulnerable18-Jun-2003
IBM CorporationVulnerable19-Jun-2003
IBM eServerUnknown24-Jun-2003
Ingrian Networks, Inc.Unknown6-Jun-2003
IntelUnknown6-Jun-2003
Internet Initiative Japan (IIJ)Unknown6-Jun-2003
InterpeakUnknown6-Jun-2003
Intersoft International Inc.Unknown6-Jun-2003
IntotoUnknown6-Jun-2003
Juniper Networks, Inc.Unknown6-Jun-2003
KAME ProjectUnknown6-Jun-2003
LachmanUnknown6-Jun-2003
Lotus SoftwareNot Vulnerable6-Jun-2003
lshUnknown6-Jun-2003
Lucent TechnologiesUnknown6-Jun-2003
MacSSHNot Vulnerable6-Jun-2003
Mandriva, Inc.Unknown6-Jun-2003
Mandriva, Inc.Unknown6-Jun-2003
Microsoft CorporationUnknown6-Jun-2003
MirapointUnknown6-Jun-2003
MontaVista Software, Inc.Unknown6-Jun-2003
Multi-Tech Systems Inc.Unknown6-Jun-2003
MultinetUnknown6-Jun-2003
NEC CorporationUnknown6-Jun-2003
NetBSDVulnerable9-Jun-2003
NetcompositeUnknown6-Jun-2003
NetscreenUnknown6-Jun-2003
Network ApplianceUnknown6-Jun-2003
NeXTUnknown6-Jun-2003
NokiaUnknown6-Jun-2003
Nortel Networks, Inc.Unknown6-Jun-2003
OpenBSDUnknown6-Jun-2003
OpenSSHVulnerable6-Jun-2003
Openwall GNU/*/LinuxUnknown6-Jun-2003
Oracle CorporationUnknown6-Jun-2003
Pragma SystemsUnknown6-Jun-2003
PuttyUnknown6-Jun-2003
Red Hat, Inc.Unknown6-Jun-2003
Riverstone NetworksNot Vulnerable10-Jun-2003
SafeNetUnknown6-Jun-2003
SCOUnknown6-Jun-2003
Secure Computing CorporationNot Vulnerable16-Jun-2003
Sequent Computer Systems, Inc.Unknown6-Jun-2003
SGIUnknown6-Jun-2003
Sony CorporationUnknown6-Jun-2003
SSH Communications SecurityNot Vulnerable14-Jul-2003
StonesoftNot Vulnerable11-Jun-2003
Sun Microsystems, Inc.Vulnerable16-Jan-2007
SUSE LinuxUnknown6-Jun-2003
TTSSH/TeraTermUnknown6-Jun-2003
UnisysUnknown6-Jun-2003
VanDyke Software Inc.Vulnerable16-Jun-2003
WatchGuardNot Vulnerable10-Jun-2003
Wind River Systems, Inc.Unknown6-Jun-2003
WinSCPUnknown6-Jun-2003
WirexUnknown6-Jun-2003
Xerox CorporationNot Vulnerable14-Jul-2003
ZyXELUnknown6-Jun-2003

References


http://www.securityfocus.com/archive/1/324016/2003-06-03/2003-06-09/0
ftp://ftp.porcupine.org/pub/security/tcp_wrappers_7.6.tar.gz
http://www.ietf.org/html.charters/secsh-charter.html
http://www.openssh.com/
http://www.iss.net/security_center/static/12196.php

Credit

This vulnerability was discovered by Mike Harding. Note that this behavior of OpenSSH was in fact noticed and published two years earlier by Richard Silverman and Dan Barrett in "SSH, The Secure Shell: The Definitive Guide" (O'Reilly 2001, ISBN 0-596-00011-1). See section 5.5.2.1, p179 in the first edition.

This document was written by Ian A Finlay.

Other Information

Date Public06/04/2003
Date First Published06/06/2003 01:44:51 PM
Date Last Updated01/16/2007
CERT Advisory 
CVE NameCVE-2003-0386
US-CERT Technical Alerts 
Metric37.13
Document Revision38

If you have feedback, comments, or additional information about this vulnerability, please send us email.
 

 
Page Corner Image
Copyright 2003 Carnegie Mellon University
Disclaimers and copyright information
Get Adobe Reader Get Adobe Reader