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#2558

File Transfer Protocol allows data connection hijacking via PASV mode race condition

Overview

There is a vulnerability in the File Transfer Protocol (FTP) that allows an attacker to hijack FTP data connections when the client connects using passive mode (PASV).

I. Description

In FTP PASV mode, the client makes a control connection to the FTP server (typically port 21/tcp) and requests a PASV data connection. The server responds by listening for client connections on a specified port number, which is supplied to the client via the control connection. If an attacker can make a connection to the listening port before the client connects, the server will transmit the data to the attacker instead of the client.

To exploit this vulnerability, the attacker must intercept or guess the port number that the server will use, then make its connection attempt before the client establishes a data connection. If the server chooses port numbers using an easily identifiable pattern (such as incrementally), this vulnerability is trivial to exploit.

Note that this vulnerability was first discovered in February 1999, so it is likely that many FTP servers have been patched to address this issue.

II. Impact

Remote intruders can hijack data requested by a legitimate user. It may also be possible to insert data on to an FTP server if the server is acting in a peering (mirroring) relationship with another server.

III. Solution

Apply a patch from your vendor


Please see the vendor section of this document for information on obtaining patches.

Reject data connections from hosts that do not match the control connection host

One possible mitigation strategy is to reject data connections that do not originate from the same IP address as the control connection, but this has several problems. First, it makes the server not strictly compliant with RFC 959. Second, it can be defeated by an attacker on the same machine (or network, if spoofed IP addresses are used).

Use randomly selected PASV ports to decrease likelihood of interception

If the server chooses the PASV listening port randomly, it will be difficult or impossible for an attacker to determine the data port. Note that this will not protect against attackers who are able to intercept the FTP control connection because the FTP server must supply the PASV listening port to the client.

Systems Affected

VendorStatusDate NotifiedDate Updated
Apple Computer Inc.Unknown29-Apr-2002
BSDIUnknown29-Apr-2002
Cisco Systems Inc.Unknown16-May-2002
Cray Inc.Vulnerable30-Apr-2002
Data GeneralUnknown29-Apr-2002
DebianUnknown29-Apr-2002
F5 NetworksUnknown29-Apr-2002
FreeBSDUnknown29-Apr-2002
FujitsuUnknown29-Apr-2002
Guardian Digital Inc. Unknown29-Apr-2002
Hewlett-Packard CompanyVulnerable2-May-2002
IBMUnknown29-Apr-2002
MandrakeSoftUnknown29-Apr-2002
Microsoft CorporationUnknown5-Jul-2002
NcFTP SoftwareUnknown29-Apr-2002
NEC CorporationUnknown29-Apr-2002
NetBSDUnknown29-Apr-2002
OpenBSDUnknown29-Apr-2002
Red Hat Inc.Vulnerable30-Apr-2002
SequentUnknown29-Apr-2002
SGIVulnerable26-Mar-2003
Sony CorporationUnknown29-Apr-2002
Sun Microsystems Inc.Unknown29-Apr-2002
SuSE Inc.Unknown29-Apr-2002
The SCO Group (SCO Linux)Unknown29-Apr-2002
The SCO Group (SCO UnixWare)Unknown29-Apr-2002
UnisysUnknown29-Apr-2002
WU-FTPD Development GroupVulnerable30-Apr-2002

References


ftp://ftp.wu-ftpd.org/pub/wu-ftpd-attic/ANNOUNCE-2.4.2-beta-18-vr14
http://www.cert.org/tech_tips/ftp_port_attacks.html
http://www.ietf.org/rfc/rfc959.txt
http://www.infowar.com/iwftp/iw_sec/iw_sec_01.txt
http://www.securityfocus.com/bid/4895
http://online.securityfocus.com/bid/5461

Credit

The CERT/CC thanks Gregory A Lundberg and Jeffrey R. Gerber for their detailed explanations of this vulnerability.

This document was written by Jeffrey P. Lanza and Jed M Pickel.

Other Information

Date Public:99-02-01
Date First Published:2002-04-29
Date Last Updated:2003-03-26
CERT Advisory: 
CVE-ID(s):CVE-1999-0351
NVD-ID(s):CVE-1999-0351
US-CERT Technical Alerts: 
Metric:13.95
Document Revision:31

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

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