SpiderLabs Blog

Is Oracle Application Server End-of-Life?

Written by | Sep 20, 2013 1:59:00 PM

I was asked recently to review a web server running Oracle Application Server. The scope was quite specific, where the customer wanted a special focus on this area. In this case they wanted to knowhow I tested it, what tools I used, the results of the test, and also somewhat unusually, the source code I used to test.

Now we all use different tools to get the job done. The majority of tools we use at SpiderLabs are either Open Source or written by ourselves for bespoke testing. So when a customer requests the code used to test a certain aspect of their site, I could have commonly just pointed them to the download page of some of the open source tools we endorse. However, in this case I was able to provide him with some custom code I threw together for his environment.

So, every pentester's repertoire should include the generation of scripts or snippets to perform certain tasks. In this example, the easiest and simplest method involved writing a simple bash script, with the help of curl, to simply look for HTTP error codes returned with the list sent.

The script looks for default directories in Oracle Application Server and is simple, quick and effective. I've provided a short list in the script as a sample.

#!/bin/sh

# Script to enumerate Oracle Application Server

ARGS=1

HOST=$1

###### List of URLs to check ##########

OAS="/reports/rwservlet

/reports/rwservlet/getserverinfo

/reports/rwservlet/showenv

/reports/rwservlet/showjobs

/reports/rwservlet/showmyjobs

/reports/rwservlet/showjobid

/reports/rwservlet/getserverinfo

/reports/rwservlet/help?command=help

/reports/rwservlet/help?command=showenv

/reports/rwservlet/help?command=showjobs

/reports/rwservlet/help?command=showmyjobs

/reports/rwservlet/help?command=showjobid

/reports/rwservlet/help?command=killjobid

/reports/rwservlet/help?command=parsequery

/reports/rwservlet/help?command=showauth

/reports/rwservlet/help?command=delauth

/reports/rwservlet/help?command=getjobid

/reports/rwservlet/help?command=getserverinfo

/reports/rwservlet/help?command=killengine

/fcgi-bin/echo.exe

/fcgi-bin/echo2.exe

/soapdocs/ReleaseNotes.html

/ows-bin/perlidlc.bat?&di

/sqlnet.log

/oracle/

/oradata/

/pls/admin

/oem_webstage/oem.conf

/bc4j.html

/dms0

/jspdocs/

/mod_ose_docs

/ojspdemos/basic/hellouser/hellouser.jsp

/ojspdemos/basic/simple/usebean.jsp

/ojspdemos/basic/simple/welcomeuser.jsp

/ojspdemos/basic/simple/welcomeuser.jsp

/oprocmgr-status

/pls/portal30/admin_/

/pls/simpledad/admin_/

/pls/simpledad/admin_/gateway.htm?schema=sample

/pls/simpledad/admin_/globalsettings.htm

/xdk/

/xsql/demo/adhocsql/query.xsql?sql=select%20username%20from%20ALL_USERS

/pls/simpledad/admin_/adddad.htm?%3CADVANCEDDAD%3E

/soapConfig.xml

/XSQLConfig.xml

/isqlplus

/soap/servlet/soaprouter

/globals.jsa

/pls/sample/admin_/help/..%255cplsql.conf

/servlet/oracle.xml.xsql.XSQLServlet/xsql/lib/XSQLConfig.xml

/pls/ldc/admin_/

/README

/demo/xml/xmlquery/viewsrc/XMLQuery.jsp.txt

/soapdocs/webapps/soap/

/j2ee/

/WebCacheDemo.html

/webcache/

/webcache/webcache.xml

/ptg_upgrade_pkg.log

/OA_HTML/oam/weboam.log

/webapp/admin/_pages/_bc4jadmin/

/_pages/_webapp/_admin/_showpooldetails.java

/_pages/_webapp/_admin/_showjavartdetails.java

/_pages/_demo/

/_pages/_webapp/_jsp/

/_pages/_demo/_sql/

/reports/rwservlet?server=repserv+report=/tmp/hacker.rdf+destype=cache+desformat=PDF

/apex/

/OA_JAVA/

/OA_HTML/

/aplogon.html

/appdet.html

/servlets/weboam/oam/oamLogin

/OA_HTML/PTB/mwa_readme.htm

/pls/portal/owa_util.cellsprint?p_theQuery=select"

######################

if [ $# -ne "$ARGS" ]; then

printf "Usage: `basename $0` URL e.g.https:\\10.10.1.1 \n"

echo "Detects default config of Oracle Application Server"

exit 0

fi

#######################

# Test HTTP codes, 200 OK

#######################

echo ""

echo "Checking for default Oracle Application Server URLs...."

echo ""

for i in $OAS

do

echo -n "Testing $HOST$i - "

curl --insecure --silent --output /dev/null --write-out "%{http_code}\n" $HOST$i

done

#### Enumerate showenv info #####

echo "Host $HOST SHOWENV DETAILS:"

echo "==============================================="

curl --insecure --silent $HOST/reports/rwservlet/showenv|grep -v \<|grep [a-zA-Z0-9]|sed -e 's/^\s*//'

What worried me was the amount of HTTP 200 codes I was getting back from my quick script.

I've probably seen weak Oracle Application server configurations a couple of times this year (normally 10gR2) running on production systems. As a result, I was able to access reports or information that should not have been publicly accessible.

So, a couple of things about this upset me:

  1. Why do companies run old non-supported software on their production systems? In the case of Oracle 10gR2, Oracle stopped supporting it in December 2011. Aren't production systems important and, well, don't they need active support or to at least run supportable code?
  2. Why do companies still run old software with old vulnerabilities and weak configurations? In the websites I tested, the present installations had been around for a few years. This means the same risks would have been present for that amount of time.

Given that we still see old vulnerabilities on production systems on a relatively regular basis, companies need to take action:

  1. Check software versions and regularly check for support or updates
  2. If the software will soon approach end-of-life, take steps to upgrade at earliest convenience
  3. Make sure configurations are hardened. In this case, see http://docs.oracle.com/cd/B14099_19/getstart.htm
  4. Get configurations tested to confirm their security

The above steps seem obvious to most and can be used for almost any software used, but it is always a surprise to find out how often they aren't followed.

So, is Oracle Application Server end-of-life? Well….I guess the best thing to do is follow step 1 (http://www.oracle.com/us/support/library/lifetime-support-middleware-069163.pdf)to find Oracle's support policy on the product. Completing steps 2 through 4 will become easier to take once you know.

But as many of us in the industry know, sometimes it's necessary to state the obvious, especially where security is concerned.