search menu icon-carat-right cmu-wordmark

CERT Coordination Center

SSH1 may generate weak passphrase when using Secure RPC

Vulnerability Note VU#850440

Original Release Date: 2001-06-13 | Last Revised: 2001-10-25

Overview

The secure-RPC feature of the SSH1 client in Solaris sometimes encrypts the SSH private key file with a weak passphrase, which can be determined by an attacker and used to recover the SSH private keys. Other versions of the SSH client running on non-Solaris platforms are not affected by this vulnerability.

Description

On the Solaris operating system, SSH includes a feature to use Secure RPC credentials instead of requiring a separate user-supplied passphrase for SSH. This is beyond the intended use of Secure RPC and is not endorsed or in any way supported by Sun.

When the user elects to use this feature by typing "SUN-DES-1" as their SSH passphrase, SSH computes a "magic phrase" based on the user's Secure RPC public and private keys. This magic phrase is used as the passphrase to encrypt the user's SSH private key file.

The only secret used in the computation of the magic phrase is the user's Secure RPC private key. Secure RPC keys are managed by a process called keyserv, which stores the user's Secure RPC private key in memory after the user has authenticated to Secure RPC.

The computation of the magic phrase involving the secure RPC private key uses a keyserv API function called key_encryptsession. If the user has not properly authenticated to Secure RPC, then her private key is not available to key_encryptsession. Unless keyserv was started with the "-d" flag, key_encryptsession will attempt to use the nobody user's private key instead. If keyserv holds a private key for the nobody user, it will be used by key_encryptsession to compute a magic phrase which can be easily recovered by an attacker. Since the magic phrase is used to encrypt the SSH private key file, compromise of the magic phrase also compromises the SSH private keys and the cleartext of the user's SSH sessions. If keyserv does not have the nobody user's private key, key_encryptsession returns an error, which in turn causes SSH to display an error message.

The key_encryptsession function can use the nobody user's private key only if keyserv has found and stored it. Typically, the keyserv process finds the nobody keys from the /etc/publickey file. If the system is configured for NIS, the default lookup behavior allows keyserv to search this file. If the system is configured for NIS+, the default lookup behavior prevents the file from being searched for keys.

Running keyserv with the "-d" flag will stop key_encryptsession from using the nobody user's private key as a fallback when the caller's private key is not found in keyserv.

Impact

A weakly-encrypted key file may be used to obtain unauthorized privileges of affected users. The impact is based on the sensitivity of the information being communicated through SSH.

Solution

SSH1 users should install the patch available at: http://www.ssh.com/products/ssh/patches.html

This patch relies on a function of keyserv API version 2, which is supported in Solaris 2.x. This version of the keyserv API may not have been included in Solaris 1.x, so the patch may not provide a complete solution for machines running Solaris 1.x.

Always authenticate to Secure RPC before generating SSH keys using the "SUN-DES-1" passphrase. If your login password is the same as your Secure RPC password, the standard Solaris login methods (login, dtlogin, etc.) will authenticate you to Secure RPC. Otherwise, you should run keylogin to authenticate to Secure RPC.

For better assurance, remove the nobody user entry from the /etc/publickey file or, for a more complete fix, run keyserv with the "-d" flag.

Vendor Information

850440
 

SSH Communications Security Affected

Updated:  June 13, 2001

Status

Affected

Vendor Statement

"There is a bug in SSH-1.2.30 involving Secure RPC. The patch for this is available at http://www.ssh.com/patches.html .... The SSH1 protocol is not formally supported by SSH Communications Security. However, as a service to the user community, we offer this patch as a potential way of addressing SSH1 related issues."

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

Addendum

The CERT/CC has no additional comments at this time.

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

Sun Affected

Notified:  April 23, 2001 Updated: June 07, 2001

Status

Affected

Vendor Statement

"This is beyond the intended use of Secure RPC and is not endorsed or in any way supported by Sun."

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

Addendum

The CERT/CC has no additional comments at this time.

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


CVSS Metrics

Group Score Vector
Base
Temporal
Environmental

References

Acknowledgements

Thanks to Richard Silverman for discovering this vulnerability and reporting it to the BugTraq mailing list at SecurityFocus.

This document was written by Shawn Van Ittersum.

Other Information

CVE IDs: CVE-2001-0259
Severity Metric: 1.89
Date Public: 2001-01-16
Date First Published: 2001-06-13
Date Last Updated: 2001-10-25 23:26 UTC
Document Revision: 22

Sponsored by CISA.