-----BEGIN PGP SIGNED MESSAGE-----

===========================================================================
             AUSCERT External Security Bulletin Redistribution

     ESB-2003.0099 -- NGSSoftware Insight Security Research Advisories
       NISR16022003a, NISR16022003b, NISR16022003c and NISR16022003e
                 Multiple Oracle Database Vulnerabilities
                             18 February 2003

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

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:                Oracle9i Database Release 2, 9i Release 1, 8i,
                        8.1.7, 8.0.6
Vendor:                 Oracle
Impact:                 Administrator Compromise
Access Required:        Remote

Comment: Bulletins included are:

         NISR16022003a - Oracle unauthenticated remote system compromise
         NISR16022003b - Oracle TO_TIMESTAMP_TZ Remote System Buffer
                         Overrun
         NISR16022003c - Oracle TZ_OFFSET Remote System Buffer Overrun
         NISR16022003e - ORACLE bfilename function buffer overflow
                         vulnerability

         Information from Oracle on these vulnerabilities is available at:

         http://otn.oracle.com/deploy/security/pdf/2003alert48.pdf
         http://otn.oracle.com/deploy/security/pdf/2003alert49.pdf
         http://otn.oracle.com/deploy/security/pdf/2003alert50.pdf
         http://otn.oracle.com/deploy/security/pdf/2003alert51.pdf

- --------------------------BEGIN INCLUDED TEXT--------------------

NGSSoftware Insight Security Research Advisory

Name:    Oracle unauthenticated remote system compromise
Systems Affected:  All platforms; Oracle9i Database Release 2, 9i Release 1,
8i, 8.1.7, 8.0.6
Severity:  Critical Risk
Category:               Remote System Buffer Overrun
Vendor URL:   http://www.oracle.com
Author:   Mark Litchfield (mark@ngssoftware.com)
Date:   16th February 2003
Advisory number: #NISR16022003a


Description
***********
Oracle is the leader in the database market with a 54% market share lead
under ERP (Enterprise Resource Planning). The database server is vulnerable
to a remotely exploitable buffer overflow vulnerability. What exacerbates
this problem is that no valid User ID or password is required by an
attacker.

Details
*******
There is a remotely exploitable buffer overflow vulnerability in the
authentication process with the Oracle Database Server.  By supplying an
overly long username when attempting to log onto the database server an
attacker can overflow a stack based buffer overwriting the saved return
address.  Any arbitrary code supplied by an attacker would execute with the
same privileges as the user running the service; this account is typically
"Oracle" on linux/unix based platforms and Local System on Windows based
operating systems such as NT/2000/XP. As such this allows for a complete
compromise of the data stored in the database and possibly a complete
compromise of the operating system.  As most client applications for Oracle
will tuncate the length of the username that can be supplied to the database
an attacker would need to write their own Oracle "Authenticator" to exploit
this issue. That said, NGSSoftware has found one client application that
will allow longer usernames so to test if you are vulnerable to this issue,
use the LOADPSP utility usually found in "bin" directory found under the
OracleHomeInstallDirectory. On Windows, for example, run:

C:\ora9ias\BIN>loadpsp -name -user LONGUSERNAME/tiger@iasdb myfile


Fix Information
***************
NGSSoftware alerted Oracle to this vulnerability on 30th September 2002.
Oracle has reviewed the code and created a patch which is available from:

http://otn.oracle.com/deploy/security/pdf/2003alert51.pdf

NGSSoftware advise Oracle database customers to review and install the patch
as a matter of urgency.

A check for these issues has been added to NGSSQuirreL for Oracle, a
comprehensive automated vulnerability assessment tool for Oracle Database
Servers of which more information is available from the NGSSite

http://www.ngssoftware.com/software/squirrelfororacle.html

It is further recommend that Oracle DBAs have their network/firewall
administrators ensure that the database server is protected from Internet
sourced traffic.


Further Information
*******************
For further information about the scope and effects of buffer overflows,
please see

http://www.ngssoftware.com/papers/non-stack-bo-windows.pdf
http://www.ngssoftware.com/papers/ntbufferoverflow.html
http://www.ngssoftware.com/papers/bufferoverflowpaper.rtf
http://www.ngssoftware.com/papers/unicodebo.pdf

About NGSSoftware
*****************
NGSSoftware design, research and develop intelligent, advanced application
security assessment scanners. Based in the United Kingdom, NGSSoftware have
offices in the South of London and the East Coast of Scotland. NGSSoftware's
sister company NGSConsulting, offers best of breed security consulting
services, specialising in application, host and network security
assessments.

http://www.ngssoftware.com/
http://www.ngsconsulting.com/

Telephone +44 208 401 0070
Fax +44 208 401 0076

enquiries@ngssoftware.com


NGSSoftware Insight Security Research Advisory

Name:    Oracle TO_TIMESTAMP_TZ Remote System Buffer Overrun
Systems Affected:  All platforms; Oracle9i Database Release 2, 9i Release 1,
8i, 8.1.7, 8.0.6
Severity:  High Risk
Category:               Remote System Buffer Overrun
Vendor URL:   http://www.oracle.com
Author:   Mark Litchfield (mark@ngssoftware.com)
Date:   16th February 2003
Advisory number: #NISR16022003b


Description
***********
Oracle's database server contains fuctions for use within queries. The
TO_TIMESTAMP_TZ function exists to convert a string into a timestamp with a
time zone datatype. This function contains an exploitable buffer overflow
vulnerability.

Details
*******
There is a remotely exploitable buffer overflow vulnerability in the
TO_TIMESTAMP_TZ function. A normal statement would look like the following,
converting a character string string to a value of timestamp with time zone:

SELECT TO_TIMESTAMP_TZ('2003-02-016 12:00:00 -8:00','YYYY-MM-DD HH:MI:SS
TZH:TZM') FROM DUAL;

By supplying a long character string for the second parameter an attacker
can overwirte a saved return address on the stack of Oracle process. Before
this issue can be exploited an attacker must be able to log on to the
database server with a valid user ID and password, but as the
TO_TIMESTAMP_TZ() function can be executed by PUBLIC by default any user of
the system can gain control. Any arbitrary code supplied by an attacker
would execute with the same privileges as the user running the service; this
account is typically "Oracle" on linux/unix based platforms and Local System
on Windows based operating systems such as NT/2000/XP. As such this allows
for a complete compromise of the data stored in the database and possibly a
complete compromise of the operating system.

Fix Information
***************
NGSSoftware alerted Oracle to this vulnerability on 30th September 2002 and
Oracle has produced a patch which is available from

http://otn.oracle.com/deploy/security/pdf/2003alert50.pdf

A check for these issues has been added to NGSSQuirreL for Oracle, a
comprehensive automated vulnerability assessment tool for Oracle Database
Servers of which more information is available from the NGSSite

http://www.ngssoftware.com/software/squirrelfororacle.html

Further Information
*******************
For further information about the scope and effects of buffer overflows,
please see

http://www.ngssoftware.com/papers/non-stack-bo-windows.pdf
http://www.ngssoftware.com/papers/ntbufferoverflow.html
http://www.ngssoftware.com/papers/bufferoverflowpaper.rtf
http://www.ngssoftware.com/papers/unicodebo.pdf

About NGSSoftware
*****************
NGSSoftware design, research and develop intelligent, advanced application
security assessment scanners. Based in the United Kingdom, NGSSoftware have
offices in the South of London and the East Coast of Scotland. NGSSoftware's
sister company NGSConsulting, offers best of breed security consulting
services, specialising in application, host and network security
assessments.

http://www.ngssoftware.com/
http://www.ngsconsulting.com/

Telephone +44 208 401 0070
Fax +44 208 401 0076

enquiries@ngssoftware.com


NGSSoftware Insight Security Research Advisory

Name:    Oracle TZ_OFFSET Remote System Buffer Overrun
Systems Affected:  All platforms; Oracle9i Database Release 2, 9i Release 1,
8i, 8.1.7, 8.0.6
Severity:  High Risk
Category:               Remote System Buffer Overrun
Vendor URL:   http://www.oracle.com
Author:   Mark Litchfield (mark@ngssoftware.com)
Date:   16th February 2003
Advisory number: #NISR16022003c

Description
***********
Oracle's database server contains fuctions for use within queries. The
TZ_OFFSET function returns the time zone offset corresponding to the value
entered based on the date the statement was executed. For example:

SELECT TZ_OFFSET('US/Eastern') FROM DUAL;

would return the time zone offset value of -04:00. The TZ_OFFSET() function
contains a remotely exploitable buffer overflow vulnerability.


Details
*******
There exists a remotely exploitable buffer overflow vulnerability in the
TZ_OFFSET function. By supplying a long character string for the time zone
name an attacker can overwrite a saved return address on the stack of Oracle
process.  Before this issue can be exploited an attacker must be able to log
on to the database server with a valid user ID and password, but as the
TO_TIMESTAMP_TZ() function can be executed by PUBLIC by default any user of
the system can gain control. Any arbitrary code supplied by an attacker
would execute with the same privileges as the user running the service; this
account is typically "Oracle" on linux/unix based platforms and Local System
on Windows based operating systems such as NT/2000/XP. As such this allows
for a complete compromise of the data stored in the database and possibly a
complete compromise of the operating system.


Fix Information
***************
NGSSoftware alerted Oracle to this vulnerability on 30th September 2002.
Oracle has developed a patch which is available from

http://otn.oracle.com/deploy/security/pdf/2003alert50.pdf

A check for these issues has been added to NGSSQuirreL for Oracle, a
comprehensive automated vulnerability assessment tool for Oracle Database
Servers of which more information is available from the NGSSite

http://www.ngssoftware.com/software/squirrelfororacle.html

Further Information
*******************
For further information about the scope and effects of buffer overflows,
please see

http://www.ngssoftware.com/papers/non-stack-bo-windows.pdf
http://www.ngssoftware.com/papers/ntbufferoverflow.html
http://www.ngssoftware.com/papers/bufferoverflowpaper.rtf
http://www.ngssoftware.com/papers/unicodebo.pdf


About NGSSoftware
*****************
NGSSoftware design, research and develop intelligent, advanced application
security assessment scanners. Based in the United Kingdom, NGSSoftware have
offices in the South of London and the East Coast of Scotland. NGSSoftware's
sister company NGSConsulting, offers best of breed security consulting
services, specialising in application, host and network security
assessments.

http://www.ngssoftware.com/
http://www.ngsconsulting.com/

Telephone +44 208 401 0070
Fax +44 208 401 0076

enquiries@ngssoftware.com


NGSSoftware Insight Security Research Advisory

Name:    ORACLE bfilename function buffer overflow vulnerability
Systems Affected:  All platforms; Oracle9i Database Release 2, 9i Release 1,
8i, 8.1.7, 8.0.6
Severity:  High Risk
Category: Remote System Buffer Overrun
Vendor URL:   http://www.oracle.com
Author:   David Litchfield (david@ngssoftware.com)
Date:   16th February 2003
Advisory number: #NISR16022003e


Description
***********
Oracle's database server contains fuctions for use within queries. The
bfilename() function returns a BFILE locator to a binary large object stored
in the database.

Details
*******
The bfilename() function suffers from a remotely exploitable buffer overrun
when an overly long DIRECTORY parameter is supplied. Before this issue can
be exploited an attacker must be able to log on to the database server with
a valid user ID and password, but as the bfilename() function can be
executed by PUBLIC by default any user of the system can gain control. Any
arbitrary code supplied by an attacker would execute with the same
privileges as the user running the service; this account is typically
"Oracle" on linux/unix based platforms and Local System on Windows based
operating systems such as NT/2000/XP. As such this allows for a complete
compromise of the data stored in the database and possibly a complete
compromise of the operating system.


Fix Information
***************
NGSSoftware alerted Oracle to this vulnerability on 30th September 2002.
Oracle has developed a patch which is available from

http://otn.oracle.com/deploy/security/pdf/2003alert50.pdf

A check for these issues has been added to NGSSQuirreL for Oracle, a
comprehensive automated vulnerability assessment tool for Oracle Database
Servers of which more information is available from the NGSSite

http://www.ngssoftware.com/software/squirrelfororacle.html

Further Information
*******************
For further information about the scope and effects of buffer overflows,
please see

http://www.ngssoftware.com/papers/non-stack-bo-windows.pdf
http://www.ngssoftware.com/papers/ntbufferoverflow.html
http://www.ngssoftware.com/papers/bufferoverflowpaper.rtf
http://www.ngssoftware.com/papers/unicodebo.pdf

About NGSSoftware
*****************
NGSSoftware design, research and develop intelligent, advanced application
security assessment scanners. Based in the United Kingdom, NGSSoftware have
offices in the South of London and the East Coast of Scotland. NGSSoftware's
sister company NGSConsulting, offers best of breed security consulting
services, specialising in application, host and network security
assessments.

http://www.ngssoftware.com/
http://www.ngsconsulting.com/

Telephone +44 208 401 0070
Fax +44 208 401 0076

enquiries@ngssoftware.com

- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content.  The decision to use any or all of this information is
the responsibility of each user or organisation, and should be done so in
accordance with site policies and procedures.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

        http://www.auscert.org.au/render.html?cid=1980

If you believe that your system has been compromised, contact AusCERT or
your representative in FIRST (Forum of Incident Response and Security
Teams).

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business 
                hours which are GMT+10:00 (AEST).  On call after hours 
                for member emergencies only.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
Comment: http://www.auscert.org.au/render.html?it=1967

iQCVAwUBPlJCySh9+71yA2DNAQEDDQP8D/rWnCdQtSAzA0fdEWGGQt/cAgy/xQnl
z3Z9DvzanddMGbOWikFI7wNhMVSMET5EeZN97QoVzEF1NYa+tZJpEcqbUyGqbyIb
aEG2HbrytaSYKLWrZaM+fT+V3lg02s8nbc3WNlpoQ+l0TGmTBK6GmGwe5hkJKWir
eVl6iln+oZI=
=fCYa
-----END PGP SIGNATURE-----