CERT Coordination Center

Cisco IOS fails to properly handle telnet connections

Vulnerability Note VU#384230

Original Release Date: 2004-08-27 | Last Revised: 2004-09-03

Overview

A denial-of-service vulnerability exists in Cisco's Internetwork Operating System (IOS). This vulnerability could allow remote attackers to prevent new connections to remote management services on a vulnerable device.

Description

Cisco IOS devices can be remotely managed using a number of protocols, including Secure Shell (ssh), Secure Copy (scp), Remote Shell (rsh), Telnet, Reverse Telnet, and the Hypertext Transfer Protocol (http). While telnet and reverse telnet are both used to manage devices remotely, the reverse telnet protocol provides the ability to telnet to a device and then subsequently connect to a third device using an asynchronous serial connection. Cisco IOS contains a vulnerability that allows specially crafted TCP packets sent to the telnet or reverse telnet service to cause the device to refuse subsequent connections to these management services.

There are reports of this vulnerability being actively exploited.

Impact

An unauthenticated, remote attacker with the ability to send TCP packets to ports used by the telnet (23/tcp) or reverse telnet (2001-2999/tcp, 3001-3099/tcp, 6001-6999/tcp, 7001-7099/tcp) service could cause a vulnerable device to refuse subsequent connections to the SSH, SCP, RSH, telnet, reverse telnet, and HTTP remote management services. Exploitation of this vulnerability could deny remote access to the device. Existing connections to these services are not affected.Note: HTTP can be used to manage certain Cisco devices. Version 1.0 of the Cisco HTTP server, which is included in IOS versions prior to 12.2(15) is affected by this vulnerability. Version 1.1 of the Cisco HTTP server, which is included in IOS versions after and including 12.2(15) is not affected by this vulnerability.

In order to regain functionality, the problematic TCP connection must be cleared, or the device may need to be reloaded.

Solution

Until patches are available to address this issue, Cisco recommends the following workarounds to mitigate this vulnerability.

In addition to configuring a VTY access class, it may be desirable to block all telnet traffic from entering the network. The example below demonstrates how to block TCP port 23 and the reverse telnet traffic while permitting all other IP traffic:

Telnet should be blocked as part of a Transit ACL controlling all access to the trusted network. Transit ACLs are considered a network security best practice and should be considered as a long-term addition to good network security, as well as a workaround for this specific vulnerability. The white paper entitled "Transit Access Control Lists: Filtering at Your Edge" presents guidelines and recommended deployment techniques for transit ACLs:

Although it is often difficult to block traffic traversing your network, it is possible to identify traffic that should never be allowed to target your infrastructure devices and block that traffic at the border of your network. Infrastructure ACLs are considered a network security best practice and should be considered as a long-term addition to good network security, as well as a workaround for this specific vulnerability. The white paper entitled "Protecting Your Core: Infrastructure Protection Access Control Lists" presents guidelines and recommended deployment techniques for infrastructure protection ACLs:

For distributed platforms, rACLs may be an option starting in Cisco IOS Software Versions 12.0(21)S2 for the 12000 series GSR and 12.0(24)S for the 7500 series. The receive access lists protect the device from harmful traffic before the traffic can impact the route processor. Receive path ACLs are considered a network security best practice and should be considered as a long-term addition to good network security, as well as a workaround for this specific vulnerability. The CPU load is distributed to the line card processors and helps mitigate load on the main route processor. The white paper entitled "GSR: Receive Access Control Lists" will help identify and allow legitimate traffic to your device and deny all unwanted packets:

The above shows two connections on VTYs, one from 192.168.10.72, and one from 192.168.10.10. The * indicates which VTY belongs to the current session. In the above example, the user issuing the who command was connecting from 192.168.10.72. To clear the session from 192.168.10.10, which is on VTY 1, the following command is used:

Router# clear tcp line vty 1[confirm] [OK]

Note: If you are using telnet to connect to the device, accidentally clearing your TCP connection will disconnect your telnet session. If the IOS device has been exploited, it will not be possible to reconnect via telnet. Console access or a device reload will be required to restore service.