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

NGS-sapdb-stack.txt

NGS-sapdb-stack.txt
Posted Jul 7, 2007
Authored by Mark Litchfield | Site ngssoftware.com

The SAP DB suffers from a web server stack overflow.

tags | advisory, web, overflow
SHA-256 | 0749c32ef0d9c060f3d5e24c3f8a13e4ffa2c55ae533dcc7bbbf4b19e62ae074

NGS-sapdb-stack.txt

Change Mirror Download
=======
Summary
=======
Name: SAP DB Web Server Stack Overflow
Release Date: 5 July 2007
Reference: NGS00486
Discover: Mark Litchfield <mark@ngssoftware.com>
Vendor: SAP
Vendor Reference: SECRES-291
Systems Affected: All Versions
Risk: Critical
Status: Fixed

========
TimeLine
========
Discovered: 3 January 2007
Released: 19 January 2007
Approved: 29 January 2007
Reported: 11 January 2007
Fixed: 27 March 2007
Published:

===========
Description
===========
SAP DB is an open source database server sponsored by SAP AG that provides
a series of web tools to administer database servers via web browsers.
These tools can be integrated into third-party web servers such as IIS, or
run on its own web server which by default is installed to TCP Port 9999.

When installed as its own web server, the process waHTTP.exe is found to
be listening on TCP Port 9999.

=================
Technical Details
=================
http://target:9999/webdbm?Event=DBM_INTERN_TEST&Action=REFRESH

Looking at the 200 response we can determine the function offered by the
request:

******************************************

<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0
background=/WARoot/Images/tatami.gif>
<a href="javascript:parent.GotoWebDBMURL(this,
'Event=DBM_INTERN_TEST&Action=REFRESH')">Test</a><table
style="font-family:courier new,monospace; font-size:8pt;" border=1
cellspacing=0 cellpadding=1>
<tr><td>sapdbwa_GetRequestURI&nbsp;</td><td>/webdbm&nbsp;</td></tr>
<tr><td>sapdbwa_GetIfModifiedSince&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>sapdbwa_GetQueryString&nbsp;</td><td>Event=DBM_INTERN_TEST&Action=REFRESH&nbsp;</td></tr>
<tr><td>sapdbwa_GetPathInfo&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>sapdbwa_GetMethod&nbsp;</td><td>GET&nbsp;</td></tr>
<tr><td>sapdbwa_GetContentType&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>sapdbwa_GetContentLength&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>sapdbwa_GetPathTranslated&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>sapdbwa_GetServerName&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>AUTH_TYPE&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>CONTENT_LENGTH&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>CONTENT_TYPE&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>GATEWAY_INTERFACE&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_ACCEPT&nbsp;</td><td>*/*&nbsp;</td></tr>
<tr><td>PATH_INFO&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>QUERY_STRING&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>REMOTE_ADDR&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>REMOTE_HOST&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>REMOTE_USER&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>REQUEST_METHOD&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>SCRIPT_NAME&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>SERVER_NAME&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>SERVER_PORT&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>SERVER_PROTOCOL&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>SERVER_SOFTWARE&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_ACCEPT&nbsp;</td><td>*/*&nbsp;</td></tr>
<tr><td>HTTP_ACCEPT_CHARSET&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_ACCEPT_ENCODING&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_ACCEPT_LANGUAGE&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_ACCEPT_RANGES&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_AGE&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_ALLOW&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_AUTHORIZATION&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_CACHE_CONTROL&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_CONNECTION&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_CONTENT_ENCODING&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_CONTENT_LANGUAGE&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_CONTENT_LENGTH&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_CONTENT_LOCATION&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_CONTENT_MD5&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_CONTENT_RANGE&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_CONTENT_TYPE&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_DATE&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_ETAG&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_EXPECT&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_EXPIRES&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_FROM&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_HOST&nbsp;</td><td>localhost&nbsp;</td></tr>
<tr><td>HTTP_IF_MATCH&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_IF_MODIFIED_SINCE&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_IF_NONE_MATCH&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_IF_RANGE&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_IF_UNMODIFIED_SINCE&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_LAST_MODIFIED&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_LOCATION&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_MAX_FORWARDS&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_PRAGMA&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_PROXY_AUTHENTICATE&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_PROXY_AUTHORIZATION&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_RANGE&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_REFERER&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_RETRY_AFTER&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_SERVER&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_TE&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_TRAILER&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_TRANSFER_ENCODING&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_UPGRADE&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_USER_AGENT&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_VARY&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_VIA&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_WARNING&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_WWW_AUTHENTICATE&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>HTTP_COOKIE&nbsp;</td><td>SID=E63A7F73B20A5021442BAF3C8F70B97A&nbsp;</td></tr>
<tr><td>HTTP_SESSION_ID&nbsp;</td><td>NULL&nbsp;</td></tr>
<tr><td>Event&nbsp;</td><td>DBM_INTERN_TEST&nbsp;</td></tr>
<tr><td>Action&nbsp;</td><td>REFRESH&nbsp;</td></tr>
</table>
</body>

******************************************************

By making the request again, but ammeding the Cookie Value, or if one is
not prersent, simply add it as an HTTP header request, we can cause a
stack based overflow within WAHTTP.exe

The same Overflow can also be achieved in numerous other fields.

If we take the sapdbwa_GetQueryString, we can simply pass an additional
parameter by appending & + string

===============
Fix Information
===============
Please ensure you are running the latest version

NGSSoftware Insight Security Research
http://www.ngssoftware.com/
http://www.databasesecurity.com/
http://www.nextgenss.com/
+44(0)208 401 0070

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
    18 Files
  • 19
    Nov 19th
    7 Files
  • 20
    Nov 20th
    13 Files
  • 21
    Nov 21st
    6 Files
  • 22
    Nov 22nd
    48 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    60 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    44 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