天天看點

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

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

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/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

/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...."

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:

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?

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:

Check software versions and regularly check forsupport or updates

If the software will soon approach end-of-life, take steps to upgradeat earliest convenience

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.

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.