search menu icon-carat-right cmu-wordmark

CERT Coordination Center

Some SSH servers on Microsoft Windows set insecure permissions for the host identification key file

Vulnerability Note VU#973635

Original Release Date: 2005-07-18 | Last Revised: 2005-09-09

Overview

SSH provides remote, encrypted terminal access to hosts. Some SSH servers, when running on Microsoft Windows, set insecure permissions on the file storing the private SSH server hostkey. This could allow an authenticated user to obtain the SSH hostkey and use it to impersonate the server.

Description

Some SSH servers create the hostkey with permissions that allow any user to read the file. As a result, any user logged into the system can read the private SSH hostkey.

The hostkey is used to authenticate the server to the client. This defends against redirection attacks, such as DNS hijacking that cause the client to connect to a malicious server. In such cases, clients that know the public hostkey can verify that the server has the private hostkey, thereby verifying the server is correct.

Impact

If an attacker copies the private hostkey of a server, they can configure a server with the same private key as the legitimate server. Such a server would appear valid to clients if another attack, such as DNS hijacking, was used to trick the client into connecting to the attacker's server.

Solution

Upgrade

Upgrade per vendor information.

Hostkey Regeneration

Regardless of how the vulnerability is addressed, the hostkey may already have been compromised. Regenerating the hostkey will address this problem, although SSH clients with the old key will emit warnings when connecting to the server after the hostkey has been regenerated.


Workaround

Correct Permissions

Manually change the permissions on the hostkey file so that only the Administrator group can read the file. The default file in which the private hostkey file is stored varies by vendor.

Vendor Information

973635
 

CVSS Metrics

Group Score Vector
Base
Temporal
Environmental

References

Acknowledgements

Thanks to SSH Communications Security for reporting this vulnerability.

This document was written by Hal Burch.

Other Information

CVE IDs: CVE-2005-2146
Severity Metric: 3.45
Date Public: 2005-06-30
Date First Published: 2005-07-18
Date Last Updated: 2005-09-09 18:48 UTC
Document Revision: 38

Sponsored by CISA.