what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

windows.ftp.server.txt

windows.ftp.server.txt
Posted Jan 9, 2004
Authored by Peter Winter-Smith | Site elitehaven.net

The Windows FTP Server is a small free third party ftp server which contains a format string vulnerability in v1.6.1 and below.

tags | advisory
systems | windows
SHA-256 | 2039204c5b39559e9e823c8993dc86c4a3cc6f900672113b8b81cad3cfec257c

windows.ftp.server.txt

Change Mirror Download
Windows FTP Server Format String Vulnerability

##############################################

Credit:
Author : Peter Winter-Smith

Software:
Packages : Windows FTP Server
Version : 1.6 and below
Vendor : HD Soft/Windows Ftp Server SOFTWARE
Vendor Url : https://srv.nease.net/

Vulnerability:
Bug Type : 'wscanf' Format String Vulnerability
Severity : Moderately/Highly Critical
+ Denial of Service
+ Arbitrary Memory Can Be Read/Written

1. Description of Software

"Are you wondering how to setup a FTP server ?
Companies small to large have their own web sites to distribute info,
products, contact, description of their services, files...
When it comes to files such as software downloads, music, movies,
documents the easiest and quickest way to distribute them to the people
who need them is to use an FTP Server!
Maybe Windows FTP Server is the one for you ... why not try Windows
Ftp Server Software for free and make your opinion ?"
- Vendor's Description


2. Bug Information

(a). 'wscanf' Format String Vulnerability

It seems that Windows FTP Server does not directly specify an input
formatting type when receiving data from a remote client, this may
potentially allow certain arbitrary positions in memory to be read from
and written to if an attacker is able to send a specially crafted request
to the server.


A demonstration is as follows:

First I connect to the FTP server using the Windows built in FTP client. I
specify my 'username' to be '%n%n%n%n', and the server immediately
crashes.

---------------

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\WINDOWS\system32>ftp 127.0.0.1
Connected to 127.0.0.1.
220 Welcome to Windows FTP Server
User (127.0.0.1:(none)): %n%n%n%n
Connection closed by remote host.

C:\WINDOWS\system32>

---------------

Upon attaching a debugger to the application, you can immediately see
where the problem lies:

---------------

0:004> g
(a98.9b8): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=00000004 ebx=0000006e ecx=0000000c edx=009843bb esi=0140e864 edi=
0098436e
eip=77c3f665 esp=0140e61c ebp=0140e878 iopl=0 nv up ei pl zr na po
nc
cs=001b ss=0023 ds=0023 es=0023 fs=0038 gs=0000 efl=
00010246
*** ERROR: Symbol file could not be found. Defaulted to export symbols
for C:\WINDOWS\system32\MSVCRT.dll -
MSVCRT!wscanf+654:
77c3f665 8908 mov [eax],ecx ds:0023:00000004=????????

---------------

We managed to cause the application to write to an address which it did
not have access to. By varying the content of the command string supplied
to the server it seems very possible to overwrite different arbitrary
areas of memory with an arbitrary value. This may include saved return
addresses and information detailing user privileges, and so forth, making
this flaw potentially very dangerous.


3. Proof of Concept Code

I did not dedicate much time to the construction of an exploit for this
issue since the exploitation did not appear to be quite as straight
forward as other format string bugs which I have worked with in the past,
therefore no very exciting code is available at this point. To merely
examine the flaw I recommend that you attempt the steps show in the
previous section for yourself.


4. Patches - Workarounds

Currently no patches exist. The vendor has been notified.


5. Credits

The discovery, analysis and exploitation of this flaw is a result of
research carried out by Peter Winter-Smith. I would ask that you do not
regard any of the analysis to be 'set in stone', and that if investigating
this flaw you back trace the steps detailed earlier for yourself.

Greets and thanks to:
David and Mark Litchfield, JJ Gray (Nexus), Todd and all the
packetstorm crew, Luigi Auriemma, Bahaa Naamneh, sean(gilbert(perlboy)),
pv8man, nick k., Joel J. and Martine.


o This document should be mirrored at:
- https://www.elitehaven.net/winftpserver.txt

_________________________________________________________________


Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    63 Files
  • 14
    Nov 14th
    18 Files
  • 15
    Nov 15th
    8 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    17 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close