Overview
A vulnerability involving an input validation error in the "site exec" command has recently been identified in the Washington University ftpd (wu-ftpd) software package. Sites running affected systems are advised to update their wu-ftpd software as soon as possible.
A similar but distinct vulnerability has also been identified that involves a missing format string in several setproctitle() calls. It affects a broader number of ftp daemons. Please see the vendor section of this document for specific information about the status of specific ftpd implementations and solutions.
Description
"Site exec" Vulnerability
The wu-ftpd "site exec" vulnerability is the result of missing character-formatting argument in several function calls that implement the "site exec" command functionality. Normally if "site exec" is enabled, a user logged into an ftp server (including the 'ftp' or 'anonymous' user) may execute a restricted subset of quoted commands on the server itself. However, if a malicious user can pass character format strings consisting of carefully constructed *printf() conversion characters (%f, %p, %n, etc) while executing a "site exec" command, the ftp daemon may be tricked into executing arbitrary code as root. The "site exec" vulnerability appears to have been in the wu-ftpd code since the original wu-ftpd 2.0 came out in 1993. Any vendors who have based their own ftpd distributions on this vulnerable code are also likely to be vulnerable. The vulnerability appears to be exploitable if a local user account can be used for ftp login. Also, if the "site exec" command functionality is enabled, then anonymous ftp login allows sufficient access for an attack. setproctitle() Vulnerability A separate vulnerability involving a missing character-formatting argument in setproctitle(), a call which sets the string used to display process identifier information, is also present in wu-ftpd. Other ftpd implementations have been found to have vulnerable setproctitle() calls as well, including those from proftpd and OpenBSD. The setproctitle() vulnerability appears to have been present in various ftpd implementations since at least BSD ftpd 5.51 (which predates wuarchive-ftpd 1.0). It has also been confirmed to be present in BSD ftpd 5.60 (the final BSD release). Any vendors who have based their own ftpd distributions on this vulnerable code are also likely to be vulnerable. It should be noted that many operating systems do not support setproctitle() calls. However, other software engineering defects involving the same type of missing character-formatting argument may be present. Intruder Activity One possible indication you are being attacked with either of these vulnerabilities may be the appearance of syslog entries similar to the following: Jul 4 17:43:25 victim ftpd[3408]: USER ftp Jul 4 17:43:25 victim ftpd[3408]: PASS [malicious shellcode] Jul 4 17:43:26 victim ftpd[3408]: ANONYMOUS FTP LOGIN FROM attacker.example.com [10.29.23.19], [malicious shellcode] Jul 4 17:43:28 victim-site ftpd[3408]: SITE EXEC (lines: 0): %.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f% .f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%. f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f %.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f% .f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%. f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f %.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%c%c%c%.f|%p Jul 4 17:43:28 victim ftpd[3408]: FTP session closed
http://www.securityfocus.com/vdb/bottom.html?section=discussion&vid=1425 http://ciac.llnl.gov/ciac/bulletins/k-054.shtml The CERT/CC has received reports of both of these vulnerabilities being successfully exploited on the Internet. Please check our Current Activity page for updates regarding intruder activity involving these vulnerabilities. |
Impact
By exploiting any of these input validation problems, local or remote users logged into the ftp daemon may be able execute arbitrary code as root. An anonymous ftp user may also be able to execute arbitrary code as root. |
Solution
Upgrade your version of ftpd |
Vendor Information
CVSS Metrics
Group | Score | Vector |
---|---|---|
Base | ||
Temporal | ||
Environmental |
References
- ftp://ftp.auscert.org.au/pub/auscert/advisory/AA-2000.02
- http://www.securityfocus.com/bid/1387
- ftp://ftp.wu-ftpd.org/pub/wu-ftpd/patches/apply_to_2.6.0/lreply-buffer-overflow.patch
- ftp://ftp.wu-ftpd.org/pub/wu-ftpd/wu-ftpd-2.6.1.tar.gz
- ftp://ftp.wu-ftpd.org/pub/wu-ftpd/wu-ftpd-2.6.1.tar.gz.asc
- ftp://ftp.wu-ftpd.org/pub/wu-ftpd/wu-ftpd-2.6.1.tar.Z
- ftp://ftp.wu-ftpd.org/pub/wu-ftpd/wu-ftpd-2.6.1.tar.Z.asc
- http://ciac.llnl.gov/ciac/bulletins/k-054.shtml
- http://www.linuxsecurity.com/advisories/advisory_documents/other_advisory-499.html (CONECTIVA),
- ftp://ftp.conectiva.com.br/pub/conectiva/
- http://www.debian.org/security/2000/20000623
- ftp://ftp.calderasystems.com/pub/OpenLinux/security/CSSA-2000-020.0.txt http://www.redhat.com/support/errata/RHSA-2000-039-02.html
- http://www.linux-mandrake.com/en/fupdates.php3 ftp://ftp.slackware.com/pub/slackware/slackware-7.1/patches/wu-ftpd-patch.README http://www.suse.de/de/support/security/suse_security_announce_53.txt
- ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-00%3A29.wu-ftpd.asc.v1.1
- ftp://ftp.NetBSD.ORG/pub/NetBSD/misc/security/advisories/NetBSD-SA2000-009.txt.asc
- ftp://ftp.NetBSD.ORG/pub/NetBSD/misc/security/advisories/NetBSD-SA2000-010.txt.asc
- ftp://sgigate.sgi.com/security/20000701-01-I
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2000-0573
- http://www.securityfocus.com/templates/forum_message.html?forum=2&head=3342&id=3342
- http://www.securityfocus.com/templates/archive.pike?list=1&mid=66842
- http://www.proftpd.net/download.html
- http://www.proftpd.org/proftpd-l-archive/00-07/msg00059.html
- http://www.proftpd.org/proftpd-l-archive/00-07/msg00060.html
- http://bugs.proftpd.net/show_bug.cgi?id=121
- http://www.proftpd.net/security.html
- http://www.openbsd.org/errata.html#ftpd
- http://www.redhat.com/support/errata/RHSA-2000-039-02.html
Acknowledgements
The CERT Coordination Center thanks Gregory Lundberg and Theo de Raadt for their help in developing this document.
This document was written by Jeff S Havrilla.
Other Information
CVE IDs: | CVE-2000-0573 |
CERT Advisory: | CA-2000-13 |
Severity Metric: | 87.72 |
Date Public: | 2000-06-23 |
Date First Published: | 2000-10-02 |
Date Last Updated: | 2001-02-19 22:04 UTC |
Document Revision: | 7 |