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

wp-02-0007.txt

wp-02-0007.txt
Posted Jun 14, 2002
Authored by Matt Moore | Site westpoint.ltd.uk

Westpoint Security Advisory - SQLXML allows XML data to be transferred to and from SQL Server, returning database queries as XML. SQLXML has two vulnerabilities - a buffer overflow in the SQLXML ISAPI filter and a cross site scripting vulnerability. These bugs are discussed in MS02-030.

tags | overflow, vulnerability, xss
SHA-256 | 11b451a50a7794ab52be537a852add9ac09a0ab37b6dff3b1edbf49c061125b0

wp-02-0007.txt

Change Mirror Download
Westpoint Security Advisory

Title: Microsoft SQLXML ISAPI Overflow and Cross Site Scripting
Risk Rating: Medium
Software: Microsoft SQLXML 3.0 / IIS 5.0 / SQLServer 2000
Platforms: Win2K
Vendor URL: www.microsoft.com
Author: Matt Moore <matt@westpoint.ltd.uk>
Date: 12 June 2002
Advisory ID#: wp-02-0007.txt
CVE#: CVE-CAN-2002-0186 (XSS) and CVE-CAN-2002-0187 (Overflow)

Overview:
=========
SQLXML allows XML data to be transferred to and from SQL Server, returning
database queries as XML.

SQlXML has two vulnerabilities: a buffer overflow in the SQLXML ISAPI
filter, and a cross site scripting vulnerability.

More complete details on how SQLXML works can be found in Microsoft's
advisory (see below).

Details:
========

Cross Site Scripting
--------------------
Part of the functionality of SQLXML is being able to run SQL queries via a
URL such as:

IIS-server/Northwind?sql=SELECT+contactname,+phone+FROM+Customers+FOR+XML

This will return an XML document containing the query results.

It is possible to specify an extra parameter in the query, 'root', which
returns the data as above, but with a 'root' tag of the xml document as
the user specified.

This feature can be used to perform cross site scripting attacks against
the web application running on the server:

IIS-server/Northwind?sql=SELECT+contactname,+phone+FROM+Customers+FOR+XML&ro

ot=<SCRIPT>alert(document.domain)</SCRIPT>

Best practice recommends against allowing ad hoc URL queries against a
database.

SQLXML ISAPI Filter Buffer Overflow
-----------------------------------
When making SQL queries using the 'sql=' functionality of SQLXML it is
possible to specify certain parameters which affect the returned XML
(e.g. xsl=). One of these parameters lets you set a content-type.

It's possible to crash IIS by requesting an overly long string in the
?contenttype= parameter. This could also allow arbitrary code to be run
on the server in the context of the SYSTEM account.

A normal request looks like (in this case, a direct sql= query):

IIS-server/demos?sql=select+*+from+Customers+as+Customer+FOR+XML+auto&root=r

oot&xsl=custtable.xsl&contenttype=text/html

By specifying >240 characters for the content-type parameter it is possible
to make inetinfo.exe crash.

E.g. (using a 'template' file rather than a direct query, in this case):

IIS-Server/Nwind/Template/catalog.xml?contenttype=text/AAAA...AAA

Patch Information:
------------------
Microsoft has released patches and an advisory for the identified issues.

These are available from:

http://www.microsoft.com/technet/treeview/default.asp?url=/technet/security/

bulletin/MS02-030.asp

This advisory is available online at:

http://www.westpoint.ltd.uk/advisories/wp-02-0007.txt




Login or Register to add favorites

File Archive:

July 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close