This vulnerability may allow an attacker to replay a captured SSH1 session.
When an SSH1 session using the RC4 cipher is established, the client and server agree upon a session key (SK), which is generated using a server key (VK) that is renewed on a regular basis (one hour by default). The server uses the first 16 bytes of SK as an RC4 key (SK1) and the client uses the last 16 bytes (SK2). The server also generates a session ID (SID) that uniquely identifies the current session. During the session, the server XORs the SID with SK1 and uses the resulting key (SK1') to encrypt its traffic. However, the client does not perform this XOR operation, so it simply uses SK2 for encrypting traffic to the server.
If the victim (client) has requested password authentication for this session, the attacker can record the victim's conversation and then replay it as long as the server key (VK) has not yet expired. Under default configurations, this presents the attacker with a one hour window in which to replay the conversation.
The reason this vulnerability exists is twofold. First, the method used to generate the RC4 keys is faulty. Second, when password authentication is used, the server ignores session ID information, preventing it from detecting that the SID of the replayed connection does not match the SID that the server generated when the attacker began the conversation.
It is important to note that there are significant preconditions and limitations present in this vulnerability. The preconditions are that the victim must request the use of both RC4 and password authentication, and the server must allow both. The limitation is that attackers cannot actually decrypt the original conversation; they can only replay what they've recorded.
Attackers can replay a client's session to the server within a limited window of time.
SSH suggests that customers upgrade to SSH2.
If an upgrade is not possible, users should disable RC4 and password authentication.
SSH Communications Security
The CERT/CC thanks Antti Huima, Tuomas Aura, and Janne Salmi for their analysis and Tatu Ylonen for bringing this vulnerability to our attention.
This document was written by Jeffrey P. Lanza.
|Date First Published:||2001-01-18|
|Date Last Updated:||2002-03-05 20:22 UTC|