Products
Repscan
Checkpwd

Services
Oracle Audit / Hardening
Security Trainings
Consulting

Information
Published AlertsRSS Published Alerts
Upcoming AlertsRSS Published Alerts
Patch Information
Whitepaper
Presentations
Oracle Fact Sheets
Exploits
Scripts

News & Events
Events
News

Company
Contact
Partner
Impressum
Sitemap


Search



Search Red-Database-Security
Overwrite any file via desname in Oracle Reports

Name Overwrite any file via desname in Oracle Reports
Severity High Risk
Category File overwrite
Vendor URL http://www.oracle.com/
Author Alexander Kornbrust (ak at red-database-security.com)
Date 25 August 2005 (V 1.02)
Cert VU# 472148
CVE CAN-2005-2371
Inital bug report
800 days ago


Details
Oracle Reports is Oracle's award-winning, high-fidelity enterprise reporting tool.

It enables businesses to give immediate access to information to all levels within and outside of the
organization in an unrivaled scalable and secure environment. Oracle Reports, a component of the Oracle
Application Server, is used by Oracle itself for the E-Business Suite. Many large customers are using Oracle
Reports as reporting tool for their enterprise applications.

By specifing a special value for the parameter desname Oracle Reports can overwrite any file on the application server.
On Windows systems an attacker can overwrite any files (e.g. boot.ini) on the application server.
On UNIX system an attacker can overwrite all files (e.g. opmn.xml) which belongs to the Oracle Application Server user.

This attack can be done with a simple URL.


Affected Products
Internet Application Server
Oracle Application Server
Oracle Developer Suite

Patch Information
This bug is NOT FIXED with Critical Patch Update October 2005 (CPU October 2005).
It seems that Oracle is NOT INTERESTED to fix this issue and provide patches for this issue.
If you think you need a patch to protect your Oracle Application Server you should contact Oracle.


Testcase
Will be provided if a patch is available.

Workaround for Oracle Reports (Workaround changed 16.09.2005)
Use URLRewrite to block potential dangerous URLs containing the desname parameter.

For Windows Systems

RewriteCond %{QUERY_STRING} (.*)destype=file(.*) [NC]
RewriteCond %{QUERY_STRING} (.*)desname=(.*) [NC]
RewriteCond %{QUERY_STRING} !(.*)desname=c:\\Oracle\\report_destination\\[A-Za-z0-9](.*) [NC]
RewriteLog c:\Oracle\oas904\Apache\Apache\logs\rewrite_rep.log
RewriteLogLevel 3
RewriteEngine OnRewriteRule (.*)reports(.*)$ /forbidden.htm [R] [NC]

For Unix Systems

RewriteCond %{QUERY_STRING} (.*)destype=file(.*) [NC]
RewriteCond %{QUERY_STRING} (.*)desname=(.*) [NC]
RewriteCond %{QUERY_STRING} !(.*)desname=/oracle/report_destination/[A-Za-z0-9](.*) [NC]
RewriteRule (.*)reports(.*)$ /forbidden.htm [R] [NC]
RewriteLog /oracle/oas904/Apache/Apache/logs/rewrite_rep.log
RewriteLogLevel 3
RewriteEngine On


If you need the desname parameter in your URL you can create a new entry in the cgicmd.dat (e.g. mykey: desname=myoutput.pdf).

Don't forget to protect the content of your cgicmd.dat by setting the environment variable REPORTS_CGINODIAG=YES (see Metalink article 274858.1).


History
12-aug-2003 Oracle secalert was informed
26-sep-2003 Bug confirmed
15-apr-2005 Red-Database-Security informed Oracle secalert that this vulnerability will publish after CPU July 2005
Red-Database-Security offered Oracle more time if it is not possible to provide a fix ==> NO FEEDBACK.
12-jul-2005 Oracle published CPU July 2005 without fixing this issue
18-jul-2005 Red-Database-Security published this advisory
21-jul-2005 Cert VU# and affected products added
25-aug-2005 CVE number added
16-sep-2005 Workaround was incomplete and is now hopefully correct (Thanks to D. Nachbar for this information)



© 2005 by Red-Database-Security GmbH - last update 03-nov-2005

Oracle Reports

Oracle Reports is Oracle's award-winning, high-fidelity enterprise reporting tool.

It enables businesses to give immediate access to information to all levels within and outside
of the organization in an unrivaled scalable and secure environment. Oracle Reports consists of
Oracle Reports Developer (a component of the Oracle Developer Suite) and Oracle Application Server
Reports Services (a component of the Oracle Application Server).