[NT] Another SQL Server 7 Buffer Overflow (xp_dirtree)

From: support@securiteam.com
Date: 03/10/02


From: support@securiteam.com
To: list@securiteam.com
Date: Sun, 10 Mar 2002 01:11:49 +0100 (CET)

The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion

When was the last time you checked your server's security?
How about a monthly report?
http://www.AutomatedScanning.com - Know that you're safe.
- - - - - - - - -

  Another SQL Server 7 Buffer Overflow (xp_dirtree)
------------------------------------------------------------------------

SUMMARY

The extended stored procedure xp_dirtree allows all users to retrieve the
subdirectory structure of a given drive or folder. A security
vulnerability in this stored procedure allows attackers to overflow an
internal buffer used by the function and execute arbitrary code.

DETAILS

System affected:
 * Microsoft SQL Server 7 all service packs and fixes, version 7.00.1021

The buffer overflow occurs when a long string is supplied:
xp_dirtree 'XXXXXX...X'

In this form it is hard to exploit due to a string conversion. However, if
you pass the parameter as Unicode:

xp_dirtree N'XXXXXX...X'

Then there is no string conversion, and you can crash the server and
exploit the buffer overflow. Unicode buffer overflows are a bit harder to
exploit but not impossible.

Workaround:
Drop the extended store procedure and its DLL.

Vendor status:
Microsoft was not contacted.

ADDITIONAL INFORMATION

The information has been provided by <mailto:cesarc56@yahoo.com> c c.

========================================

This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com

====================
====================

DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.



Relevant Pages

  • [NEWS] Symantec VERITAS Multiple Buffer Overflows
    ... Get your security news from a reliable source. ... VERITAS NetBackup 6.0 Client ... Volume Manager Buffer Overflow: ... Database Manager Buffer Overflow: ...
    (Securiteam)
  • [NT] Multiple Vulnerabilities in JanaServer
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Windows platform can act as HTTP/FTP/NEWS/SNTP server, ... JanaServer up to 1.46 was freeware, ... HTTP server buffer overflow ...
    (Securiteam)
  • RE: Can we afford full disclosure of security holes?
    ... Can we afford full disclosure of security holes? ... |of the IIS buffer overflow that made the Code Red I and II worms ... Where the hell do you or anyone get off by saying that eEye's advisory made ... CodeRed is based off of another worm that was ...
    (Bugtraq)
  • Re: NT was written before the Internet says security expert
    ... The point is that buffer overflow vulnerabilities aren't new, ... devices and files, or user security. ... ``People from East Germany have found the West so confusing. ... easier when you have only one party.'' -- Linus Torvalde, Linux Expo Canada ...
    (comp.unix.sco.misc)
  • [UNIX] Monkey HTTP Daemon Remote Buffer Overflow
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Monkey is a "Web server written in C ... * Monkey HTTPd version 0.6.1 ... A buffer overflow vulnerability exists in Monkey's handling of forms ...
    (Securiteam)