Is Oracle Application Server End-of-Life?

I was asked recently to review a web serverrunning Oracle Application Server. The scope was quite specific, where thecustomer 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 somewhatunusually, the source code I used to test.

Now we all use different tools to get thejob done. The majority of tools we use at SpiderLabs are either Open Source orwritten by ourselves for bespoke testing. So when a customer requests the codeused to test a certain aspect of their site, I could have commonly just pointedthem 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'srepertoire should include the generation of scripts or snippets to perform certaintasks. In this example, the easiest and simplest method involved writing asimple bash script, with the help of curl, to simply look for HTTP error codesreturned 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 ofHTTP 200 codes I was getting back from my quick script.

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

So, a couple of things about this upset me:

  1. Why do companies run old non-supported software on their productionsystems? 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 vulnerabilitiesand weak configurations? In the websites I tested, the presentinstallations had been around for a few years. This means the same risks would havebeen present for that amount of time.

Given that westill see old vulnerabilities on production systems on a relatively regularbasis, companies need to take action:

  1. Check software versions and regularly check forsupport or updates
  2. If the software will soon approach end-of-life, take steps to upgradeat 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 andcan 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 Serverend-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 youknow.

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

Trustwave reserves the right to review all comments in the discussion below. Please note that for security and other reasons, we may not approve comments containing links.